This commit is contained in:
Timothy Jaeryang Baek
2026-03-22 05:44:13 -05:00
parent 0dcd6ac983
commit 7ffcd3908e
@@ -237,39 +237,49 @@
{#if role === 'admin'} {#if role === 'admin'}
<a <a
href="/playground" href="/playground"
draggable="false" draggable="false"
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none" class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none"
on:click={async () => { on:click={async (e) => {
show = false; if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) {
if ($mobile) { return;
await tick(); }
showSidebar.set(false); e.preventDefault();
} show = false;
}} goto('/playground');
> if ($mobile) {
<div class=" self-center mr-3"> await tick();
<Code className="size-5" strokeWidth="1.5" /> showSidebar.set(false);
</div> }
<div class=" self-center truncate">{$i18n.t('Playground')}</div> }}
</a> >
<a <div class=" self-center mr-3">
href="/admin" <Code className="size-5" strokeWidth="1.5" />
draggable="false" </div>
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none" <div class=" self-center truncate">{$i18n.t('Playground')}</div>
on:click={async () => { </a>
show = false; <a
if ($mobile) { href="/admin"
await tick(); draggable="false"
showSidebar.set(false); class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none"
} on:click={async (e) => {
}} if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) {
> return;
<div class=" self-center mr-3"> }
<UserGroup className="w-5 h-5" strokeWidth="1.5" /> e.preventDefault();
</div> show = false;
<div class=" self-center truncate">{$i18n.t('Admin Panel')}</div> goto('/admin');
</a> if ($mobile) {
await tick();
showSidebar.set(false);
}
}}
>
<div class=" self-center mr-3">
<UserGroup className="w-5 h-5" strokeWidth="1.5" />
</div>
<div class=" self-center truncate">{$i18n.t('Admin Panel')}</div>
</a>
{/if} {/if}
{#if help} {#if help}