This commit is contained in:
Timothy Jaeryang Baek
2025-02-13 22:11:56 -08:00
parent c9a8808b0d
commit b7aeb432ed
6 changed files with 123 additions and 4 deletions
+29 -2
View File
@@ -57,6 +57,7 @@
import ChannelModal from './Sidebar/ChannelModal.svelte';
import ChannelItem from './Sidebar/ChannelItem.svelte';
import PencilSquare from '../icons/PencilSquare.svelte';
import Home from '../icons/Home.svelte';
const BREAKPOINT = 768;
@@ -536,10 +537,36 @@
</a>
</div>
<!-- {#if $user?.role === 'admin'}
<div class="px-1.5 flex justify-center text-gray-800 dark:text-gray-200">
<a
class="flex-grow flex items-center space-x-3 rounded-lg px-2 py-[7px] hover:bg-gray-100 dark:hover:bg-gray-900 transition"
href="/home"
on:click={() => {
selectedChatId = null;
chatId.set('');
if ($mobile) {
showSidebar.set(false);
}
}}
draggable="false"
>
<div class="self-center">
<Home strokeWidth="2" className="size-[1.1rem]" />
</div>
<div class="flex self-center translate-y-[0.5px]">
<div class=" self-center font-medium text-sm font-primary">{$i18n.t('Home')}</div>
</div>
</a>
</div>
{/if} -->
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.models || $user?.permissions?.workspace?.knowledge || $user?.permissions?.workspace?.prompts || $user?.permissions?.workspace?.tools}
<div class="px-1.5 flex justify-center text-gray-800 dark:text-gray-200">
<a
class="flex-grow flex space-x-3 rounded-lg px-2 py-[7px] hover:bg-gray-100 dark:hover:bg-gray-900 transition"
class="flex-grow flex items-center space-x-3 rounded-lg px-2 py-[7px] hover:bg-gray-100 dark:hover:bg-gray-900 transition"
href="/workspace"
on:click={() => {
selectedChatId = null;
@@ -568,7 +595,7 @@
</svg>
</div>
<div class="flex self-center">
<div class="flex self-center translate-y-[0.5px]">
<div class=" self-center font-medium text-sm font-primary">{$i18n.t('Workspace')}</div>
</div>
</a>