improving context menus

This commit is contained in:
MathMan05 2025-01-16 22:15:11 -06:00
parent ec08cdfde0
commit 3d06440053
10 changed files with 404 additions and 251 deletions

View file

@ -342,28 +342,28 @@ class Group extends Channel {
user: User;
static contextmenu = new Contextmenu<Group, undefined>("channel menu");
static setupcontextmenu() {
this.contextmenu.addbutton(
this.contextmenu.addButton(
() => I18n.getTranslation("DMs.copyId"),
function (this: Group) {
navigator.clipboard.writeText(this.id);
},
);
this.contextmenu.addbutton(
this.contextmenu.addButton(
() => I18n.getTranslation("DMs.markRead"),
function (this: Group) {
this.readbottom();
},
);
this.contextmenu.addbutton(
this.contextmenu.addButton(
() => I18n.getTranslation("DMs.close"),
function (this: Group) {
this.deleteChannel();
},
);
this.contextmenu.addbutton(
this.contextmenu.addButton(
() => I18n.getTranslation("user.copyId"),
function () {
navigator.clipboard.writeText(this.user.id);