diff --git a/.gitignore b/.gitignore index 1917768116..491fc35975 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ node_modules -build -bundle.css -bundle.js +lib diff --git a/examples/custom/CustomMTextTile.js b/examples/custom/CustomMTextTile.js deleted file mode 100644 index e58ed4c1e6..0000000000 --- a/examples/custom/CustomMTextTile.js +++ /dev/null @@ -1,40 +0,0 @@ -/* -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'; - -var React = require('react'); - -var MTextTileController = require("matrix-react-sdk/src/controllers/molecules/MTextTile"); - -module.exports = React.createClass({ - displayName: 'MTextTile', - mixins: [MTextTileController], - - render: function() { - var content = this.props.mxEvent.getContent(); - return ( - - {content.body} - - ); - }, - - onClick: function(ev) { - global.alert(this.props.mxEvent.getContent().body); - } -}); - diff --git a/examples/custom/README.md b/examples/custom/README.md deleted file mode 100644 index 8125053ce0..0000000000 --- a/examples/custom/README.md +++ /dev/null @@ -1,4 +0,0 @@ -matrix-react-example -==================== - -An example of how to use the Matrix React SDK to build a more customised app diff --git a/examples/custom/index.html b/examples/custom/index.html deleted file mode 100644 index 04c1645c8a..0000000000 --- a/examples/custom/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Matrix React SDK Custom Example - - -
- - - - diff --git a/examples/custom/index.js b/examples/custom/index.js deleted file mode 100644 index 66602a0ada..0000000000 --- a/examples/custom/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/* -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'; - -// Remember to make your project depend on react directly as soon as -// you add a require('react') to any file in your project. Do not rely -// on react being pulled in via matrix-react-sdk: browserify breaks -// horribly in this situation and can end up pulling in multiple copies -// of react. -var React = require("react"); - -// We pull in the component broker first, separately, as we need to replace -// components before the SDK loads. -var ComponentBroker = require("matrix-react-sdk/src/ComponentBroker"); - -var CustomMTextTile = require('./CustomMTextTile'); - -ComponentBroker.set('molecules/MTextTile', CustomMTextTile); - -var MatrixReactSdk = require("matrix-react-sdk"); -//var MatrixReactSdk = require("../../src/index"); - -React.render( - , - document.getElementById('matrixchat') -); diff --git a/examples/custom/package.json b/examples/custom/package.json deleted file mode 100644 index 6acec803fa..0000000000 --- a/examples/custom/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "matrix-react-example", - "version": "0.0.1", - "description": "Example usage of matrix-react-sdk", - "author": "matrix.org", - "repository": { - "type": "git", - "url": "https://github.com/matrix-org/matrix-react-sdk" - }, - "license": "Apache-2.0", - "devDependencies": { - "browserify": "^10.2.3", - "envify": "^3.4.0", - "http-server": "^0.8.0", - "matrix-react-sdk": "../../", - "npm-css": "^0.2.3", - "parallelshell": "^1.2.0", - "reactify": "^1.1.1", - "uglify-js": "^2.4.23", - "watchify": "^3.2.1" - }, - "scripts": { - "build": "browserify -t [ envify --NODE_ENV production ] -g reactify index.js | uglifyjs -c -m -o bundle.js", - "start": "parallelshell 'watchify -v -d -g reactify index.js -o bundle.js' 'http-server'" - }, - "dependencies": { - "react": "^0.13.3" - } -} diff --git a/examples/trivial/README.md b/examples/trivial/README.md deleted file mode 100644 index ac26627732..0000000000 --- a/examples/trivial/README.md +++ /dev/null @@ -1,4 +0,0 @@ -matrix-react-example -==================== - -A simple example of how to use the Matrix React SDK diff --git a/examples/trivial/index.html b/examples/trivial/index.html deleted file mode 100644 index 4ec5b9093a..0000000000 --- a/examples/trivial/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Matrix React SDK Example - - -
- - - - diff --git a/examples/trivial/index.js b/examples/trivial/index.js deleted file mode 100644 index 2be9054954..0000000000 --- a/examples/trivial/index.js +++ /dev/null @@ -1,75 +0,0 @@ -/* -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'; - -var React = require("react"); -// In normal usage of the module: -//var MatrixReactSdk = require("matrix-react-sdk"); -// Or to import the source directly from the file system: -// (This is useful for debugging the SDK as it seems source -// maps cannot pass through two stages). -var MatrixReactSdk = require("../../src/index"); - -// Here, we do some crude URL analysis to allow -// deep-linking. We only support registration -// deep-links in this example. -function routeUrl(location) { - if (location.hash.indexOf('#/register') == 0) { - var hashparts = location.hash.split('?'); - var params = {}; - if (hashparts.length == 2) { - var pairs = hashparts[1].split('&'); - for (var i = 0; i < pairs.length; ++i) { - var parts = pairs[i].split('='); - if (parts.length != 2) continue; - params[decodeURIComponent(parts[0])] = decodeURIComponent(parts[1]); - } - } - window.matrixChat.showScreen('register', params); - } -} - -var loaded = false; - -window.onload = function() { - routeUrl(window.location); - loaded = true; -} - -// This will be called whenever the SDK changes screens, -// so a web page can update the URL bar appropriately. -var onNewScreen = function(screen) { - if (!loaded) return; - window.location.hash = '#/'+screen; -} - -// We use this to work out what URL the SDK should -// pass through when registering to allow the user to -// click back to the client having registered. -// It's up to us to recognise if we're loaded with -// this URL and tell MatrixClient to resume registration. -var makeRegistrationUrl = function() { - return window.location.protocol + '//' + - window.location.host + - window.location.pathname + - '#/register'; -} - -window.matrixChat = React.render( - , - document.getElementById('matrixchat') -); diff --git a/examples/trivial/package.json b/examples/trivial/package.json deleted file mode 100644 index 40a7150731..0000000000 --- a/examples/trivial/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "matrix-react-example", - "version": "0.0.1", - "description": "Example usage of matrix-react-sdk", - "author": "matrix.org", - "repository": { - "type": "git", - "url": "https://github.com/matrix-org/matrix-react-sdk" - }, - "license": "Apache-2.0", - "devDependencies": { - "browserify": "^10.2.3", - "envify": "^3.4.0", - "http-server": "^0.8.0", - "matrix-react-sdk": "../../", - "parallelshell": "^1.2.0", - "reactify": "^1.1.1", - "uglify-js": "^2.4.23", - "watchify": "^3.2.1" - }, - "scripts": { - "build": "browserify --ignore olm -t [ envify --NODE_ENV production ] -t reactify index.js | uglifyjs -c -m -o bundle.js", - "start": "parallelshell 'watchify --ignore olm -v -d -t reactify index.js -o bundle.js' 'http-server'" - } -} diff --git a/package.json b/package.json index 3be42e4541..6ad8475885 100644 --- a/package.json +++ b/package.json @@ -8,17 +8,11 @@ "url": "https://github.com/matrix-org/matrix-react-sdk" }, "license": "Apache-2.0", - "main": "build/src/index.js", - "style": "bundle.css", + "main": "lib/index.js", "scripts": { - "build:skins": "jsx skins build/skins", - "build:logic": "jsx src build/src", - "build:js": "npm run build:skins && npm run build:logic", - "start:js": "jsx -w skins/base/views/ build --source-map-inline", - "build:css": "catw 'skins/base/css/**/*.css' -o bundle.css -c uglifycss --no-watch", - "start:css": "catw 'skins/base/css/**/*.css' -o bundle.css -v", - "build": "npm run build:js && npm run build:css", - "start": "parallelshell 'npm run start:js' 'npm run start:css'", + "build": "jsx src lib", + "start": "jsx -w --source-map-inline src lib", + "clean": "rimraf lib", "prepublish": "npm run build" }, "dependencies": { @@ -28,13 +22,11 @@ "matrix-js-sdk": "0.2.0", "q": "^1.4.1", "react": "^0.13.3", - "react-loader": "^1.4.0", "linkifyjs": "^2.0.0-beta.4" }, "devDependencies": { "catw": "^1.0.1", - "parallelshell": "^1.1.1", "react-tools": "^0.13.3", - "uglifycss": "0.0.15" + "rimraf": "^2.4.3" } } diff --git a/skins/base/css/atoms/MessageTimestamp.css b/skins/base/css/atoms/MessageTimestamp.css deleted file mode 100644 index 62b3065661..0000000000 --- a/skins/base/css/atoms/MessageTimestamp.css +++ /dev/null @@ -1,20 +0,0 @@ -/* -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. -*/ - -.mx_MessageTimestamp { - display: table-cell; - white-space: pre; -} diff --git a/skins/base/css/common.css b/skins/base/css/common.css deleted file mode 100644 index 5153f97065..0000000000 --- a/skins/base/css/common.css +++ /dev/null @@ -1,23 +0,0 @@ -/* -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. -*/ - -body { - font-family: Helvetica, Arial, Sans-Serif; -} - -div.error { - color: red; -} diff --git a/skins/base/css/molecules/MImageTile.css b/skins/base/css/molecules/MImageTile.css deleted file mode 100644 index 775ebca925..0000000000 --- a/skins/base/css/molecules/MImageTile.css +++ /dev/null @@ -1,19 +0,0 @@ -/* -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. -*/ - -.mx_MImageTile { -} - diff --git a/skins/base/css/molecules/MNoticeTile.css b/skins/base/css/molecules/MNoticeTile.css deleted file mode 100644 index cac13e9b89..0000000000 --- a/skins/base/css/molecules/MNoticeTile.css +++ /dev/null @@ -1,18 +0,0 @@ -/* -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. -*/ - -.mx_MNoticeTile { -} diff --git a/skins/base/css/molecules/MTextTile.css b/skins/base/css/molecules/MTextTile.css deleted file mode 100644 index 5b117e41b8..0000000000 --- a/skins/base/css/molecules/MTextTile.css +++ /dev/null @@ -1,20 +0,0 @@ -/* -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. -*/ - -.mx_MTextTile { - white-space: pre-wrap; -} - diff --git a/skins/base/css/molecules/MessageComposer.css b/skins/base/css/molecules/MessageComposer.css deleted file mode 100644 index 829e25a938..0000000000 --- a/skins/base/css/molecules/MessageComposer.css +++ /dev/null @@ -1,20 +0,0 @@ -/* -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. -*/ - -.mx_MessageComposer textarea { - width: 100%; - margin: auto; -} diff --git a/skins/base/css/molecules/MessageTile.css b/skins/base/css/molecules/MessageTile.css deleted file mode 100644 index dae12e1a2b..0000000000 --- a/skins/base/css/molecules/MessageTile.css +++ /dev/null @@ -1,35 +0,0 @@ -/* -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. -*/ - -.mx_MessageTile { - display: table-row; -} - -.mx_MessageTile_content { - display: table-cell; -} - -.mx_MessageTile_sending { - color: #ddd; -} - -.mx_MessageTile_notSent { - color: #f11; -} - -.mx_MessageTile_highlight { - color: #00f; -} diff --git a/skins/base/css/molecules/ProgressBar.css b/skins/base/css/molecules/ProgressBar.css deleted file mode 100644 index 8b8adc09c1..0000000000 --- a/skins/base/css/molecules/ProgressBar.css +++ /dev/null @@ -1,25 +0,0 @@ -/* -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. -*/ - -.mx_ProgressBar { - height: 5px; - border: 1px solid black; -} - -.mx_ProgressBar_fill { - height: 100%; - background-color: #000; -} diff --git a/skins/base/css/molecules/RoomHeader.css b/skins/base/css/molecules/RoomHeader.css deleted file mode 100644 index 63d6fc33fb..0000000000 --- a/skins/base/css/molecules/RoomHeader.css +++ /dev/null @@ -1,20 +0,0 @@ -/* -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. -*/ - -.mx_RoomHeader { - height: 1em; - padding: 0px; -} diff --git a/skins/base/css/molecules/RoomTile.css b/skins/base/css/molecules/RoomTile.css deleted file mode 100644 index 719551cb57..0000000000 --- a/skins/base/css/molecules/RoomTile.css +++ /dev/null @@ -1,47 +0,0 @@ -/* -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. -*/ - -.mx_RoomTile { - padding: 5px; - cursor: pointer; -} - -.mx_RoomTile.selected { - text-decoration: underline; -} - -.mx_RoomTile_name { -} - -.mx_RoomTile div { - overflow: hidden; - text-overflow: ellipsis; -} - -.mx_RoomTile.unread { - font-weight: bold; -} - -.mx_RoomTile.highlight { - background-color: lime; -} - -.mx_RoomTile.invited { - font-weight: bold; -} - -.mx_RoomTile:hover { -} diff --git a/skins/base/css/molecules/SenderProfile.css b/skins/base/css/molecules/SenderProfile.css deleted file mode 100644 index 549b598458..0000000000 --- a/skins/base/css/molecules/SenderProfile.css +++ /dev/null @@ -1,20 +0,0 @@ -/* -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. -*/ - -.mx_SenderProfile { - display: table-cell; - padding: 0px 1em 0em 1em; -} diff --git a/skins/base/css/organisms/RoomList.css b/skins/base/css/organisms/RoomList.css deleted file mode 100644 index e2dec3c9fd..0000000000 --- a/skins/base/css/organisms/RoomList.css +++ /dev/null @@ -1,18 +0,0 @@ -/* -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. -*/ - -.mx_RoomList { -} diff --git a/skins/base/css/organisms/RoomView.css b/skins/base/css/organisms/RoomView.css deleted file mode 100644 index 0c75f8fad4..0000000000 --- a/skins/base/css/organisms/RoomView.css +++ /dev/null @@ -1,86 +0,0 @@ -/* -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. -*/ - -.mx_RoomView { - word-wrap: break-word; - position: relative; -} - -.mx_RoomView .mx_RoomHeader { - height: 30px; -} - -.mx_RoomView_roomWrapper { - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; - position: absolute; - width: 100%; - top: 32px; - bottom: 0px; -} - -.mx_RoomView_messagePanel { - -webkit-box-ordinal-group: 1; - -moz-box-ordinal-group: 1; - -ms-flex-order: 1; - -webkit-order: 1; - order: 1; - width: 100%; - height: 100%; - /* background-color: #ff0; */ -} - -.mx_RoomView_messageListWrapper { - height: 100%; - overflow-y: scroll; -} - -.mx_RoomView_MessageList { - display: table; -} - -.mx_RoomView_MessageList_ul { - list-style-type: none; -} - -.mx_RoomView_invitePrompt { -} - -.mx_RoomView .mx_MemberList { - -webkit-box-ordinal-group: 2; - -moz-box-ordinal-group: 2; - -ms-flex-order: 2; - -webkit-order: 2; - order: 2; - - /* background-color: #0f0; */ - width: 250px; - overflow-y: scroll; - height: 100%; -} - -.mx_RoomView .mx_MemberList ul { - margin: 0px; - padding: 0px; -} - -.mx_RoomView .mx_MessageComposer { - width: 100%; - bottom: 0px; -} diff --git a/skins/base/css/pages/MatrixChat.css b/skins/base/css/pages/MatrixChat.css deleted file mode 100644 index 7ce88ec7ff..0000000000 --- a/skins/base/css/pages/MatrixChat.css +++ /dev/null @@ -1,89 +0,0 @@ -/* -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. -*/ - -.mx_MatrixChat { - position: relative; - width: 100%; - height: 100%; -} - -.mx_MatrixChat_chatWrapper { - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; - position: absolute; - width: 100%; - top: 0px; - bottom: 42px; -} - -.mx_MatrixChat_leftPanel { - -webkit-box-ordinal-group: 1; - -moz-box-ordinal-group: 1; - -ms-flex-order: 1; - -webkit-order: 1; - order: 1; - - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; - flex-direction: column; - -webkit-flex-direction: column; - - /* background-color: #f00; */ - width: 250px; - height: 100%; -} - -.mx_MatrixChat_leftPanel .mx_MatrixToolbar { - -webkit-box-ordinal-group: 1; - -moz-box-ordinal-group: 1; - -ms-flex-order: 1; - -webkit-order: 1; - order: 1; - - width: 100%; - height: 40px; -} - -.mx_MatrixChat_leftPanel .mx_RoomList { - -webkit-box-ordinal-group: 2; - -moz-box-ordinal-group: 2; - -ms-flex-order: 2; - -webkit-order: 2; - order: 2; - - /* background-color: #0ff; */ - width: 100%; - height: 100%; - overflow-y: scroll; -} - -.mx_MatrixChat .mx_RoomView { - -webkit-box-ordinal-group: 2; - -moz-box-ordinal-group: 2; - -ms-flex-order: 2; - -webkit-order: 2; - order: 2; - - /* background-color: #00f; */ - width: 100%; - height: 100%; -} diff --git a/skins/base/css/templates/Login.css b/skins/base/css/templates/Login.css deleted file mode 100644 index 7dbcde1caa..0000000000 --- a/skins/base/css/templates/Login.css +++ /dev/null @@ -1,22 +0,0 @@ -/* -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. -*/ - -.mx_Login { - width: 600px; - height: 350px; - position: relative; -} - diff --git a/skins/base/views/atoms/EditableText.js b/skins/base/views/atoms/EditableText.js deleted file mode 100644 index a8f55814e7..0000000000 --- a/skins/base/views/atoms/EditableText.js +++ /dev/null @@ -1,68 +0,0 @@ -/* -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'; - -var React = require('react'); - -var EditableTextController = require("../../../../src/controllers/atoms/EditableText"); - -module.exports = React.createClass({ - displayName: 'EditableText', - mixins: [EditableTextController], - - onKeyUp: function(ev) { - if (ev.key == "Enter") { - this.onFinish(ev); - } else if (ev.key == "Escape") { - this.cancelEdit(); - } - }, - - onClickDiv: function() { - this.setState({ - phase: this.Phases.Edit, - }) - }, - - onFocus: function(ev) { - ev.target.setSelectionRange(0, ev.target.value.length); - }, - - onFinish: function(ev) { - this.setValue(ev.target.value); - }, - - render: function() { - var editable_el; - - if (this.state.phase == this.Phases.Display) { - editable_el =
{this.state.value}
; - } else if (this.state.phase == this.Phases.Edit) { - editable_el = ( -
- -
- ); - } - - return ( -
- {editable_el} -
- ); - } -}); diff --git a/skins/base/views/atoms/EnableNotificationsButton.js b/skins/base/views/atoms/EnableNotificationsButton.js deleted file mode 100644 index 7caebb76c5..0000000000 --- a/skins/base/views/atoms/EnableNotificationsButton.js +++ /dev/null @@ -1,38 +0,0 @@ -/* -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'; - -var React = require('react'); - -var EnableNotificationsButtonController = require("../../../../src/controllers/atoms/EnableNotificationsButton"); - -module.exports = React.createClass({ - displayName: 'EnableNotificationsButton', - mixins: [EnableNotificationsButtonController], - - render: function() { - if (this.enabled()) { - return ( - - ); - } else { - return ( - - ); - } - } -}); diff --git a/skins/base/views/atoms/LogoutButton.js b/skins/base/views/atoms/LogoutButton.js deleted file mode 100644 index 8cc5b27d5e..0000000000 --- a/skins/base/views/atoms/LogoutButton.js +++ /dev/null @@ -1,32 +0,0 @@ -/* -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'; - -var React = require('react'); - -var LogoutButtonController = require("../../../../src/controllers/atoms/LogoutButton"); - -module.exports = React.createClass({ - displayName: 'LogoutButton', - mixins: [LogoutButtonController], - - render: function() { - return ( - - ); - } -}); diff --git a/skins/base/views/atoms/MessageTimestamp.js b/skins/base/views/atoms/MessageTimestamp.js deleted file mode 100644 index 52eb1462eb..0000000000 --- a/skins/base/views/atoms/MessageTimestamp.js +++ /dev/null @@ -1,36 +0,0 @@ -/* -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'; - -var React = require('react'); - -var MessageTimestampController = require("../../../../src/controllers/atoms/MessageTimestamp"); - -module.exports = React.createClass({ - displayName: 'MessageTimestamp', - mixins: [MessageTimestampController], - - render: function() { - var date = new Date(this.props.ts); - return ( - - {date.toLocaleTimeString()} - - ); - }, -}); - diff --git a/skins/base/views/atoms/create_room/CreateRoomButton.js b/skins/base/views/atoms/create_room/CreateRoomButton.js deleted file mode 100644 index 2f9ccae030..0000000000 --- a/skins/base/views/atoms/create_room/CreateRoomButton.js +++ /dev/null @@ -1,32 +0,0 @@ -/* -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'; - -var React = require('react'); - -var CreateRoomButtonController = require("../../../../../src/controllers/atoms/create_room/CreateRoomButton"); - -module.exports = React.createClass({ - displayName: 'CreateRoomButton', - mixins: [CreateRoomButtonController], - - render: function() { - return ( - - ); - } -}); diff --git a/skins/base/views/atoms/create_room/Presets.js b/skins/base/views/atoms/create_room/Presets.js deleted file mode 100644 index 83fe61bdbb..0000000000 --- a/skins/base/views/atoms/create_room/Presets.js +++ /dev/null @@ -1,39 +0,0 @@ -/* -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'; - -var React = require('react'); - -var PresetsController = require("../../../../../src/controllers/atoms/create_room/Presets"); - -module.exports = React.createClass({ - displayName: 'CreateRoomPresets', - mixins: [PresetsController], - - onValueChanged: function(ev) { - this.setState({preset: ev.target.value}) - }, - - render: function() { - return ( - - ); - } -}); diff --git a/skins/base/views/atoms/create_room/RoomNameTextbox.js b/skins/base/views/atoms/create_room/RoomNameTextbox.js deleted file mode 100644 index c358a14cb3..0000000000 --- a/skins/base/views/atoms/create_room/RoomNameTextbox.js +++ /dev/null @@ -1,36 +0,0 @@ -/* -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'; - -var React = require('react'); - -var RoomNameTextboxController = require("../../../../../src/controllers/atoms/create_room/RoomNameTextbox"); - -module.exports = React.createClass({ - displayName: 'RoomNameTextbox', - mixins: [RoomNameTextboxController], - - onValueChanged: function(ev) { - this.setState({room_name: ev.target.value}) - }, - - render: function() { - return ( - - ); - } -}); diff --git a/skins/base/views/molecules/MEmoteTile.js b/skins/base/views/molecules/MEmoteTile.js deleted file mode 100644 index e1b5045db7..0000000000 --- a/skins/base/views/molecules/MEmoteTile.js +++ /dev/null @@ -1,38 +0,0 @@ -/* -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'; - -var React = require('react'); - -var MEmoteTileController = require("../../../../src/controllers/molecules/MEmoteTile"); - -module.exports = React.createClass({ - displayName: 'MEmoteTile', - mixins: [MEmoteTileController], - - render: function() { - var mxEvent = this.props.mxEvent; - var content = mxEvent.getContent(); - var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender(); - return ( -
  • - * {name} {content.body} -
  • - ); - }, -}); - diff --git a/skins/base/views/molecules/MFileTile.js b/skins/base/views/molecules/MFileTile.js deleted file mode 100644 index 7685fc75e0..0000000000 --- a/skins/base/views/molecules/MFileTile.js +++ /dev/null @@ -1,41 +0,0 @@ -/* -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'; - -var React = require('react'); - -var MFileTileController = require("../../../../src/controllers/molecules/MFileTile"); - -var MatrixClientPeg = require('../../../../src/MatrixClientPeg'); - -module.exports = React.createClass({ - displayName: 'MFileTile', - mixins: [MFileTileController], - - render: function() { - var content = this.props.mxEvent.getContent(); - var cli = MatrixClientPeg.get(); - - return ( -
  • - - {this.presentableTextForFile(content)} - -
  • - ); - }, -}); diff --git a/skins/base/views/molecules/MImageTile.js b/skins/base/views/molecules/MImageTile.js deleted file mode 100644 index 97cefc538e..0000000000 --- a/skins/base/views/molecules/MImageTile.js +++ /dev/null @@ -1,69 +0,0 @@ -/* -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'; - -var React = require('react'); - -var MImageTileController = require("../../../../src/controllers/molecules/MImageTile"); - -var MatrixClientPeg = require('../../../../src/MatrixClientPeg'); - -module.exports = React.createClass({ - displayName: 'MImageTile', - mixins: [MImageTileController], - - thumbHeight: function(fullWidth, fullHeight, thumbWidth, thumbHeight) { - if (!fullWidth || !fullHeight) { - // Cannot calculate thumbnail height for image: missing w/h in metadata. We can't even - // log this because it's spammy - return undefined; - } - if (fullWidth < thumbWidth && fullHeight < thumbHeight) { - // no scaling needs to be applied - return fullHeight; - } - var widthMulti = thumbWidth / fullWidth; - var heightMulti = thumbHeight / fullHeight; - if (widthMulti < heightMulti) { - // width is the dominant dimension so scaling will be fixed on that - return Math.floor(widthMulti * fullHeight); - } - else { - // height is the dominant dimension so scaling will be fixed on that - return Math.floor(heightMulti * fullHeight); - } - }, - - render: function() { - var content = this.props.mxEvent.getContent(); - var cli = MatrixClientPeg.get(); - - var thumbHeight = null; - if (content.info) thumbHeight = this.thumbHeight(content.info.w, content.info.h, 320, 240); - - var imgStyle = {}; - if (thumbHeight) imgStyle['height'] = thumbHeight; - - return ( -
  • - - {content.body} - -
  • - ); - }, -}); diff --git a/skins/base/views/molecules/MNoticeTile.js b/skins/base/views/molecules/MNoticeTile.js deleted file mode 100644 index f63a8c2cea..0000000000 --- a/skins/base/views/molecules/MNoticeTile.js +++ /dev/null @@ -1,36 +0,0 @@ -/* -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'; - -var React = require('react'); - -var MNoticeTileController = require("../../../../src/controllers/molecules/MNoticeTile"); - -module.exports = React.createClass({ - displayName: 'MNoticeTile', - mixins: [MNoticeTileController], - - render: function() { - var content = this.props.mxEvent.getContent(); - return ( - - {content.body} - - ); - }, -}); - diff --git a/skins/base/views/molecules/MRoomMemberTile.js b/skins/base/views/molecules/MRoomMemberTile.js deleted file mode 100644 index f0755e2614..0000000000 --- a/skins/base/views/molecules/MRoomMemberTile.js +++ /dev/null @@ -1,57 +0,0 @@ -/* -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'; - -var React = require('react'); - -var MRoomMemberTileController = require("../../../../src/controllers/molecules/MRoomMemberTile"); - -var ComponentBroker = require('../../../../src/ComponentBroker'); -var MessageTimestamp = ComponentBroker.get('atoms/MessageTimestamp'); - -module.exports = React.createClass({ - displayName: 'MRoomMemberTile', - mixins: [MRoomMemberTileController], - - getMemberEventText: function() { - var ev = this.props.mxEvent; - // XXX: SYJS-16 - var senderName = ev.sender ? ev.sender.name : "Someone"; - switch (ev.getContent().membership) { - case 'invite': - return senderName + " invited " + ev.target.name + "."; - case 'join': - return senderName + " joined the room."; - case 'leave': - return senderName + " left the room."; - } - }, - - render: function() { - // XXX: for now, just cheekily borrow the css from message tile... - return ( -
    - - - - {this.getMemberEventText()} - -
    - ); - }, -}); - diff --git a/skins/base/views/molecules/MTextTile.js b/skins/base/views/molecules/MTextTile.js deleted file mode 100644 index d08f42ed9a..0000000000 --- a/skins/base/views/molecules/MTextTile.js +++ /dev/null @@ -1,36 +0,0 @@ -/* -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'; - -var React = require('react'); - -var MTextTileController = require("../../../../src/controllers/molecules/MTextTile"); - -module.exports = React.createClass({ - displayName: 'MTextTile', - mixins: [MTextTileController], - - render: function() { - var content = this.props.mxEvent.getContent(); - return ( - - {content.body} - - ); - }, -}); - diff --git a/skins/base/views/molecules/MatrixToolbar.js b/skins/base/views/molecules/MatrixToolbar.js deleted file mode 100644 index e4444ee9c8..0000000000 --- a/skins/base/views/molecules/MatrixToolbar.js +++ /dev/null @@ -1,41 +0,0 @@ -/* -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'; - -var React = require('react'); - -var ComponentBroker = require('../../../../src/ComponentBroker'); - -var LogoutButton = ComponentBroker.get("atoms/LogoutButton"); -var EnableNotificationsButton = ComponentBroker.get("atoms/EnableNotificationsButton"); - -var MatrixToolbarController = require("../../../../src/controllers/molecules/MatrixToolbar"); - -module.exports = React.createClass({ - displayName: 'MatrixToolbar', - mixins: [MatrixToolbarController], - - render: function() { - return ( -
    - - -
    - ); - } -}); - diff --git a/skins/base/views/molecules/MemberTile.js b/skins/base/views/molecules/MemberTile.js deleted file mode 100644 index 60d1cadd84..0000000000 --- a/skins/base/views/molecules/MemberTile.js +++ /dev/null @@ -1,33 +0,0 @@ -/* -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'; - -var React = require('react'); - -var MemberTileController = require("../../../../src/controllers/molecules/MemberTile"); - -module.exports = React.createClass({ - displayName: 'MemberTile', - mixins: [MemberTileController], - render: function() { - return ( -
    -
    {this.props.member.name}
    -
    - ); - } -}); diff --git a/skins/base/views/molecules/MessageComposer.js b/skins/base/views/molecules/MessageComposer.js deleted file mode 100644 index 89c426cb2b..0000000000 --- a/skins/base/views/molecules/MessageComposer.js +++ /dev/null @@ -1,35 +0,0 @@ -/* -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'; - -var React = require('react'); - -var MessageComposerController = require("../../../../src/controllers/molecules/MessageComposer"); - -module.exports = React.createClass({ - displayName: 'MessageComposer', - mixins: [MessageComposerController], - - render: function() { - return ( -
    -