refac
This commit is contained in:
1 parent
36cff229a9
commit
fee4c280f8
2 files changed
+20
-18
No files matched your search
@@ -15,12 +15,12 @@
|
|||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div
|
<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))]'
|
? 'md:max-w-[calc(100%-var(--sidebar-width))]'
|
||||||
: ''} max-w-full"
|
: ''} max-w-full"
|
||||||
>
|
>
|
||||||
<nav class=" px-1.5 pt-0.5 backdrop-blur-xl drag-region select-none">
|
<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">
|
<div class="flex items-center gap-0.5 md:gap-1">
|
||||||
{#if $mobile}
|
{#if $mobile}
|
||||||
<div class="{$showSidebar ? 'md:hidden' : ''} self-center flex flex-none items-center">
|
<div class="{$showSidebar ? 'md:hidden' : ''} self-center flex flex-none items-center">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
@@ -43,13 +43,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="">
|
<div class="flex w-full items-center">
|
||||||
<div
|
<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
|
<a
|
||||||
draggable="false"
|
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"
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||||
href="/playground">{$i18n.t('Chat')}</a
|
href="/playground">{$i18n.t('Chat')}</a
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
|
|
||||||
<a
|
<a
|
||||||
draggable="false"
|
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"
|
: '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
|
href="/playground/completions">{$i18n.t('Completions')}</a
|
||||||
@@ -72,7 +74,7 @@
|
|||||||
|
|
||||||
<a
|
<a
|
||||||
draggable="false"
|
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"
|
: '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
|
href="/playground/images">{$i18n.t('Images')}</a
|
||||||
|
|||||||
@@ -56,12 +56,12 @@
|
|||||||
|
|
||||||
{#if loaded}
|
{#if loaded}
|
||||||
<div
|
<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))]'
|
? 'md:max-w-[calc(100%-var(--sidebar-width))]'
|
||||||
: ''} max-w-full"
|
: ''} max-w-full"
|
||||||
>
|
>
|
||||||
<nav class=" px-1.5 pt-0.5 backdrop-blur-xl drag-region select-none">
|
<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">
|
<div class="flex items-center gap-0.5 md:gap-1">
|
||||||
{#if $mobile}
|
{#if $mobile}
|
||||||
<div class="{$showSidebar ? 'md:hidden' : ''} self-center flex flex-none items-center">
|
<div class="{$showSidebar ? 'md:hidden' : ''} self-center flex flex-none items-center">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
@@ -84,15 +84,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="">
|
<div class="flex w-full items-center">
|
||||||
<div
|
<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}
|
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.models}
|
||||||
<a
|
<a
|
||||||
draggable="false"
|
draggable="false"
|
||||||
aria-current={$page.url.pathname.includes('/workspace/models') ? 'page' : null}
|
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"
|
: '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
|
href="/workspace/models">{$i18n.t('Models')}</a
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
<a
|
<a
|
||||||
draggable="false"
|
draggable="false"
|
||||||
aria-current={$page.url.pathname.includes('/workspace/knowledge') ? 'page' : null}
|
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"
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||||
href="/workspace/knowledge"
|
href="/workspace/knowledge"
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
<a
|
<a
|
||||||
draggable="false"
|
draggable="false"
|
||||||
aria-current={$page.url.pathname.includes('/workspace/prompts') ? 'page' : null}
|
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"
|
: '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
|
href="/workspace/prompts">{$i18n.t('Prompts')}</a
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
<a
|
<a
|
||||||
draggable="false"
|
draggable="false"
|
||||||
aria-current={$page.url.pathname.includes('/workspace/skills') ? 'page' : null}
|
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"
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||||
href="/workspace/skills"
|
href="/workspace/skills"
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<a
|
<a
|
||||||
draggable="false"
|
draggable="false"
|
||||||
aria-current={$page.url.pathname.includes('/workspace/tools') ? 'page' : null}
|
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"
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition select-none"
|
||||||
href="/workspace/tools"
|
href="/workspace/tools"
|
||||||
|
|||||||
Reference in new issue
Block a user