From 2e439fce0ecaadf80e61306a4e0f59b7d6663cb7 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Wed, 19 Aug 2026 14:13:53 -0400 Subject: [PATCH 1/2] Fixed bugs --- src-tauri/src/commands/accounts.rs | 1 + src-tauri/src/commands/server_list.rs | 3 +-- src/app/app.ts | 10 +++++++--- src/components/view/{serverList.tsx => ServerList.tsx} | 0 src/components/view/Sidebar.tsx | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) rename src/components/view/{serverList.tsx => ServerList.tsx} (100%) diff --git a/src-tauri/src/commands/accounts.rs b/src-tauri/src/commands/accounts.rs index 18043f1..a6862e8 100644 --- a/src-tauri/src/commands/accounts.rs +++ b/src-tauri/src/commands/accounts.rs @@ -22,6 +22,7 @@ fn accounts_file_path(app: &AppHandle) -> Result { .path() .app_data_dir() .map_err(|e| format!("Failed to resolve app data dir: {e}"))?; + fs::create_dir_all(&dir).map_err(|e| format!("Failed to create app data dir: {e}"))?; Ok(dir.join("accounts.json")) } diff --git a/src-tauri/src/commands/server_list.rs b/src-tauri/src/commands/server_list.rs index 4907159..e66e0ab 100644 --- a/src-tauri/src/commands/server_list.rs +++ b/src-tauri/src/commands/server_list.rs @@ -41,10 +41,9 @@ pub fn save_server_list(app: AppHandle, servers: ServerList) -> Result<(), Strin #[tauri::command] pub fn get_server_list(app: AppHandle) -> Result { let path = servers_file_path(&app)?; + println!("{path:?}"); if !path.exists() { - fs::write(&path, "[]").map_err(|e| format!("Failed to write first server list: {e}"))?; - return Ok(ServerList::new()); } diff --git a/src/app/app.ts b/src/app/app.ts index 62f033d..98eb5b2 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -66,10 +66,14 @@ export default class Enclave { } if ( - this.serverList[hostname]?.publicKey !== - base58.encode(this.server.serverPublicKey) + this.serverList[hostname] && + this.serverList[hostname].publicKey !== + base58.encode(this.server.serverPublicKey) ) { - console.error("Server's new public key doesn't match old one"); + console.error("Server's new public key doesn't match old one", { + old: this.serverList[hostname].publicKey, + new: base58.encode(this.server.serverPublicKey), + }); return; } diff --git a/src/components/view/serverList.tsx b/src/components/view/ServerList.tsx similarity index 100% rename from src/components/view/serverList.tsx rename to src/components/view/ServerList.tsx diff --git a/src/components/view/Sidebar.tsx b/src/components/view/Sidebar.tsx index a76b0f7..5c959f5 100644 --- a/src/components/view/Sidebar.tsx +++ b/src/components/view/Sidebar.tsx @@ -43,9 +43,9 @@ export function RenderCategory({ channel }: { channel: Channel }) { export function RenderChannels({ channels }: { channels: Channel[] }) { return channels.map((channel) => channel.kind === "category" ? ( - + ) : ( -
+
{channel.name}
From 994e126a7dcf2bb72e411b5589ddb2e1225a1de1 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Wed, 19 Aug 2026 14:18:10 -0400 Subject: [PATCH 2/2] Fixed account card name --- src/components/view/AccountCard.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/view/AccountCard.tsx b/src/components/view/AccountCard.tsx index 2fefd43..2961dd7 100644 --- a/src/components/view/AccountCard.tsx +++ b/src/components/view/AccountCard.tsx @@ -18,14 +18,14 @@ export default function AccountCard({ return (
-
+
{account.displayName[0]} -
+
{ navigator.clipboard.writeText( base58.encode( @@ -34,13 +34,13 @@ export default function AccountCard({ ); }} > - {account.displayName} +

{account.displayName}

Online
-
+