feat: Add support for NIP-51 (#236)

* feat: and follow and interest sets

* feat: improve query

* feat: improve
This commit is contained in:
雨宮蓮
2024-10-07 14:33:20 +07:00
committed by GitHub
parent d841163ba7
commit 090a815f99
37 changed files with 1500 additions and 765 deletions

View File

@@ -1,6 +1,7 @@
import { commands } from "@/commands.gen";
import type { LumeColumn, NostrEvent } from "@/types";
import { getCurrentWindow } from "@tauri-apps/api/window";
import { nanoid } from "nanoid";
import type { LumeEvent } from "./event";
export const LumeWindow = {
@@ -150,8 +151,22 @@ export const LumeWindow = {
throw new Error(query.error);
}
},
openMainWindow: async () => {
const query = await commands.reopenLume();
return query;
openPopup: async (title: string, url: string) => {
const query = await commands.openWindow({
label: `popup-${nanoid()}`,
url,
title,
width: 400,
height: 500,
maximizable: false,
minimizable: false,
hidden_title: false,
});
if (query.status === "ok") {
return query.data;
} else {
throw new Error(query.error);
}
},
};