mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 15:53:59 -06:00
refac
This commit is contained in:
@@ -373,7 +373,7 @@
|
||||
|
||||
$socket?.on('events:channel', channelEventHandler);
|
||||
|
||||
mediaQuery = window.matchMedia('(min-width: 1024px)');
|
||||
mediaQuery = window.matchMedia('(min-width: 768px)');
|
||||
|
||||
mediaQuery.addEventListener('change', handleMediaQuery);
|
||||
handleMediaQuery(mediaQuery);
|
||||
@@ -553,6 +553,7 @@
|
||||
bind:width={threadPanelWidth}
|
||||
minWidth={320}
|
||||
maxWidth={640}
|
||||
minSiblingWidth={360}
|
||||
className="h-full"
|
||||
>
|
||||
<div class="h-full w-full border-l border-gray-100/60 dark:border-gray-800/40">
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
<ResizableSidePanel
|
||||
open={$showControls}
|
||||
bind:width={controlsWidth}
|
||||
minWidth={300}
|
||||
minWidth={280}
|
||||
minSiblingWidth={360}
|
||||
storageKey="chatControlsSize"
|
||||
className="h-full z-10 bg-white dark:bg-gray-900"
|
||||
|
||||
@@ -139,7 +139,10 @@
|
||||
chevronClassName="size-2.5"
|
||||
chevronStrokeWidth="2"
|
||||
>
|
||||
<div class="pt-1 pb-1 text-xs" slot="content">
|
||||
<div
|
||||
class="pt-1 pb-1 text-xs [&_label]:truncate [&_label]:pb-1 [&_label]:-mb-1 [&_label+div]:shrink-0 [&_.inline-tooltip_label]:cursor-help!"
|
||||
slot="content"
|
||||
>
|
||||
<div>
|
||||
<AdvancedParams
|
||||
admin={$user?.role === 'admin'}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import {
|
||||
chatId as activeChatId,
|
||||
config,
|
||||
mobile,
|
||||
settings,
|
||||
showControls,
|
||||
showSettings,
|
||||
@@ -68,7 +69,7 @@
|
||||
const selectDirect = async (terminal: (typeof directTerminals)[0]) => {
|
||||
const newId = $selectedTerminalId === terminal.url ? null : terminal.url;
|
||||
selectedTerminalId.set(newId);
|
||||
if (newId && window.matchMedia('(min-width: 1024px)').matches) {
|
||||
if (newId && !$mobile) {
|
||||
showControls.set($settings?.showFilesOnTerminalSelect ?? true);
|
||||
}
|
||||
|
||||
@@ -92,7 +93,7 @@
|
||||
const selectSystem = async (terminal: (typeof systemTerminals)[0]) => {
|
||||
const newId = $selectedTerminalId === terminal.id ? null : terminal.id;
|
||||
selectedTerminalId.set(newId);
|
||||
if (newId && window.matchMedia('(min-width: 1024px)').matches) {
|
||||
if (newId && !$mobile) {
|
||||
showControls.set($settings?.showFilesOnTerminalSelect ?? true);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,9 +88,11 @@
|
||||
const quietButton =
|
||||
'focus-ring flex h-[1.6875rem] shrink-0 items-center justify-center gap-1 rounded-lg px-1.5 text-[0.6875rem] font-normal text-gray-500 hover:bg-gray-50/60 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800/60 dark:hover:text-gray-200';
|
||||
$: if (show && typeof window !== 'undefined') {
|
||||
const savedPreview = localStorage.getItem('searchPreview');
|
||||
preview =
|
||||
window.matchMedia('(min-width: 1024px)').matches &&
|
||||
localStorage.getItem('searchPreview') !== 'false';
|
||||
savedPreview === null
|
||||
? window.matchMedia('(min-width: 768px)').matches
|
||||
: savedPreview === 'true';
|
||||
}
|
||||
$: schedule(show, query, kind, sharing, scope);
|
||||
|
||||
|
||||
@@ -104,7 +104,6 @@
|
||||
import MoreHorizontalIcon from './Sidebar/icons/MoreHorizontal.svelte';
|
||||
import MobileSwipePanel from '../common/MobileSwipePanel.svelte';
|
||||
|
||||
const BREAKPOINT = 768;
|
||||
const DEFAULT_PINNED_ITEMS = ['notes', 'workspace'];
|
||||
|
||||
let scrollTop = 0;
|
||||
|
||||
Reference in New Issue
Block a user