mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-23 02:31: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;
|
return this.sender;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove?
|
|
||||||
get date() {
|
|
||||||
return this._date && this._date.toLocaleDateString({}, {month: "numeric", day: "numeric"});
|
|
||||||
}
|
|
||||||
|
|
||||||
get time() {
|
get time() {
|
||||||
return this._date && this.timeFormatter.formatTime(this._date);
|
return this._date && this.timeFormatter.formatTime(this._date);
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ export class BaseMediaView extends BaseMessageView {
|
|||||||
const children = [
|
const children = [
|
||||||
t.div({className: "spacer", style: spacerStyle}),
|
t.div({className: "spacer", style: spacerStyle}),
|
||||||
this.renderMedia(t, vm),
|
this.renderMedia(t, vm),
|
||||||
t.time(vm.date + " " + vm.time),
|
t.time(vm.time),
|
||||||
];
|
];
|
||||||
const status = t.div({
|
const status = t.div({
|
||||||
className: {
|
className: {
|
||||||
|
@ -24,7 +24,7 @@ export class FileView extends BaseMessageView {
|
|||||||
} else {
|
} else {
|
||||||
children.push(
|
children.push(
|
||||||
t.button({className: "link", onClick: () => vm.download()}, vm => vm.label),
|
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);
|
return t.p({className: "Timeline_messageBody statusMessage"}, children);
|
||||||
|
@ -21,7 +21,7 @@ export class LocationView extends BaseMessageView {
|
|||||||
return t.p({className: "Timeline_messageBody statusMessage"}, [
|
return t.p({className: "Timeline_messageBody statusMessage"}, [
|
||||||
t.span(vm.label),
|
t.span(vm.label),
|
||||||
t.a({className: "Timeline_locationLink", href: vm.mapsLink, target: "_blank", rel: "noopener"}, vm.i18n`Open in maps`),
|
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 {
|
export class TextMessageView extends BaseMessageView {
|
||||||
renderMessageBody(t, vm) {
|
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({
|
const container = t.div({
|
||||||
className: {
|
className: {
|
||||||
"Timeline_messageBody": true,
|
"Timeline_messageBody": true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user