mirror of
https://github.com/open-webui/open-webui
synced 2025-02-07 05:27:55 +00:00
enh: save chat controls width
This commit is contained in:
parent
692f04d457
commit
98928f6bd7
@ -121,10 +121,14 @@
|
|||||||
</PaneResizer>
|
</PaneResizer>
|
||||||
<Pane
|
<Pane
|
||||||
bind:pane
|
bind:pane
|
||||||
defaultSize={$showControls ? localStorage.getItem('chat-controls-size') || 40 : 0}
|
defaultSize={$showControls
|
||||||
|
? Math.max(parseInt(localStorage.getItem('chat-controls-size') || '35'), 35)
|
||||||
|
: 0}
|
||||||
onResize={(size) => {
|
onResize={(size) => {
|
||||||
if (size === 0) {
|
if (size === 0) {
|
||||||
showControls.set(false);
|
showControls.set(false);
|
||||||
|
} else if (size < 35) {
|
||||||
|
pane.resize(0);
|
||||||
} else {
|
} else {
|
||||||
if (!$showControls) {
|
if (!$showControls) {
|
||||||
showControls.set(true);
|
showControls.set(true);
|
||||||
|
@ -115,7 +115,9 @@
|
|||||||
|
|
||||||
if (controlPane) {
|
if (controlPane) {
|
||||||
if ($showControls) {
|
if ($showControls) {
|
||||||
controlPane.resize(localStorage.getItem('chat-controls-size') || 40);
|
controlPane.resize(
|
||||||
|
Math.max(parseInt(localStorage.getItem('chat-controls-size') || '35'), 35)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
controlPane.resize(0);
|
controlPane.resize(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user