mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-23 22:14:58 -06:00
refac
This commit is contained in:
@@ -15,12 +15,12 @@
|
||||
</svelte:head>
|
||||
|
||||
<div
|
||||
class=" flex flex-col w-full h-screen max-h-[100dvh] transition-width duration-200 ease-in-out {$showSidebar
|
||||
class="flex flex-col w-full h-screen max-h-[100dvh] transition-width duration-200 ease-in-out {$showSidebar
|
||||
? 'md:max-w-[calc(100%-var(--sidebar-width))]'
|
||||
: ''} max-w-full"
|
||||
>
|
||||
<nav class=" px-1.5 pt-0.5 backdrop-blur-xl drag-region select-none">
|
||||
<div class=" flex items-center gap-0.5 md:gap-1">
|
||||
<nav class="pb-1 px-2.5 pt-2 backdrop-blur-xl drag-region select-none">
|
||||
<div class="flex items-center gap-0.5 md:gap-1">
|
||||
{#if $mobile}
|
||||
<div class="{$showSidebar ? 'md:hidden' : ''} self-center flex flex-none items-center">
|
||||
<Tooltip
|
||||
@@ -43,13 +43,15 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="">
|
||||
<div class="flex w-full items-center">
|
||||
<div
|
||||
class="flex gap-0.5 md:gap-1 scrollbar-none overflow-x-auto w-fit text-center text-sm font-normal rounded-full bg-transparent py-1 touch-auto pointer-events-auto"
|
||||
class="flex min-w-0 items-center gap-0.5 md:gap-1 scrollbar-none overflow-x-auto w-fit text-center text-sm font-normal rounded-full bg-transparent py-1 touch-auto pointer-events-auto"
|
||||
>
|
||||
<a
|
||||
draggable="false"
|
||||
class="min-w-fit p-1.5 {['/playground', '/playground/'].includes($page.url.pathname)
|
||||
class="min-w-fit px-1 text-sm {['/playground', '/playground/'].includes(
|
||||
$page.url.pathname
|
||||
)
|
||||
? ''
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||
href="/playground">{$i18n.t('Chat')}</a
|
||||
@@ -64,7 +66,7 @@
|
||||
|
||||
<a
|
||||
draggable="false"
|
||||
class="min-w-fit p-1.5 {$page.url.pathname.includes('/playground/completions')
|
||||
class="min-w-fit px-1 text-sm {$page.url.pathname.includes('/playground/completions')
|
||||
? ''
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||
href="/playground/completions">{$i18n.t('Completions')}</a
|
||||
@@ -72,7 +74,7 @@
|
||||
|
||||
<a
|
||||
draggable="false"
|
||||
class="min-w-fit p-1.5 {$page.url.pathname.includes('/playground/images')
|
||||
class="min-w-fit px-1 text-sm {$page.url.pathname.includes('/playground/images')
|
||||
? ''
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||
href="/playground/images">{$i18n.t('Images')}</a
|
||||
|
||||
@@ -56,12 +56,12 @@
|
||||
|
||||
{#if loaded}
|
||||
<div
|
||||
class=" relative flex flex-col w-full h-screen max-h-[100dvh] transition-width duration-200 ease-in-out {$showSidebar
|
||||
class="flex flex-col w-full h-screen max-h-[100dvh] transition-width duration-200 ease-in-out {$showSidebar
|
||||
? 'md:max-w-[calc(100%-var(--sidebar-width))]'
|
||||
: ''} max-w-full"
|
||||
>
|
||||
<nav class=" px-1.5 pt-0.5 backdrop-blur-xl drag-region select-none">
|
||||
<div class=" flex items-center gap-0.5 md:gap-1">
|
||||
<nav class="pb-1 px-2.5 pt-2 backdrop-blur-xl drag-region select-none">
|
||||
<div class="flex items-center gap-0.5 md:gap-1">
|
||||
{#if $mobile}
|
||||
<div class="{$showSidebar ? 'md:hidden' : ''} self-center flex flex-none items-center">
|
||||
<Tooltip
|
||||
@@ -84,15 +84,15 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="">
|
||||
<div class="flex w-full items-center">
|
||||
<div
|
||||
class="flex gap-0.5 md:gap-1 scrollbar-none overflow-x-auto w-fit text-center text-sm font-normal rounded-full bg-transparent py-1 touch-auto pointer-events-auto"
|
||||
class="flex min-w-0 items-center gap-0.5 md:gap-1 scrollbar-none overflow-x-auto w-fit text-center text-sm font-normal rounded-full bg-transparent py-1 touch-auto pointer-events-auto"
|
||||
>
|
||||
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.models}
|
||||
<a
|
||||
draggable="false"
|
||||
aria-current={$page.url.pathname.includes('/workspace/models') ? 'page' : null}
|
||||
class="min-w-fit p-1.5 {$page.url.pathname.includes('/workspace/models')
|
||||
class="min-w-fit px-1 text-sm {$page.url.pathname.includes('/workspace/models')
|
||||
? ''
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||
href="/workspace/models">{$i18n.t('Models')}</a
|
||||
@@ -103,7 +103,7 @@
|
||||
<a
|
||||
draggable="false"
|
||||
aria-current={$page.url.pathname.includes('/workspace/knowledge') ? 'page' : null}
|
||||
class="min-w-fit p-1.5 {$page.url.pathname.includes('/workspace/knowledge')
|
||||
class="min-w-fit px-1 text-sm {$page.url.pathname.includes('/workspace/knowledge')
|
||||
? ''
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||
href="/workspace/knowledge"
|
||||
@@ -116,7 +116,7 @@
|
||||
<a
|
||||
draggable="false"
|
||||
aria-current={$page.url.pathname.includes('/workspace/prompts') ? 'page' : null}
|
||||
class="min-w-fit p-1.5 {$page.url.pathname.includes('/workspace/prompts')
|
||||
class="min-w-fit px-1 text-sm {$page.url.pathname.includes('/workspace/prompts')
|
||||
? ''
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||
href="/workspace/prompts">{$i18n.t('Prompts')}</a
|
||||
@@ -127,7 +127,7 @@
|
||||
<a
|
||||
draggable="false"
|
||||
aria-current={$page.url.pathname.includes('/workspace/skills') ? 'page' : null}
|
||||
class="min-w-fit p-1.5 {$page.url.pathname.includes('/workspace/skills')
|
||||
class="min-w-fit px-1 text-sm {$page.url.pathname.includes('/workspace/skills')
|
||||
? ''
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||
href="/workspace/skills"
|
||||
@@ -140,7 +140,7 @@
|
||||
<a
|
||||
draggable="false"
|
||||
aria-current={$page.url.pathname.includes('/workspace/tools') ? 'page' : null}
|
||||
class="min-w-fit p-1.5 {$page.url.pathname.includes('/workspace/tools')
|
||||
class="min-w-fit px-1 text-sm {$page.url.pathname.includes('/workspace/tools')
|
||||
? ''
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||
href="/workspace/tools"
|
||||
|
||||
Reference in New Issue
Block a user