Move MessageTimestamp

This commit is contained in:
Kegan Dougal 2015-11-26 14:38:48 +00:00
parent f21b6203ed
commit 343670c5c4
4 changed files with 5 additions and 4 deletions

View file

@ -25,6 +25,7 @@ var skin = {};
// Vector-specific stuff
skin['elements.Spinner'] = require('../../components/views/elements/Spinner');
skin['messages.MessageTimestamp'] = require('../../components/views/messages/MessageTimestamp');
// TODO: Fix this so matrix-react-sdk stuff is in react SDK skindex
skin['avatars.RoomAvatar'] = require('matrix-react-sdk/lib/components/views/avatars/RoomAvatar');
@ -35,7 +36,7 @@ skin['atoms.EditableText'] = require('./views/atoms/EditableText');
skin['atoms.EnableNotificationsButton'] = require('./views/atoms/EnableNotificationsButton');
skin['atoms.ImageView'] = require('./views/atoms/ImageView');
skin['atoms.LogoutButton'] = require('./views/atoms/LogoutButton');
skin['atoms.MessageTimestamp'] = require('./views/atoms/MessageTimestamp');
skin['atoms.create_room.CreateRoomButton'] = require('./views/atoms/create_room/CreateRoomButton');
skin['atoms.create_room.Presets'] = require('./views/atoms/create_room/Presets');
skin['atoms.create_room.RoomAlias'] = require('./views/atoms/create_room/RoomAlias');

View file

@ -1,34 +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 DateUtils = require('../../../../DateUtils');
module.exports = React.createClass({
displayName: 'MessageTimestamp',
render: function() {
var date = new Date(this.props.ts);
return (
<span className="mx_MessageTimestamp">
{ DateUtils.formatDate(date) }
</span>
);
},
});

View file

@ -209,7 +209,7 @@ module.exports = React.createClass({
},
render: function() {
var MessageTimestamp = sdk.getComponent('atoms.MessageTimestamp');
var MessageTimestamp = sdk.getComponent('messages.MessageTimestamp');
var SenderProfile = sdk.getComponent('molecules.SenderProfile');
var MemberAvatar = sdk.getComponent('avatars.MemberAvatar');

View file

@ -33,7 +33,7 @@ module.exports = React.createClass({
var timestamp = this.props.last ? <MessageTimestamp ts={this.props.mxEvent.getTs()} /> : null;
var text = this.getMemberEventText();
if (!text) return <div/>;
var MessageTimestamp = sdk.getComponent('atoms.MessageTimestamp');
var MessageTimestamp = sdk.getComponent('messages.MessageTimestamp');
var MemberAvatar = sdk.getComponent('avatars.MemberAvatar');
return (
<div className="mx_MessageTile mx_MessageTile_notice">