Browse Source

upgrade to react 0.14

pull/351/head
Matthew Hodgson 7 years ago
parent
commit
87bb7c9b7b
  1. 8
      package.json
  2. 3
      src/ContextualMenu.js
  3. 4
      src/controllers/organisms/RoomList.js
  4. 2
      src/skins/vector/views/organisms/LeftPanel.js
  5. 5
      src/vector/index.js

8
package.json

@ -28,13 +28,15 @@
"filesize": "^3.1.2",
"flux": "~2.0.3",
"linkifyjs": "^2.0.0-beta.4",
"modernizr": "^3.1.0",
"matrix-js-sdk": "^0.3.0",
"matrix-react-sdk": "^0.0.2",
"modernizr": "^3.1.0",
"q": "^1.4.1",
"react": "^0.13.3",
"react": "^0.14.2",
"react-dnd": "^2.0.2",
"react-dnd-html5-backend": "^2.0.0",
"react-dom": "^0.14.2",
"react-loader": "^1.4.0",
"react-dnd": "^1.1.8",
"sanitize-html": "^1.0.0"
},
"devDependencies": {

3
src/ContextualMenu.js

@ -18,6 +18,7 @@ limitations under the License.
'use strict';
var React = require('react');
var ReactDOM = require('react-dom');
// Shamelessly ripped off Modal.js. There's probably a better way
// of doing reusable widgets like dialog boxes & menus where we go and
@ -74,7 +75,7 @@ module.exports = {
</div>
);
React.render(menu, this.getOrCreateContainer());
ReactDOM.render(menu, this.getOrCreateContainer());
return {close: closeMenu};
},

4
src/controllers/organisms/RoomList.js

@ -192,8 +192,8 @@ module.exports = {
_repositionTooltip: function(e) {
if (this.tooltip && this.tooltip.parentElement) {
var scroll = this.getDOMNode();
this.tooltip.style.top = (scroll.parentElement.offsetTop + this.tooltip.parentElement.offsetTop - scroll.scrollTop) + "px";
var scroll = this;
this.tooltip.style.top = (scroll.parentElement.offsetTop + this.tooltip.parentElement.offsetTop - this.scrollTop) + "px";
}
},
};

2
src/skins/vector/views/organisms/LeftPanel.js

@ -18,7 +18,7 @@ limitations under the License.
var React = require('react');
var DragDropContext = require('react-dnd').DragDropContext;
var HTML5Backend = require('react-dnd/modules/backends/HTML5');
var HTML5Backend = require('react-dnd-html5-backend');
var sdk = require('matrix-react-sdk')
var dis = require('matrix-react-sdk/lib/dispatcher');

5
src/vector/index.js

@ -18,6 +18,7 @@ limitations under the License.
var RunModernizrTests = require("./modernizr"); // this side-effects a global
var React = require("react");
var ReactDOM = require("react-dom");
var sdk = require("matrix-react-sdk");
sdk.loadSkin(require('../skins/vector/skindex'));
sdk.loadModule(require('../modules/VectorConferenceHandler'));
@ -136,7 +137,7 @@ window.onload = function() {
function loadApp() {
if (validBrowser) {
var MatrixChat = sdk.getComponent('pages.MatrixChat');
window.matrixChat = React.render(
window.matrixChat = ReactDOM.render(
<MatrixChat onNewScreen={onNewScreen} registrationUrl={makeRegistrationUrl()} />,
document.getElementById('matrixchat')
);
@ -145,7 +146,7 @@ function loadApp() {
console.error("Browser is missing required features.");
// take to a different landing page to AWOOOOOGA at the user
var CompatibilityPage = require("../skins/vector/views/pages/CompatibilityPage");
window.matrixChat = React.render(
window.matrixChat = ReactDOM.render(
<CompatibilityPage onAccept={function() {
validBrowser = true;
console.log("User accepts the compatibility risks.");

Loading…
Cancel
Save