fix: accounts switching fails
This commit is contained in:
3 files changed
+9
-12
No files matched your search
@@ -23,20 +23,22 @@
|
|||||||
>
|
>
|
||||||
<div class="flex flex-col gap-2 items-center max-w-sm">
|
<div class="flex flex-col gap-2 items-center max-w-sm">
|
||||||
{#if icon}
|
{#if icon}
|
||||||
<div class="bg-slate-100 dark:bg-zinc-950 p-3 rounded-full">
|
<div
|
||||||
|
class="bg-slate-100 dark:bg-zinc-900 p-3 rounded-xl text-primary-900 dark:text-primary-100"
|
||||||
|
>
|
||||||
<Icon src={icon} size="28" solid />
|
<Icon src={icon} size="28" solid />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class={clazz}>
|
<div class={['space-y-2', clazz]}>
|
||||||
<h1
|
<h1
|
||||||
class="text-slate-900 dark:text-zinc-100 text-base font-medium text-center"
|
class="text-slate-900 dark:text-zinc-100 text-xl font-medium text-center"
|
||||||
>
|
>
|
||||||
{title}
|
{title}
|
||||||
</h1>
|
</h1>
|
||||||
{#if description}
|
{#if description}
|
||||||
<!-- <p class="text-sm text-center font-normal">
|
<p class="text-center font-normal max-w-80 mx-auto text-balance">
|
||||||
{description}
|
{description}
|
||||||
</p> -->
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -31,13 +31,8 @@
|
|||||||
|
|
||||||
let radioSelected = $state(profile.current.id)
|
let radioSelected = $state(profile.current.id)
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
switching = radioSelected
|
|
||||||
profile.meta.profile = radioSelected
|
profile.meta.profile = radioSelected
|
||||||
})
|
})
|
||||||
|
|
||||||
$effect(() => {
|
|
||||||
if (profile.current.user) switching = -1
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
import { Button, Material, Select, Spinner, toast } from 'mono-svelte'
|
import { Button, Material, Select, Spinner, toast } from 'mono-svelte'
|
||||||
import Option from 'mono-svelte/forms/select/Option.svelte'
|
import Option from 'mono-svelte/forms/select/Option.svelte'
|
||||||
import { tick } from 'svelte'
|
import { tick } from 'svelte'
|
||||||
import { Check, Funnel, Icon, Inbox, XMark } from 'svelte-hero-icons'
|
import { Check, Funnel, Icon, ShieldCheck, XMark } from 'svelte-hero-icons'
|
||||||
import Report from './Report.svelte'
|
import Report from './Report.svelte'
|
||||||
|
|
||||||
let { data = $bindable() } = $props()
|
let { data = $bindable() } = $props()
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<Placeholder
|
<Placeholder
|
||||||
icon={Inbox}
|
icon={ShieldCheck}
|
||||||
title={$t('routes.moderation.empty.title')}
|
title={$t('routes.moderation.empty.title')}
|
||||||
description={$t('routes.moderation.empty.description')}
|
description={$t('routes.moderation.empty.description')}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in new issue
Block a user