mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
very basic redact button on all text messages
This commit is contained in:
parent
da02b5fe2d
commit
15048bd9c3
@ -22,8 +22,9 @@ import {renderMessage} from "./common.js";
|
||||
export class TextMessageView extends TemplateView {
|
||||
render(t, vm) {
|
||||
const bodyView = t.mapView(vm => vm.body, body => new BodyView(body));
|
||||
const redactButton = t.button({onClick: () => vm.redact()}, "Redact");
|
||||
return renderMessage(t, vm,
|
||||
[t.p([bodyView, t.time({className: {hidden: !vm.date}}, vm.date + " " + vm.time)])]
|
||||
[t.p([bodyView, redactButton, t.time({className: {hidden: !vm.date}}, vm.date + " " + vm.time)])]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user