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

+5 -5
View File
@@ -91,7 +91,7 @@
<ObjectAutocomplete
type="instance"
placeholder="Filter by instance"
jwt={$profile?.jwt}
jwt={profile.data?.jwt}
showWhenEmpty={true}
label="Instance"
class="flex-1"
@@ -109,7 +109,7 @@
/>
<ObjectAutocomplete
placeholder="Filter by community"
jwt={$profile?.jwt}
jwt={profile.data?.jwt}
listing_type="All"
showWhenEmpty={true}
label="Community"
@@ -121,7 +121,7 @@
<UserAutocomplete
instance={page.url.searchParams.get('instance') || undefined}
placeholder="Filter by user"
jwt={$profile?.jwt}
jwt={profile.data?.jwt}
listing_type="All"
showWhenEmpty={true}
class="flex-1"
@@ -132,10 +132,10 @@
onselect={(e) =>
searchParam(page.url, 'user', e?.id.toString() ?? '', 'page')}
/>
{#if $profile?.user && isAdmin($profile?.user)}
{#if profile.data?.user && isAdmin(profile.data?.user)}
<UserAutocomplete
placeholder="Filter by moderator"
jwt={$profile?.jwt}
jwt={profile.data?.jwt}
listing_type="All"
showWhenEmpty={true}
class="flex-1"