Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
reyamir committed Nov 8, 2024
1 parent 50bf6c0 commit c6da06c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
13 changes: 10 additions & 3 deletions src-tauri/src/commands/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,23 @@ pub async fn connect_account(uri: String, state: State<'_, Nostr>) -> Result<Str
// Handle auth url
nostr_connect.auth_url_handler(AuthHandler);

let bunker_uri = nostr_connect
let keyring = Entry::new("Lume Safe Storage", &remote_npub).map_err(|err| err.to_string())?;

let reuse_bunker = nostr_connect
.bunker_uri()
.await
.map_err(|err| err.to_string())?;

let keyring = Entry::new("Lume Safe Storage", &remote_npub).map_err(|err| err.to_string())?;
let mut reuse_uri = reuse_bunker.to_string();

if let Some(secret) = reuse_bunker.secret() {
let replace = format!("&secret={}", secret);
reuse_uri = reuse_uri.replace(replace.as_str(), "");
}

let account = Account {
secret_key: app_secret,
nostr_connect: Some(bunker_uri.to_string()),
nostr_connect: Some(reuse_uri),
};

// Save secret key to keyring
Expand Down
2 changes: 1 addition & 1 deletion src/routes/columns/_layout/launchpad.$id.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function Newsfeeds() {
: item.tags.find((tag) => tag[0] === "title")?.[1] || "Unnamed";
const label =
item.kind === 3
? `newsfeed-${id.slice(0, 5)}`
? `newsfeed-${item.pubkey.slice(0, 5)}`
: item.tags.find((tag) => tag[0] === "d")?.[1] || nanoid();

return (
Expand Down
6 changes: 3 additions & 3 deletions src/routes/columns/_layout/notification.$id.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,19 @@ function Screen() {
>
<Tabs.List className="h-11 shrink-0 flex items-center">
<Tabs.Trigger
className="flex-1 inline-flex h-11 items-center justify-center gap-2 px-3 text-sm font-medium border-b border-neutral-100 dark:border-neutral-900 data-[state=active]:border-neutral-200 dark:data-[state=active]:border-neutral-800 data-[state=inactive]:opacity-50"
className="flex-1 inline-flex h-11 items-center justify-center gap-2 px-3 text-sm font-medium border-b border-neutral-100 dark:border-neutral-700 data-[state=active]:border-neutral-200 dark:data-[state=active]:border-neutral-600 data-[state=inactive]:opacity-50"
value="replies"
>
Replies
</Tabs.Trigger>
<Tabs.Trigger
className="flex-1 inline-flex h-11 items-center justify-center gap-2 px-3 text-sm font-medium border-b border-neutral-100 dark:border-neutral-900 data-[state=active]:border-neutral-200 dark:data-[state=active]:border-neutral-800 data-[state=inactive]:opacity-50"
className="flex-1 inline-flex h-11 items-center justify-center gap-2 px-3 text-sm font-medium border-b border-neutral-100 dark:border-neutral-700 data-[state=active]:border-neutral-200 dark:data-[state=active]:border-neutral-600 data-[state=inactive]:opacity-50"
value="reactions"
>
Reactions
</Tabs.Trigger>
<Tabs.Trigger
className="flex-1 inline-flex h-11 items-center justify-center gap-2 px-3 text-sm font-medium border-b border-neutral-100 dark:border-neutral-900 data-[state=active]:border-neutral-200 dark:data-[state=active]:border-neutral-800 data-[state=inactive]:opacity-50"
className="flex-1 inline-flex h-11 items-center justify-center gap-2 px-3 text-sm font-medium border-b border-neutral-100 dark:border-neutral-700 data-[state=active]:border-neutral-200 dark:data-[state=active]:border-neutral-600 data-[state=inactive]:opacity-50"
value="zaps"
>
Zaps
Expand Down

0 comments on commit c6da06c

Please sign in to comment.