feat: update ui

This commit is contained in:
reya
2024-07-28 20:23:54 +07:00
parent fe0864c0ee
commit c791ea802c
9 changed files with 178 additions and 50 deletions

View File

@@ -63,9 +63,17 @@ try {
else return { status: "error", error: e as any };
}
},
async getInboxes(id: string) : Promise<Result<string[], string>> {
async connectInbox(id: string) : Promise<Result<string[], string>> {
try {
return { status: "ok", data: await TAURI_INVOKE("get_inboxes", { id }) };
return { status: "ok", data: await TAURI_INVOKE("connect_inbox", { id }) };
} catch (e) {
if(e instanceof Error) throw e;
else return { status: "error", error: e as any };
}
},
async disconnectInbox(id: string) : Promise<Result<null, string>> {
try {
return { status: "ok", data: await TAURI_INVOKE("disconnect_inbox", { id }) };
} catch (e) {
if(e instanceof Error) throw e;
else return { status: "error", error: e as any };