diff --git a/src/Avatar.js b/src/Avatar.js index bdfc20ca..9889b480 100644 --- a/src/Avatar.js +++ b/src/Avatar.js @@ -16,7 +16,7 @@ limitations under the License. 'use strict'; -var MatrixClientPeg = require('./MatrixClientPeg'); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); module.exports = { avatarUrlForMember: function(member, width, height, resizeMethod) { diff --git a/src/CallHandler.js b/src/CallHandler.js index 025ece38..17754d55 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -53,10 +53,9 @@ limitations under the License. * } */ -var MatrixClientPeg = require("./MatrixClientPeg"); -var Modal = require("./Modal"); -var ComponentBroker = require('./ComponentBroker'); -var ErrorDialog = ComponentBroker.get("organisms/ErrorDialog"); +var MatrixClientPeg = require("matrix-react-sdk/lib/MatrixClientPeg"); +var Modal = require("matrix-react-sdk/lib/Modal"); +var sdk = require('matrix-react-sdk'); var ConferenceCall = require("./ConferenceHandler").ConferenceCall; var ConferenceHandler = require("./ConferenceHandler"); var Matrix = require("matrix-js-sdk"); @@ -118,6 +117,7 @@ function _setCallListeners(call) { _setCallState(call, call.roomId, "busy"); pause("ringbackAudio"); play("busyAudio"); + var ErrorDialog = sdk.getComponent("organisms.ErrorDialog"); Modal.createDialog(ErrorDialog, { title: "Call Timeout", description: "The remote side failed to pick up." @@ -278,4 +278,4 @@ module.exports = { } return null; } -}; \ No newline at end of file +}; diff --git a/src/controllers/atoms/ImageView.js b/src/controllers/atoms/ImageView.js new file mode 100644 index 00000000..d0977e00 --- /dev/null +++ b/src/controllers/atoms/ImageView.js @@ -0,0 +1,20 @@ +/* +Copyright 2015 OpenMarket Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +'use strict'; + +module.exports = { +}; diff --git a/src/skins/vector/views/atoms/ImageView.js b/src/skins/vector/views/atoms/ImageView.js index d5c57141..a0d69bcc 100644 --- a/src/skins/vector/views/atoms/ImageView.js +++ b/src/skins/vector/views/atoms/ImageView.js @@ -18,7 +18,7 @@ limitations under the License. var React = require('react'); -var ImageViewController = require('matrix-react-sdk/lib/controllers/atoms/ImageView') +var ImageViewController = require('../../../../controllers/atoms/ImageView') module.exports = React.createClass({ displayName: 'ImageView', diff --git a/src/skins/vector/views/molecules/BottomLeftMenu.js b/src/skins/vector/views/molecules/BottomLeftMenu.js index be46febc..d7a25221 100644 --- a/src/skins/vector/views/molecules/BottomLeftMenu.js +++ b/src/skins/vector/views/molecules/BottomLeftMenu.js @@ -19,9 +19,9 @@ limitations under the License. var React = require('react'); var classNames = require('classnames'); -var dis = require("../../../../src/dispatcher"); +var dis = require('matrix-react-sdk/lib/dispatcher'); -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); module.exports = React.createClass({ displayName: 'BottomLeftMenu', diff --git a/src/skins/vector/views/molecules/ContextualMenu.js b/src/skins/vector/views/molecules/ContextualMenu.js index 58c542ee..1f0069de 100644 --- a/src/skins/vector/views/molecules/ContextualMenu.js +++ b/src/skins/vector/views/molecules/ContextualMenu.js @@ -19,9 +19,9 @@ limitations under the License. var React = require('react'); var classNames = require('classnames'); -var dis = require("../../../../src/dispatcher"); +var dis = require('matrix-react-sdk/lib/dispatcher'); -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); module.exports = React.createClass({ displayName: 'ContextualMenu', diff --git a/src/skins/vector/views/molecules/EventAsTextTile.js b/src/skins/vector/views/molecules/EventAsTextTile.js index 16a1e613..b9d729eb 100644 --- a/src/skins/vector/views/molecules/EventAsTextTile.js +++ b/src/skins/vector/views/molecules/EventAsTextTile.js @@ -18,12 +18,10 @@ limitations under the License. var React = require('react'); -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var EventAsTextTileController = require('matrix-react-sdk/lib/controllers/molecules/EventAsTextTile') var sdk = require('matrix-react-sdk') -var MessageTimestamp = ComponentBroker.get('atoms/MessageTimestamp'); -var MemberAvatar = ComponentBroker.get('atoms/MemberAvatar'); -var TextForEvent = require("../../../../src/TextForEvent"); +var TextForEvent = require('matrix-react-sdk/lib/TextForEvent'); module.exports = React.createClass({ displayName: 'EventAsTextTile', @@ -36,6 +34,8 @@ module.exports = React.createClass({ var text = TextForEvent.textForEvent(this.props.mxEvent); if (text == null || text.length == 0) return null; + var MessageTimestamp = sdk.getComponent('atoms.MessageTimestamp'); + var MemberAvatar = sdk.getComponent('atoms.MemberAvatar'); var timestamp = this.props.last ? : null; var avatar = this.props.mxEvent.sender ? : null; return ( diff --git a/src/skins/vector/views/molecules/MFileTile.js b/src/skins/vector/views/molecules/MFileTile.js index f0c2ab67..f7e8991f 100644 --- a/src/skins/vector/views/molecules/MFileTile.js +++ b/src/skins/vector/views/molecules/MFileTile.js @@ -20,7 +20,7 @@ var React = require('react'); var MFileTileController = require('matrix-react-sdk/lib/controllers/molecules/MFileTile') -var MatrixClientPeg = require('../../../../src/MatrixClientPeg'); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); module.exports = React.createClass({ displayName: 'MFileTile', diff --git a/src/skins/vector/views/molecules/MImageTile.js b/src/skins/vector/views/molecules/MImageTile.js index ca7b4cb6..63825359 100644 --- a/src/skins/vector/views/molecules/MImageTile.js +++ b/src/skins/vector/views/molecules/MImageTile.js @@ -21,8 +21,8 @@ var filesize = require('filesize'); var MImageTileController = require('matrix-react-sdk/lib/controllers/molecules/MImageTile') -var MatrixClientPeg = require('../../../../src/MatrixClientPeg'); -var Modal = require('../../../../src/Modal'); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); +var Modal = require('matrix-react-sdk/lib/Modal'); var sdk = require('matrix-react-sdk') module.exports = React.createClass({ diff --git a/src/skins/vector/views/molecules/MRoomMemberTile.js b/src/skins/vector/views/molecules/MRoomMemberTile.js index 6e70f496..d20b248e 100644 --- a/src/skins/vector/views/molecules/MRoomMemberTile.js +++ b/src/skins/vector/views/molecules/MRoomMemberTile.js @@ -20,9 +20,9 @@ var React = require('react'); var MRoomMemberTileController = require('matrix-react-sdk/lib/controllers/molecules/MRoomMemberTile') -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var sdk = require('matrix-react-sdk') -var TextForEvent = require('../../../../src/TextForEvent'); +var TextForEvent = require('matrix-react-sdk/lib/TextForEvent'); module.exports = React.createClass({ displayName: 'MRoomMemberTile', diff --git a/src/skins/vector/views/molecules/MemberInfo.js b/src/skins/vector/views/molecules/MemberInfo.js index 6d2d0dd7..cc9a8f2d 100644 --- a/src/skins/vector/views/molecules/MemberInfo.js +++ b/src/skins/vector/views/molecules/MemberInfo.js @@ -18,7 +18,7 @@ limitations under the License. var React = require('react'); -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var MemberInfoController = require('matrix-react-sdk/lib/controllers/molecules/MemberInfo') module.exports = React.createClass({ diff --git a/src/skins/vector/views/molecules/MemberTile.js b/src/skins/vector/views/molecules/MemberTile.js index 0c0181db..30ac6880 100644 --- a/src/skins/vector/views/molecules/MemberTile.js +++ b/src/skins/vector/views/molecules/MemberTile.js @@ -18,10 +18,10 @@ limitations under the License. var React = require('react'); -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var sdk = require('matrix-react-sdk') -var Modal = require("../../../../src/Modal"); -var ContextualMenu = require("../../../../src/ContextualMenu"); +var Modal = require('matrix-react-sdk/lib/Modal'); +var ContextualMenu = require('../../../../ContextualMenu'); var MemberTileController = require('matrix-react-sdk/lib/controllers/molecules/MemberTile') // The Lato WOFF doesn't include sensible combining diacritics, so Chrome chokes on rendering them. diff --git a/src/skins/vector/views/molecules/MessageComposer.js b/src/skins/vector/views/molecules/MessageComposer.js index 6b6eeba9..8b6ff6af 100644 --- a/src/skins/vector/views/molecules/MessageComposer.js +++ b/src/skins/vector/views/molecules/MessageComposer.js @@ -18,9 +18,9 @@ limitations under the License. var React = require('react'); -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var MessageComposerController = require('matrix-react-sdk/lib/controllers/molecules/MessageComposer') -var ContentMessages = require("../../../../src/ContentMessages"); +var ContentMessages = require('matrix-react-sdk/lib/ContentMessages'); var sdk = require('matrix-react-sdk') diff --git a/src/skins/vector/views/molecules/MessageTile.js b/src/skins/vector/views/molecules/MessageTile.js index 09cb0743..357d4bf9 100644 --- a/src/skins/vector/views/molecules/MessageTile.js +++ b/src/skins/vector/views/molecules/MessageTile.js @@ -20,7 +20,7 @@ var React = require('react'); var classNames = require("classnames"); -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var sdk = require('matrix-react-sdk') var MessageTileController = require('matrix-react-sdk/lib/controllers/molecules/MessageTile') diff --git a/src/skins/vector/views/molecules/RoomCreate.js b/src/skins/vector/views/molecules/RoomCreate.js index bb824578..d4541f42 100644 --- a/src/skins/vector/views/molecules/RoomCreate.js +++ b/src/skins/vector/views/molecules/RoomCreate.js @@ -21,7 +21,7 @@ var classNames = require('classnames'); //var RoomCreateController = require('matrix-react-sdk/lib/controllers/molecules/RoomCreateController') -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); module.exports = React.createClass({ displayName: 'RoomCreate', diff --git a/src/skins/vector/views/molecules/RoomDropTarget.js b/src/skins/vector/views/molecules/RoomDropTarget.js index ac9c8d44..c3e8aa1f 100644 --- a/src/skins/vector/views/molecules/RoomDropTarget.js +++ b/src/skins/vector/views/molecules/RoomDropTarget.js @@ -21,7 +21,7 @@ var classNames = require('classnames'); //var RoomDropTargetController = require('matrix-react-sdk/lib/controllers/molecules/RoomDropTargetController') -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); module.exports = React.createClass({ displayName: 'RoomDropTarget', diff --git a/src/skins/vector/views/molecules/RoomHeader.js b/src/skins/vector/views/molecules/RoomHeader.js index 02b2ea33..f7d3fe7e 100644 --- a/src/skins/vector/views/molecules/RoomHeader.js +++ b/src/skins/vector/views/molecules/RoomHeader.js @@ -19,7 +19,7 @@ limitations under the License. var React = require('react'); var sdk = require('matrix-react-sdk') -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var RoomHeaderController = require('matrix-react-sdk/lib/controllers/molecules/RoomHeader') module.exports = React.createClass({ diff --git a/src/skins/vector/views/molecules/RoomSettings.js b/src/skins/vector/views/molecules/RoomSettings.js index 05bdae8f..d6d36a13 100644 --- a/src/skins/vector/views/molecules/RoomSettings.js +++ b/src/skins/vector/views/molecules/RoomSettings.js @@ -17,7 +17,7 @@ limitations under the License. 'use strict'; var React = require('react'); -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var RoomSettingsController = require('matrix-react-sdk/lib/controllers/molecules/RoomSettings') diff --git a/src/skins/vector/views/molecules/RoomTile.js b/src/skins/vector/views/molecules/RoomTile.js index d1ac3750..61fa0021 100644 --- a/src/skins/vector/views/molecules/RoomTile.js +++ b/src/skins/vector/views/molecules/RoomTile.js @@ -21,7 +21,7 @@ var classNames = require('classnames'); var RoomTileController = require('matrix-react-sdk/lib/controllers/molecules/RoomTile') -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var sdk = require('matrix-react-sdk') diff --git a/src/skins/vector/views/molecules/ServerConfig.js b/src/skins/vector/views/molecules/ServerConfig.js index d2dd23b6..e48487ae 100644 --- a/src/skins/vector/views/molecules/ServerConfig.js +++ b/src/skins/vector/views/molecules/ServerConfig.js @@ -17,7 +17,7 @@ limitations under the License. 'use strict'; var React = require('react'); -var Modal = require('../../../../src/Modal'); +var Modal = require('matrix-react-sdk/lib/Modal'); var sdk = require('matrix-react-sdk') var ServerConfigController = require('matrix-react-sdk/lib/controllers/molecules/ServerConfig') diff --git a/src/skins/vector/views/molecules/voip/CallView.js b/src/skins/vector/views/molecules/voip/CallView.js index b55f7b0d..b674fe2c 100644 --- a/src/skins/vector/views/molecules/voip/CallView.js +++ b/src/skins/vector/views/molecules/voip/CallView.js @@ -18,7 +18,7 @@ limitations under the License. var React = require('react'); -var MatrixClientPeg = require("../../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var sdk = require('matrix-react-sdk') var CallViewController = require( "matrix-react-sdk/lib/controllers/molecules/voip/CallView" diff --git a/src/skins/vector/views/molecules/voip/IncomingCallBox.js b/src/skins/vector/views/molecules/voip/IncomingCallBox.js index 5becedb1..ee437f0a 100644 --- a/src/skins/vector/views/molecules/voip/IncomingCallBox.js +++ b/src/skins/vector/views/molecules/voip/IncomingCallBox.js @@ -17,9 +17,9 @@ limitations under the License. 'use strict'; var React = require('react'); -var MatrixClientPeg = require("../../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var IncomingCallBoxController = require( - "../../../../../src/controllers/molecules/voip/IncomingCallBox" + "matrix-react-sdk/lib/controllers/molecules/voip/IncomingCallBox" ); module.exports = React.createClass({ diff --git a/src/skins/vector/views/molecules/voip/VideoView.js b/src/skins/vector/views/molecules/voip/VideoView.js index aa6897eb..d3b8636e 100644 --- a/src/skins/vector/views/molecules/voip/VideoView.js +++ b/src/skins/vector/views/molecules/voip/VideoView.js @@ -18,7 +18,7 @@ limitations under the License. var React = require('react'); -var MatrixClientPeg = require("../../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require("matrix-react-sdk/lib/MatrixClientPeg"); var sdk = require('matrix-react-sdk') var VideoViewController = require('matrix-react-sdk/lib/controllers/molecules/voip/VideoView') diff --git a/src/skins/vector/views/organisms/CreateRoom.js b/src/skins/vector/views/organisms/CreateRoom.js index 82883d1e..64f5b861 100644 --- a/src/skins/vector/views/organisms/CreateRoom.js +++ b/src/skins/vector/views/organisms/CreateRoom.js @@ -22,7 +22,7 @@ var CreateRoomController = require('matrix-react-sdk/lib/controllers/organisms/C var sdk = require('matrix-react-sdk') -var PresetValues = require('../../../../src/controllers/atoms/create_room/Presets').Presets; +var PresetValues = require('matrix-react-sdk/lib/controllers/atoms/create_room/Presets').Presets; var Loader = require("react-loader"); diff --git a/src/skins/vector/views/organisms/Notifier.js b/src/skins/vector/views/organisms/Notifier.js index 8ffc924f..dad456cd 100644 --- a/src/skins/vector/views/organisms/Notifier.js +++ b/src/skins/vector/views/organisms/Notifier.js @@ -18,12 +18,12 @@ limitations under the License. var NotifierController = require('matrix-react-sdk/lib/controllers/organisms/Notifier') -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); -var TextForEvent = require("../../../../src/TextForEvent"); -var extend = require("../../../../src/extend"); -var dis = require("../../../../src/dispatcher"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); +var TextForEvent = require('matrix-react-sdk/lib/TextForEvent'); +var extend = require('matrix-react-sdk/lib/extend'); +var dis = require('matrix-react-sdk/lib/dispatcher'); -var Avatar = require("../../../../src/Avatar"); +var Avatar = require('../../../../Avatar'); var NotifierView = { diff --git a/src/skins/vector/views/organisms/RoomDirectory.js b/src/skins/vector/views/organisms/RoomDirectory.js index 9b7572da..5f5717c8 100644 --- a/src/skins/vector/views/organisms/RoomDirectory.js +++ b/src/skins/vector/views/organisms/RoomDirectory.js @@ -18,10 +18,10 @@ limitations under the License. var React = require('react'); -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); -var Modal = require("../../../../src/Modal"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); +var Modal = require('matrix-react-sdk/lib/Modal'); var sdk = require('matrix-react-sdk') -var dis = require("../../../../src/dispatcher"); +var dis = require('matrix-react-sdk/lib/dispatcher'); var Loader = require("react-loader"); diff --git a/src/skins/vector/views/organisms/RoomView.js b/src/skins/vector/views/organisms/RoomView.js index e791bc12..81f95fd4 100644 --- a/src/skins/vector/views/organisms/RoomView.js +++ b/src/skins/vector/views/organisms/RoomView.js @@ -18,7 +18,7 @@ limitations under the License. var React = require('react'); -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var sdk = require('matrix-react-sdk') var classNames = require("classnames"); diff --git a/src/skins/vector/views/organisms/UserSettings.js b/src/skins/vector/views/organisms/UserSettings.js index 819e3f31..515a71aa 100644 --- a/src/skins/vector/views/organisms/UserSettings.js +++ b/src/skins/vector/views/organisms/UserSettings.js @@ -15,13 +15,13 @@ limitations under the License. var React = require('react'); var sdk = require('matrix-react-sdk') -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +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("../../../../src/Modal"); +var Modal = require('matrix-react-sdk/lib/Modal'); module.exports = React.createClass({ displayName: 'UserSettings', diff --git a/src/skins/vector/views/pages/MatrixChat.js b/src/skins/vector/views/pages/MatrixChat.js index 7fba6c5d..da30dffb 100644 --- a/src/skins/vector/views/pages/MatrixChat.js +++ b/src/skins/vector/views/pages/MatrixChat.js @@ -25,7 +25,7 @@ var MatrixChatController = require('matrix-react-sdk/lib/controllers/pages/Matri var Loader = require("react-loader"); var classNames = require("classnames"); -var dis = require("../../../../src/dispatcher"); +var dis = require('matrix-react-sdk/lib/dispatcher'); module.exports = React.createClass({ diff --git a/src/skins/vector/views/templates/Login.js b/src/skins/vector/views/templates/Login.js index e6e63a14..2a0068f4 100644 --- a/src/skins/vector/views/templates/Login.js +++ b/src/skins/vector/views/templates/Login.js @@ -19,7 +19,7 @@ limitations under the License. var React = require('react'); var sdk = require('matrix-react-sdk') -var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); +var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var Loader = require("react-loader"); diff --git a/vector/fonts b/vector/fonts index 7df9446b..1c206eff 120000 --- a/vector/fonts +++ b/vector/fonts @@ -1 +1 @@ -src/skins/vector/fonts \ No newline at end of file +../src/skins/vector/fonts \ No newline at end of file diff --git a/vector/img b/vector/img index 52ed4fae..8f1382c0 120000 --- a/vector/img +++ b/vector/img @@ -1 +1 @@ -src/skins/vector/img \ No newline at end of file +../src/skins/vector/img \ No newline at end of file