Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
cbe3694b
"src/git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "8df0429c99d1efc19d6f2c1bc89b458380a96c64"
Commit
cbe3694b
authored
Jul 22, 2024
by
Peter De-Ath
Browse files
refac: add eventConfirmationInputValue handling in Chat.svelte
parent
63eda0fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
src/lib/components/chat/Chat.svelte
src/lib/components/chat/Chat.svelte
+3
-0
src/lib/components/common/ConfirmDialog.svelte
src/lib/components/common/ConfirmDialog.svelte
+1
-1
No files found.
src/lib/components/chat/Chat.svelte
View file @
cbe3694b
...
@@ -80,6 +80,7 @@
...
@@ -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 @@
...
@@ -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 @@
...
@@ -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);
...
...
src/lib/components/common/ConfirmDialog.svelte
View file @
cbe3694b
...
@@ -15,12 +15,12 @@
...
@@ -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') {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment