very basic redact button on all text messages
This commit is contained in:
parent
da02b5fe2d
commit
15048bd9c3
1 changed files with 2 additions and 1 deletions
|
@ -22,8 +22,9 @@ import {renderMessage} from "./common.js";
|
||||||
export class TextMessageView extends TemplateView {
|
export class TextMessageView extends TemplateView {
|
||||||
render(t, vm) {
|
render(t, vm) {
|
||||||
const bodyView = t.mapView(vm => vm.body, body => new BodyView(body));
|
const bodyView = t.mapView(vm => vm.body, body => new BodyView(body));
|
||||||
|
const redactButton = t.button({onClick: () => vm.redact()}, "Redact");
|
||||||
return renderMessage(t, vm,
|
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)])]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue