From 1270bc3c628230bc29be7f7a70a34157b503a53d Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 19 Jun 2015 14:01:17 +0100 Subject: [PATCH] m.notice --- css/molecules/MNoticeTile.css | 3 +++ src/ComponentBroker.js | 1 + src/controllers/molecules/MNoticeTile.js | 2 ++ src/views/molecules/MNoticeTile.js | 17 +++++++++++++++++ src/views/molecules/MessageTile.js | 1 + 5 files changed, 24 insertions(+) create mode 100644 css/molecules/MNoticeTile.css create mode 100644 src/controllers/molecules/MNoticeTile.js create mode 100644 src/views/molecules/MNoticeTile.js diff --git a/css/molecules/MNoticeTile.css b/css/molecules/MNoticeTile.css new file mode 100644 index 00000000..baeeab1c --- /dev/null +++ b/css/molecules/MNoticeTile.css @@ -0,0 +1,3 @@ +.mx_MNoticeTile { + color: #666; +} diff --git a/src/ComponentBroker.js b/src/ComponentBroker.js index 1d524267..7ce0b4b0 100644 --- a/src/ComponentBroker.js +++ b/src/ComponentBroker.js @@ -31,6 +31,7 @@ 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'); diff --git a/src/controllers/molecules/MNoticeTile.js b/src/controllers/molecules/MNoticeTile.js new file mode 100644 index 00000000..7be35b6b --- /dev/null +++ b/src/controllers/molecules/MNoticeTile.js @@ -0,0 +1,2 @@ +module.exports = { +}; diff --git a/src/views/molecules/MNoticeTile.js b/src/views/molecules/MNoticeTile.js new file mode 100644 index 00000000..042f17b9 --- /dev/null +++ b/src/views/molecules/MNoticeTile.js @@ -0,0 +1,17 @@ +var React = require('react'); + +var MNoticeTileController = require("../../controllers/molecules/MNoticeTile"); + +module.exports = React.createClass({ + mixins: [MNoticeTileController], + + render: function() { + var content = this.props.mxEvent.getContent(); + return ( + + {content.body} + + ); + }, +}); + diff --git a/src/views/molecules/MessageTile.js b/src/views/molecules/MessageTile.js index ad1934f2..96218b71 100644 --- a/src/views/molecules/MessageTile.js +++ b/src/views/molecules/MessageTile.js @@ -11,6 +11,7 @@ var UnknownMessageTile = ComponentBroker.get('molecules/UnknownMessageTile'); var tileTypes = { 'm.text': ComponentBroker.get('molecules/MTextTile'), + 'm.notice': ComponentBroker.get('molecules/MNoticeTile'), 'm.emote': ComponentBroker.get('molecules/MEmoteTile') };