very basic redact button on all text messages

This commit is contained in:
Bruno Windels 2021-05-26 13:11:20 +02:00
parent da02b5fe2d
commit 15048bd9c3

View File

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