mirror of
https://github.com/open-webui/open-webui
synced 2024-11-28 23:13:30 +00:00
refac
This commit is contained in:
parent
5d848ad130
commit
aed8e2156f
@ -283,6 +283,16 @@
|
|||||||
await goto('/');
|
await goto('/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showControls.subscribe(async (value) => {
|
||||||
|
if (controlPane) {
|
||||||
|
if (value) {
|
||||||
|
controlPane.resize(parseInt(localStorage.getItem('chat-controls-size') || '35'));
|
||||||
|
} else {
|
||||||
|
controlPane.resize(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
@ -1764,7 +1774,6 @@
|
|||||||
bind:selectedModels
|
bind:selectedModels
|
||||||
bind:showModelSelector
|
bind:showModelSelector
|
||||||
shareEnabled={messages.length > 0}
|
shareEnabled={messages.length > 0}
|
||||||
{controlPane}
|
|
||||||
{chat}
|
{chat}
|
||||||
{initNewChat}
|
{initNewChat}
|
||||||
/>
|
/>
|
||||||
@ -1847,8 +1856,8 @@
|
|||||||
{messages}
|
{messages}
|
||||||
{submitPrompt}
|
{submitPrompt}
|
||||||
{stopResponse}
|
{stopResponse}
|
||||||
on:call={() => {
|
on:call={async () => {
|
||||||
showControls.set(true);
|
await showControls.set(true);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -140,17 +140,19 @@
|
|||||||
: 'px-5 py-4 bg-white dark:shadow-lg dark:bg-gray-850 border border-gray-50 dark:border-gray-800'} rounded-lg z-50 pointer-events-auto overflow-y-auto scrollbar-hidden"
|
: 'px-5 py-4 bg-white dark:shadow-lg dark:bg-gray-850 border border-gray-50 dark:border-gray-800'} rounded-lg z-50 pointer-events-auto overflow-y-auto scrollbar-hidden"
|
||||||
>
|
>
|
||||||
{#if $showCallOverlay}
|
{#if $showCallOverlay}
|
||||||
<CallOverlay
|
<div class="w-full h-full flex justify-center">
|
||||||
bind:files
|
<CallOverlay
|
||||||
{submitPrompt}
|
bind:files
|
||||||
{stopResponse}
|
{submitPrompt}
|
||||||
{modelId}
|
{stopResponse}
|
||||||
{chatId}
|
{modelId}
|
||||||
{eventTarget}
|
{chatId}
|
||||||
on:close={() => {
|
{eventTarget}
|
||||||
showControls.set(false);
|
on:close={() => {
|
||||||
}}
|
showControls.set(false);
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
{:else if $showOverview}
|
{:else if $showOverview}
|
||||||
<Overview
|
<Overview
|
||||||
{history}
|
{history}
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
export let initNewChat: Function;
|
export let initNewChat: Function;
|
||||||
export let title: string = $WEBUI_NAME;
|
export let title: string = $WEBUI_NAME;
|
||||||
export let shareEnabled: boolean = false;
|
export let shareEnabled: boolean = false;
|
||||||
export let controlPane;
|
|
||||||
|
|
||||||
export let chat;
|
export let chat;
|
||||||
export let selectedModels;
|
export let selectedModels;
|
||||||
@ -112,16 +111,6 @@
|
|||||||
class=" flex cursor-pointer px-2 py-2 rounded-xl hover:bg-gray-50 dark:hover:bg-gray-850 transition"
|
class=" flex cursor-pointer px-2 py-2 rounded-xl hover:bg-gray-50 dark:hover:bg-gray-850 transition"
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
await showControls.set(!$showControls);
|
await showControls.set(!$showControls);
|
||||||
|
|
||||||
if (controlPane) {
|
|
||||||
if ($showControls) {
|
|
||||||
controlPane.resize(
|
|
||||||
parseInt(localStorage.getItem('chat-controls-size') || '35')
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
controlPane.resize(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
aria-label="Controls"
|
aria-label="Controls"
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user