feat: add editor

This commit is contained in:
2024-01-04 08:52:45 +07:00
parent ba13ac7535
commit f4cbcee8b4
24 changed files with 713 additions and 37 deletions

View File

@@ -11,6 +11,7 @@ import { appConfigDir, resolveResource } from "@tauri-apps/api/path";
import { Platform } from "@tauri-apps/plugin-os";
import { Child, Command } from "@tauri-apps/plugin-shell";
import Database from "@tauri-apps/plugin-sql";
import { nip19 } from "nostr-tools";
export class LumeStorage {
#db: Database;
@@ -226,9 +227,10 @@ export class LumeStorage {
if (!results.length) return [];
const users: NDKCacheUserProfile[] = results.map((item) => ({
pubkey: item.pubkey,
npub: nip19.npubEncode(item.pubkey),
...JSON.parse(item.profile as string),
}));
return users;
}

View File

@@ -12,6 +12,7 @@
"@tauri-apps/plugin-os": "2.0.0-alpha.6",
"@tauri-apps/plugin-shell": "2.0.0-alpha.5",
"@tauri-apps/plugin-sql": "2.0.0-alpha.5",
"nostr-tools": "1.17",
"react": "^18.2.0"
},
"devDependencies": {