mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
refac/fix: dynamic height for command options
This commit is contained in:
parent
2ed9896dea
commit
28faaa23c4
3 changed files with 8 additions and 3 deletions
|
|
@ -78,7 +78,6 @@
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
window.addEventListener('resize', adjustHeight);
|
window.addEventListener('resize', adjustHeight);
|
||||||
adjustHeight();
|
|
||||||
|
|
||||||
let notes = await getNoteList(localStorage.token).catch(() => {
|
let notes = await getNoteList(localStorage.token).catch(() => {
|
||||||
return [];
|
return [];
|
||||||
|
|
@ -175,6 +174,9 @@
|
||||||
fuse = new Fuse(items, {
|
fuse = new Fuse(items, {
|
||||||
keys: ['name', 'description']
|
keys: ['name', 'description']
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await tick();
|
||||||
|
adjustHeight();
|
||||||
});
|
});
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
|
|
|
||||||
|
|
@ -76,13 +76,14 @@
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
window.addEventListener('resize', adjustHeight);
|
window.addEventListener('resize', adjustHeight);
|
||||||
adjustHeight();
|
|
||||||
|
|
||||||
await tick();
|
await tick();
|
||||||
const chatInputElement = document.getElementById('chat-input');
|
const chatInputElement = document.getElementById('chat-input');
|
||||||
await tick();
|
await tick();
|
||||||
chatInputElement?.focus();
|
chatInputElement?.focus();
|
||||||
await tick();
|
await tick();
|
||||||
|
|
||||||
|
adjustHeight();
|
||||||
});
|
});
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,10 @@
|
||||||
onSelect({ type: 'prompt', data: command });
|
onSelect({ type: 'prompt', data: command });
|
||||||
};
|
};
|
||||||
|
|
||||||
onMount(() => {
|
onMount(async () => {
|
||||||
window.addEventListener('resize', adjustHeight);
|
window.addEventListener('resize', adjustHeight);
|
||||||
|
|
||||||
|
await tick();
|
||||||
adjustHeight();
|
adjustHeight();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue