feat: use state based auth instead of store based (#488)

* misc: switch to state for auth

* fix: class based auth not working
This commit is contained in:
Xylight authored and GitHub committed 2025-02-08 13:49:09 -08:00
1 parent 8c6ff77fac
commit 5651ad475d
83 files changed
+395 -469

No files matched your search

+3 -11
View File
@@ -29,7 +29,7 @@
let customHref = (href?: string) => {
if (href?.startsWith('?')) {
const current = pageData.url.searchParams
const current = new URLSearchParams(pageData.url.searchParams)
const newParams = new URLSearchParams(href)
current.delete(newParams.keys().toArray()[0])
@@ -56,11 +56,7 @@
<Button
href={customHref(href?.(cursor?.back ?? page - 1))}
color="ghost"
onclick={() => {
invalidateAll()
if (cursor?.back) onchangecursor?.(cursor.back)
else onchange?.(--page)
}}
onclick={() => invalidateAll()}
title={$t('common.back')}
size="square-md"
rounding="pill"
@@ -91,11 +87,7 @@
<Button
href={customHref(href?.(cursor?.next ?? page + 1))}
color="ghost"
onclick={() => {
invalidateAll()
if (cursor?.next) onchangecursor?.(cursor?.next)
else onchange?.(++page)
}}
onclick={() => invalidateAll()}
title={$t('common.next')}
size="square-md"
rounding="pill"