diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 34938251..7aa4068e 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -5,7 +5,6 @@ use keyring::Entry; use std::time::Duration; -use tauri::Manager; use tauri_plugin_autostart::MacosLauncher; use tauri_plugin_sql::{Migration, MigrationKind}; use webpage::{Webpage, WebpageOptions}; @@ -149,12 +148,6 @@ fn main() { MacosLauncher::LaunchAgent, Some(vec!["--flag1", "--flag2"]), )) - .plugin(tauri_plugin_single_instance::init(|app, argv, cwd| { - println!("{}, {argv:?}, {cwd}", app.package_info().name); - app - .emit_all("single-instance", Payload { args: argv, cwd }) - .unwrap(); - })) .plugin(tauri_plugin_upload::init()) .plugin(tauri_plugin_store::Builder::default().build()) .invoke_handler(tauri::generate_handler![ diff --git a/src/app.tsx b/src/app.tsx index 62edb50a..80c86abb 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -110,6 +110,13 @@ export default function App() { }, ], }, + { + path: 'personal', + async lazy() { + const { PersonalScreen } = await import('@app/personal'); + return { Component: PersonalScreen }; + }, + }, ], }, { diff --git a/src/app/personal/index.tsx b/src/app/personal/index.tsx new file mode 100644 index 00000000..c6dc0404 --- /dev/null +++ b/src/app/personal/index.tsx @@ -0,0 +1,9 @@ +import { useStorage } from '@libs/storage/provider'; + +import { UserProfile } from '@shared/userProfile'; + +export function PersonalScreen() { + const { db } = useStorage(); + + return
; +} diff --git a/src/app/users/components/profile.tsx b/src/app/users/components/profile.tsx index c92fe0c8..cbca16e0 100644 --- a/src/app/users/components/profile.tsx +++ b/src/app/users/components/profile.tsx @@ -1,4 +1,6 @@ import { NDKEvent, NDKKind, NDKUser } from '@nostr-dev-kit/ndk'; +import * as Avatar from '@radix-ui/react-avatar'; +import { minidenticon } from 'minidenticons'; import { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; import { toast } from 'sonner'; @@ -9,7 +11,6 @@ import { UserStats } from '@app/users/components/stats'; import { useNDK } from '@libs/ndk/provider'; import { useStorage } from '@libs/storage/provider'; -import { Image } from '@shared/image'; import { NIP05 } from '@shared/nip05'; import { useProfile } from '@utils/hooks/useProfile'; @@ -22,6 +23,9 @@ export function UserProfile({ pubkey }: { pubkey: string }) { const [followed, setFollowed] = useState(false); + const svgURI = + 'data:image/svg+xml;utf8,' + encodeURIComponent(minidenticon(pubkey, 90, 50)); + const follow = async (pubkey: string) => { try { const user = ndk.getUser({ hexpubkey: db.account.pubkey }); @@ -85,11 +89,23 @@ export function UserProfile({ pubkey }: { pubkey: string }) { )}