refac: styling
Some checks failed
Deploy to HuggingFace Spaces / check-secret (push) Has been cancelled
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Has been cancelled
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Has been cancelled
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Has been cancelled
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Has been cancelled
Python CI / Format Backend (3.11) (push) Has been cancelled
Frontend Build / Format & Build Frontend (push) Has been cancelled
Frontend Build / Frontend Unit Tests (push) Has been cancelled
Integration Test / Run Cypress Integration Tests (push) Has been cancelled
Integration Test / Run Migration Tests (push) Has been cancelled
Deploy to HuggingFace Spaces / deploy (push) Has been cancelled
Create and publish Docker images with specific build args / merge-main-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-cuda-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-ollama-images (push) Has been cancelled

This commit is contained in:
Timothy J. Baek 2024-11-07 01:30:51 -08:00
parent cbf6004c76
commit f258f44136
2 changed files with 14 additions and 9 deletions

View File

@ -26,6 +26,7 @@
import Map from '../icons/Map.svelte'; import Map from '../icons/Map.svelte';
import { stringify } from 'postcss'; import { stringify } from 'postcss';
import PencilSquare from '../icons/PencilSquare.svelte'; import PencilSquare from '../icons/PencilSquare.svelte';
import Plus from '../icons/Plus.svelte';
const i18n = getContext('i18n'); const i18n = getContext('i18n');
@ -43,17 +44,17 @@
<ShareChatModal bind:show={showShareChatModal} chatId={$chatId} /> <ShareChatModal bind:show={showShareChatModal} chatId={$chatId} />
<div class="sticky top-0 z-30 w-full px-1 py-1 -mb-8 flex items-center"> <div class="sticky top-0 z-30 w-full px-1.5 py-1.5 -mb-8 flex items-center">
<div <div
class=" bg-gradient-to-b via-50% from-white via-white to-transparent dark:from-gray-900 dark:via-gray-900 dark:to-transparent pointer-events-none absolute inset-0 -bottom-7 z-[-1] blur" class=" bg-gradient-to-b via-50% from-white via-white to-transparent dark:from-gray-900 dark:via-gray-900 dark:to-transparent pointer-events-none absolute inset-0 -bottom-7 z-[-1] blur"
></div> ></div>
<div class=" flex max-w-full w-full mx-auto px-2 pt-0.5 bg-transparent"> <div class=" flex max-w-full w-full mx-auto px-1 pt-0.5 bg-transparent">
<div class="flex items-center w-full max-w-full"> <div class="flex items-center w-full max-w-full">
<div <div
class="{$showSidebar class="{$showSidebar
? 'md:hidden' ? 'md:hidden'
: ''} mr-2 self-start flex flex-none items-center text-gray-600 dark:text-gray-400" : ''} mr-1 self-start flex flex-none items-center text-gray-600 dark:text-gray-400"
> >
<button <button
id="sidebar-toggle-button" id="sidebar-toggle-button"
@ -69,7 +70,11 @@
</button> </button>
</div> </div>
<div class="flex-1 overflow-hidden max-w-full"> <div
class="flex-1 overflow-hidden max-w-full py-0.5
{$showSidebar ? 'ml-1' : ''}
"
>
{#if showModelSelector} {#if showModelSelector}
<ModelSelector bind:selectedModels showSetDefault={!shareEnabled} /> <ModelSelector bind:selectedModels showSetDefault={!shareEnabled} />
{/if} {/if}

View File

@ -410,14 +410,14 @@
data-state={$showSidebar} data-state={$showSidebar}
> >
<div <div
class="py-1.5 my-auto flex flex-col justify-between h-screen max-h-[100dvh] w-[260px] overflow-x-hidden z-50 {$showSidebar class="py-2 my-auto flex flex-col justify-between h-screen max-h-[100dvh] w-[260px] overflow-x-hidden z-50 {$showSidebar
? '' ? ''
: 'invisible'}" : 'invisible'}"
> >
<div class="px-1.5 flex justify-between space-x-1 text-gray-600 dark:text-gray-400"> <div class="px-1.5 flex justify-between space-x-1 text-gray-600 dark:text-gray-400">
<a <a
id="sidebar-new-chat-button" id="sidebar-new-chat-button"
class="flex flex-1 rounded-lg px-2 h-full hover:bg-gray-100 dark:hover:bg-gray-900 transition" class="flex flex-1 rounded-lg px-2 py-1 h-full hover:bg-gray-100 dark:hover:bg-gray-900 transition"
href="/" href="/"
draggable="false" draggable="false"
on:click={async () => { on:click={async () => {
@ -436,7 +436,7 @@
<img <img
crossorigin="anonymous" crossorigin="anonymous"
src="{WEBUI_BASE_URL}/static/favicon.png" src="{WEBUI_BASE_URL}/static/favicon.png"
class=" size-6 -translate-x-1.5 rounded-full" class=" size-5 -translate-x-1.5 rounded-full"
alt="logo" alt="logo"
/> />
</div> </div>
@ -446,7 +446,7 @@
</a> </a>
<button <button
class=" cursor-pointer px-2 py-2 flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-900 transition" class=" cursor-pointer p-[7px] flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-900 transition"
on:click={() => { on:click={() => {
showSidebar.set(!$showSidebar); showSidebar.set(!$showSidebar);
}} }}
@ -473,7 +473,7 @@
{#if $user?.role === 'admin'} {#if $user?.role === 'admin'}
<div class="px-1.5 flex justify-center text-gray-800 dark:text-gray-200"> <div class="px-1.5 flex justify-center text-gray-800 dark:text-gray-200">
<a <a
class="flex-grow flex space-x-3 rounded-lg px-2.5 py-2 hover:bg-gray-100 dark:hover:bg-gray-900 transition" class="flex-grow flex space-x-3 rounded-lg px-2 py-[7px] hover:bg-gray-100 dark:hover:bg-gray-900 transition"
href="/workspace" href="/workspace"
on:click={() => { on:click={() => {
selectedChatId = null; selectedChatId = null;