remove date from message tiles

This commit is contained in:
Bruno Windels 2022-11-25 16:48:46 +01:00
parent 77fd7e7aca
commit efa45cade6
5 changed files with 4 additions and 9 deletions

View File

@ -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);
}

View File

@ -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: {

View File

@ -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);

View File

@ -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)
]);
}
}

View File

@ -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,