feat: use native context menu in tray panel
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user