feat: use native context menu in tray panel

This commit is contained in:
reya
2024-06-18 09:07:58 +07:00
parent d01cf8319d
commit 0061ecea78
5 changed files with 106 additions and 16 deletions

View File

@@ -401,6 +401,9 @@ try {
},
async setBadge(count: number) : Promise<void> {
await TAURI_INVOKE("set_badge", { count });
},
async openMainWindow() : Promise<void> {
await TAURI_INVOKE("open_main_window");
}
}

View File

@@ -3,6 +3,16 @@ import type { LumeEvent } from "./event";
import { commands } from "./commands";
export class LumeWindow {
static async openMainWindow() {
const query = await commands.openMainWindow();
if (query.status === "ok") {
return query.data;
} else {
throw new Error(query.error);
}
}
static async openEvent(event: NostrEvent | LumeEvent) {
const eTags = event.tags.filter((tag) => tag[0] === "e" || tag[0] === "q");
const root: string =