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
9451726e
Commit
9451726e
authored
Apr 20, 2024
by
Timothy J. Baek
Browse files
feat: save edited message shortcut
parent
97d68a6a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
0 deletions
+17
-0
backend/static/favicon.png
backend/static/favicon.png
+0
-0
src/lib/components/chat/Messages/UserMessage.svelte
src/lib/components/chat/Messages/UserMessage.svelte
+13
-0
static/favicon.png
static/favicon.png
+0
-0
static/logo.svg
static/logo.svg
+4
-0
No files found.
backend/static/favicon.png
View replaced file @
97d68a6a
View file @
9451726e
6.02 KB
|
W:
|
H:
10.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/lib/components/chat/Messages/UserMessage.svelte
View file @
9451726e
...
...
@@ -176,10 +176,23 @@
e.target.style.height = '';
e.target.style.height = `${e.target.scrollHeight}px`;
}}
on:keydown={(e) => {
const isCmdOrCtrlPressed = e.metaKey || e.ctrlKey;
// Check if Enter key is pressed
const isEnterPressed = e.key === 'Enter';
// Check if both Cmd/Ctrl and Enter are pressed simultaneously
if (isCmdOrCtrlPressed && isEnterPressed) {
document.getElementById('save-edit-message-button')?.click();
console.log('Cmd/Ctrl + Enter is pressed');
}
}}
/>
<div class=" mt-2 mb-1 flex justify-center space-x-2 text-sm font-medium">
<button
id="save-edit-message-button"
class="px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-gray-100 transition rounded-lg"
on:click={() => {
editMessageConfirmHandler();
...
...
static/favicon.png
View replaced file @
97d68a6a
View file @
9451726e
6.02 KB
|
W:
|
H:
10.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
static/logo.svg
0 → 100644
View file @
9451726e
<svg
width=
"500"
height=
"500"
viewBox=
"0 0 500 500"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<rect
x=
"347.666"
y=
"139"
width=
"44.3349"
height=
"221.675"
fill=
"black"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M202.643 360.287C263.75 360.287 313.287 310.75 313.287 249.643C313.287 188.537 263.75 139 202.643 139C141.537 139 92 188.537 92 249.643C92 310.75 141.537 360.287 202.643 360.287ZM202.645 316.029C239.309 316.029 269.031 286.307 269.031 249.643C269.031 212.979 239.309 183.257 202.645 183.257C165.981 183.257 136.259 212.979 136.259 249.643C136.259 286.307 165.981 316.029 202.645 316.029Z"
fill=
"black"
/>
</svg>
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