mirror of
https://github.com/open-webui/open-webui
synced 2025-06-23 02:16:52 +00:00
refac: styling
This commit is contained in:
parent
c4cd2b55f0
commit
f67f86f06f
@ -645,51 +645,51 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if ($models ?? []).length > 0 && ($settings?.pinnedModels ?? []).length > 0}
|
|
||||||
<div class="py-1">
|
|
||||||
{#each $settings.pinnedModels as modelId (modelId)}
|
|
||||||
{@const model = $models.find((model) => model.id === modelId)}
|
|
||||||
{#if model}
|
|
||||||
<div class="px-1.5 flex justify-center text-gray-800 dark:text-gray-200">
|
|
||||||
<a
|
|
||||||
class="grow flex items-center space-x-2.5 rounded-lg px-2 py-[7px] hover:bg-gray-100 dark:hover:bg-gray-900 transition"
|
|
||||||
href="/?model={modelId}"
|
|
||||||
on:click={() => {
|
|
||||||
selectedChatId = null;
|
|
||||||
chatId.set('');
|
|
||||||
|
|
||||||
if ($mobile) {
|
|
||||||
showSidebar.set(false);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
draggable="false"
|
|
||||||
>
|
|
||||||
<div class="self-center shrink-0">
|
|
||||||
<img
|
|
||||||
crossorigin="anonymous"
|
|
||||||
src={model?.info?.meta?.profile_image_url ?? '/static/favicon.png'}
|
|
||||||
class=" size-5 rounded-full -translate-x-[0.5px]"
|
|
||||||
alt="logo"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex self-center translate-y-[0.5px]">
|
|
||||||
<div class=" self-center font-medium text-sm font-primary line-clamp-1">
|
|
||||||
{model?.name ?? modelId}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
{/each}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="relative flex flex-col flex-1 overflow-y-auto overflow-x-hidden {$temporaryChatEnabled
|
class="relative flex flex-col flex-1 overflow-y-auto overflow-x-hidden {$temporaryChatEnabled
|
||||||
? 'opacity-20'
|
? 'opacity-20'
|
||||||
: ''}"
|
: ''}"
|
||||||
>
|
>
|
||||||
|
{#if ($models ?? []).length > 0 && ($settings?.pinnedModels ?? []).length > 0}
|
||||||
|
<div class="mt-0.5">
|
||||||
|
{#each $settings.pinnedModels as modelId (modelId)}
|
||||||
|
{@const model = $models.find((model) => model.id === modelId)}
|
||||||
|
{#if model}
|
||||||
|
<div class="px-1.5 flex justify-center text-gray-800 dark:text-gray-200">
|
||||||
|
<a
|
||||||
|
class="grow flex items-center space-x-2.5 rounded-lg px-2 py-[7px] hover:bg-gray-100 dark:hover:bg-gray-900 transition"
|
||||||
|
href="/?model={modelId}"
|
||||||
|
on:click={() => {
|
||||||
|
selectedChatId = null;
|
||||||
|
chatId.set('');
|
||||||
|
|
||||||
|
if ($mobile) {
|
||||||
|
showSidebar.set(false);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
draggable="false"
|
||||||
|
>
|
||||||
|
<div class="self-center shrink-0">
|
||||||
|
<img
|
||||||
|
crossorigin="anonymous"
|
||||||
|
src={model?.info?.meta?.profile_image_url ?? '/static/favicon.png'}
|
||||||
|
class=" size-5 rounded-full -translate-x-[0.5px]"
|
||||||
|
alt="logo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex self-center translate-y-[0.5px]">
|
||||||
|
<div class=" self-center font-medium text-sm font-primary line-clamp-1">
|
||||||
|
{model?.name ?? modelId}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
{#if $config?.features?.enable_channels && ($user?.role === 'admin' || $channels.length > 0)}
|
{#if $config?.features?.enable_channels && ($user?.role === 'admin' || $channels.length > 0)}
|
||||||
<Folder
|
<Folder
|
||||||
className="px-2 mt-0.5"
|
className="px-2 mt-0.5"
|
||||||
|
Loading…
Reference in New Issue
Block a user