Browse Source

Reshuffle to put "HTML" (JSX) and CSS together as a theme with logic elsewhere.

pull/1/head
David Baker 7 years ago
parent
commit
a022a4b9a6
  1. 10
      package.json
  2. 40
      src/ComponentBroker.js
  3. 2
      src/controllers/molecules/ProgressBar.js
  4. 2
      src/index.js
  5. 0
      themes/base/css/atoms/MessageTimestamp.css
  6. 0
      themes/base/css/common.css
  7. 0
      themes/base/css/molecules/MNoticeTile.css
  8. 0
      themes/base/css/molecules/MessageComposer.css
  9. 0
      themes/base/css/molecules/MessageTile.css
  10. 0
      themes/base/css/molecules/ProgressBar.css
  11. 0
      themes/base/css/molecules/RoomHeader.css
  12. 0
      themes/base/css/molecules/RoomTile.css
  13. 0
      themes/base/css/molecules/SenderProfile.css
  14. 0
      themes/base/css/organisms/RoomList.css
  15. 0
      themes/base/css/organisms/RoomView.css
  16. 0
      themes/base/css/pages/MatrixChat.css
  17. 0
      themes/base/css/templates/Login.css
  18. 2
      themes/base/views/atoms/LogoutButton.js
  19. 2
      themes/base/views/atoms/MessageTimestamp.js
  20. 2
      themes/base/views/molecules/MEmoteTile.js
  21. 2
      themes/base/views/molecules/MNoticeTile.js
  22. 2
      themes/base/views/molecules/MTextTile.js
  23. 4
      themes/base/views/molecules/MatrixToolbar.js
  24. 2
      themes/base/views/molecules/MemberTile.js
  25. 2
      themes/base/views/molecules/MessageComposer.js
  26. 4
      themes/base/views/molecules/MessageTile.js
  27. 2
      themes/base/views/molecules/ProgressBar.js
  28. 2
      themes/base/views/molecules/RoomHeader.js
  29. 4
      themes/base/views/molecules/RoomTile.js
  30. 2
      themes/base/views/molecules/SenderProfile.js
  31. 2
      themes/base/views/molecules/ServerConfig.js
  32. 2
      themes/base/views/molecules/UnknownMessageTile.js
  33. 4
      themes/base/views/organisms/MemberList.js
  34. 2
      themes/base/views/organisms/RoomList.js
  35. 6
      themes/base/views/organisms/RoomView.js
  36. 4
      themes/base/views/pages/MatrixChat.js
  37. 4
      themes/base/views/templates/Login.js

10
package.json

@ -8,12 +8,12 @@
"url": "https://github.com/matrix-org/matrix-react-sdk"
},
"license": "Apache 2",
"main": "build/index.js",
"main": "src/index.js",
"scripts": {
"build:js": "jsx src/ build",
"start:js": "jsx -w src/ build --source-map-inline",
"build:css": "catw 'css/**/*.css' -o bundle.css -c uglifycss --no-watch",
"start:css": "catw 'css/**/*.css' -o bundle.css -v",
"build:js": "jsx themes/base/views/ build",
"start:js": "jsx -w themes/base/views/ build --source-map-inline",
"build:css": "catw 'themes/base/css/**/*.css' -o bundle.css -c uglifycss --no-watch",
"start:css": "catw 'themes/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'"
},

40
src/ComponentBroker.js

@ -1,7 +1,7 @@
var components = {};
function load(name) {
var module = require("./views/"+name);
var module = require("../themes/base/views/"+name);
components[name] = module;
return module;
};
@ -23,22 +23,22 @@ module.exports = {
// otherwise browserify has no way of knowing what module to include
// Must be in this file (because the require is file-specific) and
// must be at the end because the components include this file.
require('./views/atoms/LogoutButton');
require('./views/atoms/MessageTimestamp');
require('./views/molecules/MatrixToolbar');
require('./views/molecules/RoomTile');
require('./views/molecules/MessageTile');
require('./views/molecules/SenderProfile');
require('./views/molecules/UnknownMessageTile');
require('./views/molecules/MTextTile');
require('./views/molecules/MNoticeTile');
require('./views/molecules/MEmoteTile');
require('./views/molecules/RoomHeader');
require('./views/molecules/MessageComposer');
require('./views/molecules/ProgressBar');
require('./views/molecules/ServerConfig');
require('./views/organisms/MemberList');
require('./views/molecules/MemberTile');
require('./views/organisms/RoomList');
require('./views/organisms/RoomView');
require('./views/templates/Login');
require('../themes/base/views/atoms/LogoutButton');
require('../themes/base/views/atoms/MessageTimestamp');
require('../themes/base/views/molecules/MatrixToolbar');
require('../themes/base/views/molecules/RoomTile');
require('../themes/base/views/molecules/MessageTile');
require('../themes/base/views/molecules/SenderProfile');
require('../themes/base/views/molecules/UnknownMessageTile');
require('../themes/base/views/molecules/MTextTile');
require('../themes/base/views/molecules/MNoticeTile');
require('../themes/base/views/molecules/MEmoteTile');
require('../themes/base/views/molecules/RoomHeader');
require('../themes/base/views/molecules/MessageComposer');
require('../themes/base/views/molecules/ProgressBar');
require('../themes/base/views/molecules/ServerConfig');
require('../themes/base/views/organisms/MemberList');
require('../themes/base/views/molecules/MemberTile');
require('../themes/base/views/organisms/RoomList');
require('../themes/base/views/organisms/RoomView');
require('../themes/base/views/templates/Login');

2
src/controllers/molecules/ProgressBar.js

@ -1,3 +1,5 @@
var React = require('react');
module.exports = {
propTypes: {
value: React.PropTypes.number,

2
src/index.js

@ -1 +1 @@
module.exports.MatrixChat = require("./views/pages/MatrixChat");
module.exports.MatrixChat = require("../themes/base/views/pages/MatrixChat");

0
css/atoms/MessageTimestamp.css → themes/base/css/atoms/MessageTimestamp.css

0
css/common.css → themes/base/css/common.css

0
css/molecules/MNoticeTile.css → themes/base/css/molecules/MNoticeTile.css

0
css/molecules/MessageComposer.css → themes/base/css/molecules/MessageComposer.css

0
css/molecules/MessageTile.css → themes/base/css/molecules/MessageTile.css

0
css/molecules/ProgressBar.css → themes/base/css/molecules/ProgressBar.css

0
css/molecules/RoomHeader.css → themes/base/css/molecules/RoomHeader.css

0
css/molecules/RoomTile.css → themes/base/css/molecules/RoomTile.css

0
css/molecules/SenderProfile.css → themes/base/css/molecules/SenderProfile.css

0
css/organisms/RoomList.css → themes/base/css/organisms/RoomList.css

0
css/organisms/RoomView.css → themes/base/css/organisms/RoomView.css

0
css/pages/MatrixChat.css → themes/base/css/pages/MatrixChat.css

0
css/templates/Login.css → themes/base/css/templates/Login.css

2
src/views/atoms/LogoutButton.js → themes/base/views/atoms/LogoutButton.js

@ -1,6 +1,6 @@
var React = require('react');
var LogoutButtonController = require("../../controllers/atoms/LogoutButton");
var LogoutButtonController = require("../../../../src/controllers/atoms/LogoutButton");
module.exports = React.createClass({
displayName: 'LogoutButton',

2
src/views/atoms/MessageTimestamp.js → themes/base/views/atoms/MessageTimestamp.js

@ -1,6 +1,6 @@
var React = require('react');
var MessageTimestampController = require("../../controllers/atoms/MessageTimestamp");
var MessageTimestampController = require("../../../../src/controllers/atoms/MessageTimestamp");
module.exports = React.createClass({
displayName: 'MessageTimestamp',

2
src/views/molecules/MEmoteTile.js → themes/base/views/molecules/MEmoteTile.js

@ -1,6 +1,6 @@
var React = require('react');
var MEmoteTileController = require("../../controllers/molecules/MEmoteTile");
var MEmoteTileController = require("../../../../src/controllers/molecules/MEmoteTile");
module.exports = React.createClass({
displayName: 'MEmoteTile',

2
src/views/molecules/MNoticeTile.js → themes/base/views/molecules/MNoticeTile.js

@ -1,6 +1,6 @@
var React = require('react');
var MNoticeTileController = require("../../controllers/molecules/MNoticeTile");
var MNoticeTileController = require("../../../../src/controllers/molecules/MNoticeTile");
module.exports = React.createClass({
displayName: 'MNoticeTile',

2
src/views/molecules/MTextTile.js → themes/base/views/molecules/MTextTile.js

@ -1,6 +1,6 @@
var React = require('react');
var MTextTileController = require("../../controllers/molecules/MTextTile");
var MTextTileController = require("../../../../src/controllers/molecules/MTextTile");
module.exports = React.createClass({
displayName: 'MTextTile',

4
src/views/molecules/MatrixToolbar.js → themes/base/views/molecules/MatrixToolbar.js

@ -1,10 +1,10 @@
var React = require('react');
var ComponentBroker = require('../../ComponentBroker');
var ComponentBroker = require('../../../../src/ComponentBroker');
var LogoutButton = ComponentBroker.get("atoms/LogoutButton");
var MatrixToolbarController = require("../../controllers/molecules/MatrixToolbar");
var MatrixToolbarController = require("../../../../src/controllers/molecules/MatrixToolbar");
module.exports = React.createClass({
displayName: 'MatrixToolbar',

2
src/views/molecules/MemberTile.js → themes/base/views/molecules/MemberTile.js

@ -1,6 +1,6 @@
var React = require('react');
var MemberTileController = require("../../controllers/molecules/MemberTile");
var MemberTileController = require("../../../../src/controllers/molecules/MemberTile");
module.exports = React.createClass({
displayName: 'MemberTile',

2
src/views/molecules/MessageComposer.js → themes/base/views/molecules/MessageComposer.js

@ -1,6 +1,6 @@
var React = require('react');
var MessageComposerController = require("../../controllers/molecules/MessageComposer");
var MessageComposerController = require("../../../../src/controllers/molecules/MessageComposer");
module.exports = React.createClass({
displayName: 'MessageComposer',

4
src/views/molecules/MessageTile.js → themes/base/views/molecules/MessageTile.js

@ -2,7 +2,7 @@ var React = require('react');
var classNames = require("classnames");
var ComponentBroker = require('../../ComponentBroker');
var ComponentBroker = require('../../../../src/ComponentBroker');
var MessageTimestamp = ComponentBroker.get('atoms/MessageTimestamp');
var SenderProfile = ComponentBroker.get('molecules/SenderProfile');
@ -15,7 +15,7 @@ var tileTypes = {
'm.emote': ComponentBroker.get('molecules/MEmoteTile')
};
var MessageTileController = require("../../controllers/molecules/MessageTile");
var MessageTileController = require("../../../../src/controllers/molecules/MessageTile");
module.exports = React.createClass({
displayName: 'MessageTile',

2
src/views/molecules/ProgressBar.js → themes/base/views/molecules/ProgressBar.js

@ -1,6 +1,6 @@
var React = require('react');
var ProgressBarController = require("./../molecules/ProgressBar");
var ProgressBarController = require("../../../../src/controllers/molecules/ProgressBar");
module.exports = React.createClass({
displayName: 'ProgressBar',

2
src/views/molecules/RoomHeader.js → themes/base/views/molecules/RoomHeader.js

@ -1,6 +1,6 @@
var React = require('react');
var RoomHeaderController = require("../../controllers/molecules/RoomHeader");
var RoomHeaderController = require("../../../../src/controllers/molecules/RoomHeader");
module.exports = React.createClass({
displayName: 'RoomHeader',

4
src/views/molecules/RoomTile.js → themes/base/views/molecules/RoomTile.js

@ -1,9 +1,9 @@
var React = require('react');
var classNames = require('classnames');
var RoomTileController = require("../../controllers/molecules/RoomTile");
var RoomTileController = require("../../../../src/controllers/molecules/RoomTile");
var MatrixClientPeg = require("../../MatrixClientPeg");
var MatrixClientPeg = require("../../../../src/MatrixClientPeg");
module.exports = React.createClass({
displayName: 'RoomTile',

2
src/views/molecules/SenderProfile.js → themes/base/views/molecules/SenderProfile.js

@ -1,6 +1,6 @@
var React = require('react');
var SenderProfileController = require("../../controllers/molecules/SenderProfile");
var SenderProfileController = require("../../../../src/controllers/molecules/SenderProfile");
module.exports = React.createClass({
displayName: 'SenderProfile',

2
src/views/molecules/ServerConfig.js → themes/base/views/molecules/ServerConfig.js

@ -1,6 +1,6 @@
var React = require('react');
var ServerConfigController = require("../../controllers/molecules/ServerConfig");
var ServerConfigController = require("../../../../src/controllers/molecules/ServerConfig");
module.exports = React.createClass({
displayName: 'ServerConfig',

2
src/views/molecules/UnknownMessageTile.js → themes/base/views/molecules/UnknownMessageTile.js

@ -1,6 +1,6 @@
var React = require('react');
var UnknownMessageTileController = require("../../controllers/molecules/UnknownMessageTile");
var UnknownMessageTileController = require("../../../../src/controllers/molecules/UnknownMessageTile");
module.exports = React.createClass({
displayName: 'UnknownMessageTile',

4
src/views/organisms/MemberList.js → themes/base/views/organisms/MemberList.js

@ -1,8 +1,8 @@
var React = require('react');
var MemberListController = require("../../controllers/organisms/MemberList");
var MemberListController = require("../../../../src/controllers/organisms/MemberList");
var ComponentBroker = require('../../ComponentBroker');
var ComponentBroker = require('../../../../src/ComponentBroker');
var MemberTile = ComponentBroker.get("molecules/MemberTile");

2
src/views/organisms/RoomList.js → themes/base/views/organisms/RoomList.js

@ -1,6 +1,6 @@
var React = require('react');
var RoomListController = require("../../controllers/organisms/RoomList");
var RoomListController = require("../../../../src/controllers/organisms/RoomList");
module.exports = React.createClass({

6
src/views/organisms/RoomView.js → themes/base/views/organisms/RoomView.js

@ -1,15 +1,15 @@
var React = require('react');
var MatrixClientPeg = require("../../MatrixClientPeg");
var MatrixClientPeg = require("../../../../src/MatrixClientPeg");
var ComponentBroker = require('../../ComponentBroker');
var ComponentBroker = require('../../../../src/ComponentBroker');
var MessageTile = ComponentBroker.get('molecules/MessageTile');
var RoomHeader = ComponentBroker.get('molecules/RoomHeader');
var MemberList = ComponentBroker.get('organisms/MemberList');
var MessageComposer = ComponentBroker.get('molecules/MessageComposer');
var RoomViewController = require("../../controllers/organisms/RoomView");
var RoomViewController = require("../../../../src/controllers/organisms/RoomView");
var Loader = require("react-loader");

4
src/views/pages/MatrixChat.js → themes/base/views/pages/MatrixChat.js

@ -1,12 +1,12 @@
var React = require('react');
var ComponentBroker = require('../../ComponentBroker');
var ComponentBroker = require('../../../../src/ComponentBroker');
var RoomList = ComponentBroker.get('organisms/RoomList');
var RoomView = ComponentBroker.get('organisms/RoomView');
var MatrixToolbar = ComponentBroker.get('molecules/MatrixToolbar');
var Login = ComponentBroker.get('templates/Login');
var MatrixChatController = require("../../controllers/pages/MatrixChat");
var MatrixChatController = require("../../../../src/controllers/pages/MatrixChat");
// should be atomised
var Loader = require("react-loader");

4
src/views/templates/Login.js → themes/base/views/templates/Login.js

@ -1,11 +1,11 @@
var React = require('react');
var ComponentBroker = require("../../ComponentBroker");
var ComponentBroker = require("../../../../src/ComponentBroker");
var ProgressBar = ComponentBroker.get("molecules/ProgressBar");
var Loader = require("react-loader");
var LoginController = require("../../controllers/templates/Login");
var LoginController = require("../../../../src/controllers/templates/Login");
module.exports = React.createClass({
displayName: 'Login',
Loading…
Cancel
Save