diff --git a/package.json b/package.json index a532d185..fb7558ad 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "react-dnd-html5-backend": "^2.0.0", "react-dom": "^0.14.2", "react-gemini-scrollbar": "^2.0.1", - "react-loader": "^1.4.0", "sanitize-html": "^1.0.0" }, "devDependencies": { diff --git a/src/skins/vector/views/molecules/ChangeAvatar.js b/src/skins/vector/views/molecules/ChangeAvatar.js index 42c2d1fd..7afac77f 100644 --- a/src/skins/vector/views/molecules/ChangeAvatar.js +++ b/src/skins/vector/views/molecules/ChangeAvatar.js @@ -21,9 +21,6 @@ var React = require('react'); var sdk = require('matrix-react-sdk') var ChangeAvatarController = require('matrix-react-sdk/lib/controllers/molecules/ChangeAvatar') -var Loader = require("react-loader"); - - module.exports = React.createClass({ displayName: 'ChangeAvatar', mixins: [ChangeAvatarController], @@ -70,6 +67,7 @@ module.exports = React.createClass({ ); case this.Phases.Uploading: + var Loader = sdk.getComponent("atoms.Spinner"); return ( ); diff --git a/src/skins/vector/views/molecules/ChangeDisplayName.js b/src/skins/vector/views/molecules/ChangeDisplayName.js index 1a094ec2..a10ba2a7 100644 --- a/src/skins/vector/views/molecules/ChangeDisplayName.js +++ b/src/skins/vector/views/molecules/ChangeDisplayName.js @@ -20,8 +20,6 @@ var React = require('react'); var sdk = require('matrix-react-sdk'); var ChangeDisplayNameController = require("matrix-react-sdk/lib/controllers/molecules/ChangeDisplayName"); -var Loader = require("react-loader"); - module.exports = React.createClass({ displayName: 'ChangeDisplayName', @@ -39,6 +37,7 @@ module.exports = React.createClass({ render: function() { if (this.state.busy) { + var Loader = sdk.getComponent("atoms.Spinner"); return ( ); diff --git a/src/skins/vector/views/molecules/ChangePassword.js b/src/skins/vector/views/molecules/ChangePassword.js index 32315158..b1d8f28e 100644 --- a/src/skins/vector/views/molecules/ChangePassword.js +++ b/src/skins/vector/views/molecules/ChangePassword.js @@ -19,8 +19,6 @@ limitations under the License. var React = require('react'); var ChangePasswordController = require('matrix-react-sdk/lib/controllers/molecules/ChangePassword') -var Loader = require("react-loader"); - module.exports = React.createClass({ displayName: 'ChangePassword', @@ -64,6 +62,7 @@ module.exports = React.createClass({ ); case this.Phases.Uploading: + var Loader = sdk.getComponent("atoms.Spinner"); return (
diff --git a/src/skins/vector/views/molecules/MemberInfo.js b/src/skins/vector/views/molecules/MemberInfo.js index 5f8e806d..24fa1e91 100644 --- a/src/skins/vector/views/molecules/MemberInfo.js +++ b/src/skins/vector/views/molecules/MemberInfo.js @@ -17,7 +17,6 @@ limitations under the License. 'use strict'; var React = require('react'); -var Loader = require("../atoms/Spinner"); var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var sdk = require('matrix-react-sdk') @@ -47,6 +46,7 @@ module.exports = React.createClass({ } if (this.state.creatingRoom) { + var Loader = sdk.getComponent("atoms.Spinner"); spinner = ; } diff --git a/src/skins/vector/views/organisms/CreateRoom.js b/src/skins/vector/views/organisms/CreateRoom.js index 64f5b861..b63b477d 100644 --- a/src/skins/vector/views/organisms/CreateRoom.js +++ b/src/skins/vector/views/organisms/CreateRoom.js @@ -24,9 +24,6 @@ var sdk = require('matrix-react-sdk') var PresetValues = require('matrix-react-sdk/lib/controllers/atoms/create_room/Presets').Presets; -var Loader = require("react-loader"); - - module.exports = React.createClass({ displayName: 'CreateRoom', mixins: [CreateRoomController], @@ -122,6 +119,7 @@ module.exports = React.createClass({ render: function() { var curr_phase = this.state.phase; if (curr_phase == this.phases.CREATING) { + var Loader = sdk.getComponent("atoms.Spinner"); return ( ); diff --git a/src/skins/vector/views/organisms/MemberList.js b/src/skins/vector/views/organisms/MemberList.js index 407e282a..b39d675f 100644 --- a/src/skins/vector/views/organisms/MemberList.js +++ b/src/skins/vector/views/organisms/MemberList.js @@ -18,7 +18,6 @@ limitations under the License. var React = require('react'); var classNames = require('classnames'); -var Loader = require('react-loader'); var MemberListController = require('matrix-react-sdk/lib/controllers/organisms/MemberList') var GeminiScrollbar = require('react-gemini-scrollbar'); @@ -78,6 +77,7 @@ module.exports = React.createClass({ inviteTile: function() { if (this.state.inviting) { + var Loader = sdk.getComponent("atoms.Spinner"); return ( ); diff --git a/src/skins/vector/views/organisms/RoomDirectory.js b/src/skins/vector/views/organisms/RoomDirectory.js index 8c4dc51d..05b2b9c2 100644 --- a/src/skins/vector/views/organisms/RoomDirectory.js +++ b/src/skins/vector/views/organisms/RoomDirectory.js @@ -23,8 +23,6 @@ var Modal = require('matrix-react-sdk/lib/Modal'); var sdk = require('matrix-react-sdk') var dis = require('matrix-react-sdk/lib/dispatcher'); -var Loader = require("react-loader"); - module.exports = React.createClass({ displayName: 'RoomDirectory', @@ -121,6 +119,7 @@ module.exports = React.createClass({ render: function() { if (this.state.loading) { + var Loader = sdk.getComponent("atoms.Spinner"); return (
diff --git a/src/skins/vector/views/organisms/RoomView.js b/src/skins/vector/views/organisms/RoomView.js index dfab5b67..2169fb4f 100644 --- a/src/skins/vector/views/organisms/RoomView.js +++ b/src/skins/vector/views/organisms/RoomView.js @@ -29,9 +29,6 @@ var filesize = require('filesize'); var GeminiScrollbar = require('react-gemini-scrollbar'); var RoomViewController = require('../../../../controllers/organisms/RoomView') -var Loader = require("react-loader"); - - module.exports = React.createClass({ displayName: 'RoomView', mixins: [RoomViewController], @@ -133,6 +130,7 @@ module.exports = React.createClass({ var myUserId = MatrixClientPeg.get().credentials.userId; if (this.state.room.currentState.members[myUserId].membership == 'invite') { if (this.state.joining || this.state.rejecting) { + var Loader = sdk.getComponent("atoms.Spinner"); return (
@@ -262,6 +260,7 @@ module.exports = React.createClass({ aux = ; } else if (this.state.uploadingRoomSettings) { + var Loader = sdk.getComponent("atoms.Spinner"); aux = ; } else if (this.state.searching) { diff --git a/src/skins/vector/views/organisms/UserSettings.js b/src/skins/vector/views/organisms/UserSettings.js index 6071f82e..ab376ea4 100644 --- a/src/skins/vector/views/organisms/UserSettings.js +++ b/src/skins/vector/views/organisms/UserSettings.js @@ -19,8 +19,6 @@ var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var UserSettingsController = require('matrix-react-sdk/lib/controllers/organisms/UserSettings') -var Loader = require("react-loader"); - var Modal = require('matrix-react-sdk/lib/Modal'); module.exports = React.createClass({ @@ -68,6 +66,7 @@ module.exports = React.createClass({ }, render: function() { + var Loader = sdk.getComponent("atoms.Spinner"); switch (this.state.phase) { case this.Phases.Loading: return diff --git a/src/skins/vector/views/templates/Login.js b/src/skins/vector/views/templates/Login.js index 50b09178..192645dd 100644 --- a/src/skins/vector/views/templates/Login.js +++ b/src/skins/vector/views/templates/Login.js @@ -21,8 +21,6 @@ var React = require('react'); var sdk = require('matrix-react-sdk') var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); -var Loader = require("react-loader"); - var LoginController = require('matrix-react-sdk/lib/controllers/templates/Login') var config = require('../../../../../config.json'); @@ -158,6 +156,7 @@ module.exports = React.createClass({ }, loginContent: function() { + var Loader = sdk.getComponent("atoms.Spinner"); var loader = this.state.busy ?
: null; return (
diff --git a/src/skins/vector/views/templates/Register.js b/src/skins/vector/views/templates/Register.js index 4490522e..f3c81737 100644 --- a/src/skins/vector/views/templates/Register.js +++ b/src/skins/vector/views/templates/Register.js @@ -21,8 +21,6 @@ var React = require('react'); var sdk = require('matrix-react-sdk') var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg') -var Loader = require("react-loader"); - var RegisterController = require('../../../../controllers/templates/Register') var config = require('../../../../../config.json'); @@ -128,6 +126,7 @@ module.exports = React.createClass({ registerContent: function() { if (this.state.busy) { + var Loader = sdk.getComponent("atoms.Spinner"); return ( );