Update 2 14.2.2023

This commit is contained in:
Schenky 2023-02-14 16:02:09 +01:00
parent b7d3720e2f
commit ba9ed61333
1 changed files with 11 additions and 3 deletions

View File

@ -31,7 +31,7 @@
itms: [
{ icon: Help, text: 'Help', link:"/"},
{ icon: Warning, text: 'Terms of Service', link:"/"},
{ icon: Logout, text: 'Log out', link:"/"},
{ icon: Logout, text: 'Log out', link: () => user.deleteSessions() },,
],
},
]
@ -54,11 +54,19 @@
{#each items as { title, itms }}
<div class="mb-4 text-[18px] text-[#61646B]">{title}</div>
{#each itms as { icon, text, link}}
{#if (typeof link === 'function')}
<SettingRow>
<svelte:component this={icon} />
<Link class="font-semibold text-[18px]" to={link}>{text}</Link>
<button class="font-semibold text-[18px]" on:click={() => link()}>{text}</button>
</SettingRow>
<Line />
{:else}
<SettingRow>
<svelte:component this={icon} />
<Link class="font-semibold text-[18px]" to={link}>{text}</Link>
</SettingRow>
<Line />
{/if}
{/each}
{/each}
</div>