mirror of
https://github.com/open-webui/open-webui
synced 2024-11-24 21:13:59 +00:00
Merge pull request #4047 from Peter-De-Ath/confirmDialog-add-inputValue
feat: add eventConfirmationInputValue handling in Chat.svelte
This commit is contained in:
commit
a47e4a1148
@ -80,6 +80,7 @@
|
|||||||
let eventConfirmationMessage = '';
|
let eventConfirmationMessage = '';
|
||||||
let eventConfirmationInput = false;
|
let eventConfirmationInput = false;
|
||||||
let eventConfirmationInputPlaceholder = '';
|
let eventConfirmationInputPlaceholder = '';
|
||||||
|
let eventConfirmationInputValue = '';
|
||||||
let eventCallback = null;
|
let eventCallback = null;
|
||||||
|
|
||||||
let showModelSelector = true;
|
let showModelSelector = true;
|
||||||
@ -182,6 +183,7 @@
|
|||||||
eventConfirmationTitle = data.title;
|
eventConfirmationTitle = data.title;
|
||||||
eventConfirmationMessage = data.message;
|
eventConfirmationMessage = data.message;
|
||||||
eventConfirmationInputPlaceholder = data.placeholder;
|
eventConfirmationInputPlaceholder = data.placeholder;
|
||||||
|
eventConfirmationInputValue = data?.value ?? '';
|
||||||
} else {
|
} else {
|
||||||
console.log('Unknown message type', data);
|
console.log('Unknown message type', data);
|
||||||
}
|
}
|
||||||
@ -1489,6 +1491,7 @@
|
|||||||
message={eventConfirmationMessage}
|
message={eventConfirmationMessage}
|
||||||
input={eventConfirmationInput}
|
input={eventConfirmationInput}
|
||||||
inputPlaceholder={eventConfirmationInputPlaceholder}
|
inputPlaceholder={eventConfirmationInputPlaceholder}
|
||||||
|
inputValue={eventConfirmationInputValue}
|
||||||
on:confirm={(e) => {
|
on:confirm={(e) => {
|
||||||
if (e.detail) {
|
if (e.detail) {
|
||||||
eventCallback(e.detail);
|
eventCallback(e.detail);
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
|
|
||||||
export let input = false;
|
export let input = false;
|
||||||
export let inputPlaceholder = '';
|
export let inputPlaceholder = '';
|
||||||
|
export let inputValue = '';
|
||||||
|
|
||||||
export let show = false;
|
export let show = false;
|
||||||
|
|
||||||
let modalElement = null;
|
let modalElement = null;
|
||||||
let mounted = false;
|
let mounted = false;
|
||||||
let inputValue = '';
|
|
||||||
|
|
||||||
const handleKeyDown = (event: KeyboardEvent) => {
|
const handleKeyDown = (event: KeyboardEvent) => {
|
||||||
if (event.key === 'Escape') {
|
if (event.key === 'Escape') {
|
||||||
|
Loading…
Reference in New Issue
Block a user