aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/messages
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-02 21:32:59 -0800
committerAdam Soltys <[email protected]>2026-03-02 21:32:59 -0800
commitf73a6be565bace826404d470b8e8a8c1a25eb19e (patch)
treeb47dde049fd6f0d70132500d9bd2be7837c0ccaa /src/routes/(app)/messages
parent7c4d393feaf9c594fa6bdae274abc0edd45c3373 (diff)
downloadcoinos-ui-f73a6be565bace826404d470b8e8a8c1a25eb19e.tar.gz
coinos-ui-f73a6be565bace826404d470b8e8a8c1a25eb19e.zip
fix svelte-check issues
Diffstat (limited to 'src/routes/(app)/messages')
-rw-r--r--src/routes/(app)/messages/+layout.svelte10
-rw-r--r--src/routes/(app)/messages/+page.svelte7
-rw-r--r--src/routes/(app)/messages/[pubkey]/+page.svelte1
3 files changed, 8 insertions, 10 deletions
diff --git a/src/routes/(app)/messages/+layout.svelte b/src/routes/(app)/messages/+layout.svelte
index 230f8baf..2f7cd455 100644
--- a/src/routes/(app)/messages/+layout.svelte
+++ b/src/routes/(app)/messages/+layout.svelte
@@ -31,14 +31,14 @@
<div class="messages-layout">
<nav class="flex items-center p-4 gap-4 shrink-0">
{#if isDetail}
- <a href="/messages" class="btn-menu" aria-label="Back">
+ <a href="/messages" class="flex justify-center items-center bg-base-100 p-2 rounded-full w-12 h-12 sm:w-16 sm:h-16 drop-shadow-xl" aria-label="Back">
<iconify-icon noobserver icon="ph:arrow-left-bold" width={(w ?? 0) > 640 ? 32 : 24}></iconify-icon>
</a>
{/if}
<div class="ml-auto flex items-center gap-4">
<a href="/{user?.username}" data-sveltekit-preload-code="eager" aria-label="Home">
- <button class="btn-menu" aria-label="Home">
+ <button class="flex justify-center items-center bg-base-100 p-2 rounded-full w-12 h-12 sm:w-16 sm:h-16 drop-shadow-xl" aria-label="Home">
<iconify-icon noobserver icon="ph:house-bold" width={(w ?? 0) > 640 ? 32 : 24}></iconify-icon>
</button>
</a>
@@ -52,15 +52,9 @@
</div>
<style>
- @reference "../../../app.css";
-
.messages-layout {
display: flex;
flex-direction: column;
height: 100dvh;
}
-
- .btn-menu {
- @apply flex justify-center items-center bg-base-100 p-2 rounded-full w-12 h-12 sm:w-16 sm:h-16 drop-shadow-xl;
- }
</style>
diff --git a/src/routes/(app)/messages/+page.svelte b/src/routes/(app)/messages/+page.svelte
index 87198cb6..6c97c27c 100644
--- a/src/routes/(app)/messages/+page.svelte
+++ b/src/routes/(app)/messages/+page.svelte
@@ -86,12 +86,15 @@
};
// Restore from localStorage on hard refresh, or in-memory cache on SPA nav
- const storageKey = `chatList:${data.user?.pubkey}`;
- const cachedList = getCachedChatList(data.user?.pubkey);
+ // svelte-ignore state_referenced_locally
+ const userPubkey = data.user?.pubkey;
+ const storageKey = `chatList:${userPubkey}`;
+ const cachedList = getCachedChatList(userPubkey);
let stored: any = null;
try { stored = JSON.parse(localStorage.getItem(storageKey) || "null"); } catch {}
let chats: any[] = $state(cachedList?.chats ?? stored?.chats ?? []);
let allRumours: any[] = $state(cachedList?.rumours ?? stored?.rumours ?? []);
+ // svelte-ignore state_referenced_locally
let loaded = $state(chats.length > 0);
const updateSendersRecipients = async (rumours: any[]) => {
diff --git a/src/routes/(app)/messages/[pubkey]/+page.svelte b/src/routes/(app)/messages/[pubkey]/+page.svelte
index 52e032be..0828b057 100644
--- a/src/routes/(app)/messages/[pubkey]/+page.svelte
+++ b/src/routes/(app)/messages/[pubkey]/+page.svelte
@@ -69,6 +69,7 @@
return info.coinosUsername || info.nostrName || $t("dm.anonymous");
};
+ // svelte-ignore state_referenced_locally
let selectedChat: any = $state(libnip17.getCachedUserInfo(pubkey) ?? { pubkey });
let text = $state("");
let allRumours: any[] = $state([]);