fix: accounts switching fails

This commit is contained in:
James Xylight committed 2025-08-21 21:22:41 -07:00
1 parent 2fde48cbfb
commit ea019da578
3 files changed
+9 -12

No files matched your search

+7 -5
View File
@@ -23,20 +23,22 @@
>
<div class="flex flex-col gap-2 items-center max-w-sm">
{#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 />
</div>
{/if}
<div class={clazz}>
<div class={['space-y-2', clazz]}>
<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}
</h1>
{#if description}
<!-- <p class="text-sm text-center font-normal">
<p class="text-center font-normal max-w-80 mx-auto text-balance">
{description}
</p> -->
</p>
{/if}
</div>
</div>
-5
View File
@@ -31,13 +31,8 @@
let radioSelected = $state(profile.current.id)
$effect(() => {
switching = radioSelected
profile.meta.profile = radioSelected
})
$effect(() => {
if (profile.current.user) switching = -1
})
</script>
<svelte:head>
+2 -2
View File
@@ -13,7 +13,7 @@
import { Button, Material, Select, Spinner, toast } from 'mono-svelte'
import Option from 'mono-svelte/forms/select/Option.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'
let { data = $bindable() } = $props()
@@ -160,7 +160,7 @@
/>
{:else}
<Placeholder
icon={Inbox}
icon={ShieldCheck}
title={$t('routes.moderation.empty.title')}
description={$t('routes.moderation.empty.description')}
/>