Skip to content

Commit 07262fa

Browse files
committed
refac
1 parent a28ea36 commit 07262fa

1 file changed

Lines changed: 24 additions & 21 deletions

File tree

src/lib/components/layout/Sidebar/UserMenu.svelte

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -250,27 +250,6 @@
250250
</a>
251251
{/if}
252252

253-
<button
254-
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"
255-
type="button"
256-
on:click={async () => {
257-
show = false;
258-
259-
dispatch('show', 'archived-chat');
260-
261-
if ($mobile) {
262-
await tick();
263-
264-
showSidebar.set(false);
265-
}
266-
}}
267-
>
268-
<div class=" self-center mr-3">
269-
<ArchiveBox className="size-5" strokeWidth="1.5" />
270-
</div>
271-
<div class=" self-center truncate">{$i18n.t('Archived Chats')}</div>
272-
</button>
273-
274253
{#if role === 'admin'}
275254
<a
276255
href="/playground"
@@ -294,6 +273,30 @@
294273
</div>
295274
<div class=" self-center truncate">{$i18n.t('Playground')}</div>
296275
</a>
276+
{/if}
277+
278+
<button
279+
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"
280+
type="button"
281+
on:click={async () => {
282+
show = false;
283+
284+
dispatch('show', 'archived-chat');
285+
286+
if ($mobile) {
287+
await tick();
288+
289+
showSidebar.set(false);
290+
}
291+
}}
292+
>
293+
<div class=" self-center mr-3">
294+
<ArchiveBox className="size-5" strokeWidth="1.5" />
295+
</div>
296+
<div class=" self-center truncate">{$i18n.t('Archived Chats')}</div>
297+
</button>
298+
299+
{#if role === 'admin'}
297300
<a
298301
href="/admin"
299302
draggable="false"

0 commit comments

Comments
 (0)