- );
- },
-});
diff --git a/src/skins/vector/views/molecules/MEmoteTile.js b/src/skins/vector/views/molecules/MEmoteTile.js
deleted file mode 100644
index de2d9365..00000000
--- a/src/skins/vector/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('matrix-react-sdk/lib/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/src/skins/vector/views/molecules/MFileTile.js b/src/skins/vector/views/molecules/MFileTile.js
deleted file mode 100644
index 9180bd6b..00000000
--- a/src/skins/vector/views/molecules/MFileTile.js
+++ /dev/null
@@ -1,54 +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('matrix-react-sdk/lib/controllers/molecules/MFileTile')
-
-var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
-
-module.exports = React.createClass({
- displayName: 'MFileTile',
- mixins: [MFileTileController],
-
- render: function() {
- var content = this.props.mxEvent.getContent();
- var cli = MatrixClientPeg.get();
-
- var httpUrl = cli.mxcUrlToHttp(content.url);
- var text = this.presentableTextForFile(content);
-
- if (httpUrl) {
- return (
-
-
-
- );
- } else if (content.body) {
- return (
-
- Image '{content.body}' cannot be displayed.
-
- );
- } else {
- return (
-
- This image cannot be displayed.
-
- );
- }
- },
-});
diff --git a/src/skins/vector/views/molecules/MNoticeTile.js b/src/skins/vector/views/molecules/MNoticeTile.js
deleted file mode 100644
index c905d3be..00000000
--- a/src/skins/vector/views/molecules/MNoticeTile.js
+++ /dev/null
@@ -1,56 +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 HtmlUtils = require('../../../../HtmlUtils');
-
-var MNoticeTileController = require('matrix-react-sdk/lib/controllers/molecules/MNoticeTile')
-
-module.exports = React.createClass({
- displayName: 'MNoticeTile',
- mixins: [MNoticeTileController],
-
- componentDidMount: function() {
- if (this.props.mxEvent.getContent().format === "org.matrix.custom.html")
- HtmlUtils.highlightDom(this.getDOMNode());
- },
-
- componentDidUpdate: function() {
- if (this.props.mxEvent.getContent().format === "org.matrix.custom.html")
- HtmlUtils.highlightDom(this.getDOMNode());
- },
-
- shouldComponentUpdate: function(nextProps) {
- // exploit that events are immutable :)
- return (nextProps.mxEvent.getId() !== this.props.mxEvent.getId() ||
- nextProps.searchTerm !== this.props.searchTerm);
- },
-
- // XXX: fix horrible duplication with MTextTile
- render: function() {
- var content = this.props.mxEvent.getContent();
- var body = HtmlUtils.bodyToHtml(content, this.props.searchTerm);
-
- return (
-
- { body }
-
- );
- },
-});
-
diff --git a/src/skins/vector/views/molecules/MTextTile.js b/src/skins/vector/views/molecules/MTextTile.js
deleted file mode 100644
index 8352ae5c..00000000
--- a/src/skins/vector/views/molecules/MTextTile.js
+++ /dev/null
@@ -1,55 +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 HtmlUtils = require('../../../../HtmlUtils');
-
-var MTextTileController = require('matrix-react-sdk/lib/controllers/molecules/MTextTile')
-
-module.exports = React.createClass({
- displayName: 'MTextTile',
- mixins: [MTextTileController],
-
- componentDidMount: function() {
- if (this.props.mxEvent.getContent().format === "org.matrix.custom.html")
- HtmlUtils.highlightDom(this.getDOMNode());
- },
-
- componentDidUpdate: function() {
- if (this.props.mxEvent.getContent().format === "org.matrix.custom.html")
- HtmlUtils.highlightDom(this.getDOMNode());
- },
-
- shouldComponentUpdate: function(nextProps) {
- // exploit that events are immutable :)
- return (nextProps.mxEvent.getId() !== this.props.mxEvent.getId() ||
- nextProps.searchTerm !== this.props.searchTerm);
- },
-
- render: function() {
- var content = this.props.mxEvent.getContent();
- var body = HtmlUtils.bodyToHtml(content, this.props.searchTerm);
-
- return (
-
- { body }
-
- );
- },
-});
-
diff --git a/src/skins/vector/views/molecules/MVideoTile.js b/src/skins/vector/views/molecules/MVideoTile.js
deleted file mode 100644
index ec7ac6f8..00000000
--- a/src/skins/vector/views/molecules/MVideoTile.js
+++ /dev/null
@@ -1,83 +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 filesize = require('filesize');
-
-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({
- displayName: 'MVideoTile',
-
- thumbScale: 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 widthMulti;
- }
- else {
- // height is the dominant dimension so scaling will be fixed on that
- return heightMulti;
- }
- },
-
- render: function() {
- var content = this.props.mxEvent.getContent();
- var cli = MatrixClientPeg.get();
-
- var height = null;
- var width = null;
- var poster = null;
- var preload = "metadata";
- if (content.info) {
- var scale = this.thumbScale(content.info.w, content.info.h, 480, 360);
- if (scale) {
- width = Math.floor(content.info.w * scale);
- height = Math.floor(content.info.h * scale);
- }
-
- if (content.info.thumbnail_url) {
- poster = cli.mxcUrlToHttp(content.info.thumbnail_url);
- preload = "none";
- }
- }
-
-
-
- return (
-
-
-
- );
- },
-});
diff --git a/src/skins/vector/views/molecules/MessageTile.js b/src/skins/vector/views/molecules/MessageTile.js
deleted file mode 100644
index 4b63e971..00000000
--- a/src/skins/vector/views/molecules/MessageTile.js
+++ /dev/null
@@ -1,56 +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 sdk = require('matrix-react-sdk')
-
-var MessageTileController = require('matrix-react-sdk/lib/controllers/molecules/MessageTile')
-
-module.exports = React.createClass({
- displayName: 'MessageTile',
- mixins: [MessageTileController],
-
- statics: {
- needsSenderProfile: function() {
- return true;
- }
- },
-
- render: function() {
- var UnknownMessageTile = sdk.getComponent('molecules.UnknownMessageTile');
-
- var tileTypes = {
- 'm.text': sdk.getComponent('molecules.MTextTile'),
- 'm.notice': sdk.getComponent('molecules.MNoticeTile'),
- 'm.emote': sdk.getComponent('molecules.MEmoteTile'),
- 'm.image': sdk.getComponent('molecules.MImageTile'),
- 'm.file': sdk.getComponent('molecules.MFileTile'),
- 'm.video': sdk.getComponent('molecules.MVideoTile')
- };
-
- var content = this.props.mxEvent.getContent();
- var msgtype = content.msgtype;
- var TileType = UnknownMessageTile;
- if (msgtype && tileTypes[msgtype]) {
- TileType = tileTypes[msgtype];
- }
-
- return ;
- },
-});
diff --git a/src/skins/vector/views/molecules/UnknownMessageTile.js b/src/skins/vector/views/molecules/UnknownMessageTile.js
deleted file mode 100644
index e8cd322a..00000000
--- a/src/skins/vector/views/molecules/UnknownMessageTile.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');
-
-module.exports = React.createClass({
- displayName: 'UnknownMessageTile',
-
- render: function() {
- var content = this.props.mxEvent.getContent();
- return (
-
- {content.body}
-
- );
- },
-});