From 395531619567c147af523378040a62e62c4ecf05 Mon Sep 17 00:00:00 2001 From: Xylight Date: Fri, 5 Jul 2024 12:10:06 -0700 Subject: [PATCH] design: add icon --- src/routes/accounts/+page.svelte | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/routes/accounts/+page.svelte b/src/routes/accounts/+page.svelte index 33c44bd9..07aaaba1 100644 --- a/src/routes/accounts/+page.svelte +++ b/src/routes/accounts/+page.svelte @@ -23,6 +23,7 @@ import { ArrowLeftOnRectangle, ArrowRightOnRectangle, + ArrowsRightLeft, ArrowUturnLeft, BugAnt, Check, @@ -184,21 +185,24 @@ ? 'Switch' : 'Current'} on:click={async () => { - if (profile.id == $currentProfile?.id) setUserID(-1) - else { + if (profile.id != $currentProfile?.id) { switching = profile.id await setUserID(profile.id) switching = -69 } }} size="square-md" - color={profile.id == $currentProfile?.id ? 'primary' : 'secondary'} + color={profile.id == $currentProfile?.id ? 'primary' : 'ghost'} loading={switching == profile.id} disabled={switching == profile.id} > - {#if profile.id == $currentProfile?.id} - - {/if} + + {#if profile.id == $currentProfile?.id} + + {:else} + + {/if} +