|
@@ -105,9 +105,10 @@
|
|
|
</DropdownMenu.Item>
|
|
|
|
|
|
{#if role === 'admin'}
|
|
|
- <a
|
|
|
- class="flex rounded-md py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition select-none"
|
|
|
+ <DropdownMenu.Item
|
|
|
+ as="a"
|
|
|
href="/playground"
|
|
|
+ class="flex rounded-md py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition select-none"
|
|
|
on:click={() => {
|
|
|
show = false;
|
|
|
if ($mobile) {
|
|
@@ -119,11 +120,11 @@
|
|
|
<Code className="size-5" strokeWidth="1.5" />
|
|
|
</div>
|
|
|
<div class=" self-center truncate">{$i18n.t('Playground')}</div>
|
|
|
- </a>
|
|
|
-
|
|
|
- <a
|
|
|
- class="flex rounded-md py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition select-none"
|
|
|
+ </DropdownMenu.Item>
|
|
|
+ <DropdownMenu.Item
|
|
|
+ as="a"
|
|
|
href="/admin"
|
|
|
+ class="flex rounded-md py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition select-none"
|
|
|
on:click={() => {
|
|
|
show = false;
|
|
|
if ($mobile) {
|
|
@@ -135,39 +136,40 @@
|
|
|
<UserGroup className="w-5 h-5" strokeWidth="1.5" />
|
|
|
</div>
|
|
|
<div class=" self-center truncate">{$i18n.t('Admin Panel')}</div>
|
|
|
- </a>
|
|
|
+ </DropdownMenu.Item>
|
|
|
{/if}
|
|
|
|
|
|
{#if help}
|
|
|
<hr class=" border-gray-100 dark:border-gray-800 my-1 p-0" />
|
|
|
|
|
|
<!-- {$i18n.t('Help')} -->
|
|
|
- <a
|
|
|
+
|
|
|
+ <DropdownMenu.Item
|
|
|
+ as="a"
|
|
|
class="flex gap-2 items-center py-1.5 px-3 text-sm select-none w-full cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md transition"
|
|
|
id="chat-share-button"
|
|
|
- href="https://docs.openwebui.com"
|
|
|
- target="_blank"
|
|
|
on:click={() => {
|
|
|
show = false;
|
|
|
}}
|
|
|
+ href="https://docs.openwebui.com'"
|
|
|
>
|
|
|
<QuestionMarkCircle className="size-5" />
|
|
|
<div class="flex items-center">{$i18n.t('Documentation')}</div>
|
|
|
- </a>
|
|
|
+ </DropdownMenu.Item>
|
|
|
|
|
|
<!-- Releases -->
|
|
|
- <a
|
|
|
+ <DropdownMenu.Item
|
|
|
+ as="a"
|
|
|
class="flex gap-2 items-center py-1.5 px-3 text-sm select-none w-full cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md transition"
|
|
|
- id="menu-item-releases"
|
|
|
- href="https://github.com/open-webui/open-webui/releases"
|
|
|
- target="_blank"
|
|
|
+ id="chat-share-button"
|
|
|
on:click={() => {
|
|
|
show = false;
|
|
|
}}
|
|
|
+ href="https://github.com/open-webui/"
|
|
|
>
|
|
|
<Map className="size-5" />
|
|
|
<div class="flex items-center">{$i18n.t('Releases')}</div>
|
|
|
- </a>
|
|
|
+ </DropdownMenu.Item>
|
|
|
|
|
|
<DropdownMenu.Item
|
|
|
class="flex gap-2 items-center py-1.5 px-3 text-sm select-none w-full cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md transition cursor-pointer"
|
|
@@ -184,7 +186,7 @@
|
|
|
|
|
|
<hr class=" border-gray-100 dark:border-gray-800 my-1 p-0" />
|
|
|
|
|
|
- <button
|
|
|
+ <DropdownMenu.Item
|
|
|
class="flex rounded-md py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
|
|
|
on:click={async () => {
|
|
|
const res = await userSignOut();
|
|
@@ -199,7 +201,7 @@
|
|
|
<SignOut className="w-5 h-5" strokeWidth="1.5" />
|
|
|
</div>
|
|
|
<div class=" self-center truncate">{$i18n.t('Sign Out')}</div>
|
|
|
- </button>
|
|
|
+ </DropdownMenu.Item>
|
|
|
|
|
|
{#if usage}
|
|
|
{#if usage?.user_ids?.length > 0}
|