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:
1 parent
8c6ff77fac
commit
5651ad475d
83 files changed
+395
-469
No files matched your search
@@ -66,7 +66,7 @@
|
||||
|
||||
async function remove() {
|
||||
if (!item) return
|
||||
if (!$profile?.jwt) throw new Error('Unauthenticated')
|
||||
if (!profile.data?.jwt) throw new Error('Unauthenticated')
|
||||
|
||||
loading = true
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
bind:value={reason}
|
||||
/>
|
||||
|
||||
{#if !removed && $profile?.user && (amMod($profile.user, item.community) || (isAdmin($profile.user) && item.community.local))}
|
||||
{#if !removed && profile.data?.user && (amMod(profile.data.user, item.community) || (isAdmin(profile.data.user) && item.community.local))}
|
||||
<Switch bind:checked={commentReason}>
|
||||
{$t('moderation.removeSubmission.withReason')}
|
||||
</Switch>
|
||||
|
||||
Reference in new issue
Block a user