mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-22 18:21:39 +01:00
remove date from message tiles
This commit is contained in:
parent
77fd7e7aca
commit
efa45cade6
@ -78,11 +78,6 @@ export class BaseMessageTile extends SimpleTile {
|
||||
return this.sender;
|
||||
}
|
||||
|
||||
// TODO: remove?
|
||||
get date() {
|
||||
return this._date && this._date.toLocaleDateString({}, {month: "numeric", day: "numeric"});
|
||||
}
|
||||
|
||||
get time() {
|
||||
return this._date && this.timeFormatter.formatTime(this._date);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ export class BaseMediaView extends BaseMessageView {
|
||||
const children = [
|
||||
t.div({className: "spacer", style: spacerStyle}),
|
||||
this.renderMedia(t, vm),
|
||||
t.time(vm.date + " " + vm.time),
|
||||
t.time(vm.time),
|
||||
];
|
||||
const status = t.div({
|
||||
className: {
|
||||
|
@ -24,7 +24,7 @@ export class FileView extends BaseMessageView {
|
||||
} else {
|
||||
children.push(
|
||||
t.button({className: "link", onClick: () => vm.download()}, vm => vm.label),
|
||||
t.time(vm.date + " " + vm.time)
|
||||
t.time(vm.time)
|
||||
);
|
||||
}
|
||||
return t.p({className: "Timeline_messageBody statusMessage"}, children);
|
||||
|
@ -21,7 +21,7 @@ export class LocationView extends BaseMessageView {
|
||||
return t.p({className: "Timeline_messageBody statusMessage"}, [
|
||||
t.span(vm.label),
|
||||
t.a({className: "Timeline_locationLink", href: vm.mapsLink, target: "_blank", rel: "noopener"}, vm.i18n`Open in maps`),
|
||||
t.time(vm.date + " " + vm.time)
|
||||
t.time(vm.time)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ import {ReplyPreviewError, ReplyPreviewView} from "./ReplyPreviewView.js";
|
||||
|
||||
export class TextMessageView extends BaseMessageView {
|
||||
renderMessageBody(t, vm) {
|
||||
const time = t.time({className: {hidden: !vm.date}}, vm.date + " " + vm.time);
|
||||
const time = t.time({className: {hidden: !vm.time}}, vm.time);
|
||||
const container = t.div({
|
||||
className: {
|
||||
"Timeline_messageBody": true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user