feat: Add search function

This commit is contained in:
Xyphyn committed 2023-07-26 11:39:54 -07:00
1 parent 91134d05e4
commit 1dd179d636
22 files changed
+455 -70

No files matched your search

+13 -2
View File
@@ -33,12 +33,16 @@
return false
}
let markingAsRead = false
async function markAllAsRead() {
if (!$user) {
goto('/login')
return
}
markingAsRead = true
const response = await getClient().markAllAsRead({
auth: $authData!.token,
})
@@ -47,6 +51,8 @@
goto($page.url, {
invalidateAll: true,
}).then(() => {
markingAsRead = false
})
return response.replies
@@ -59,8 +65,13 @@
<div class="flex flex-row justify-between">
<h1 class="font-bold text-3xl">Inbox</h1>
<Button on:click={markAllAsRead}>
<Icon src={Check} width={16} mini />
<Button
on:click={markAllAsRead}
loading={markingAsRead}
disabled={markingAsRead}
size="md"
>
<Icon src={Check} width={16} mini slot="icon" />
Mark all as read
</Button>
</div>