mirror of
https://github.com/open-webui/open-webui
synced 2024-11-24 21:13:59 +00:00
feat: save edited message shortcut
This commit is contained in:
parent
97d68a6a05
commit
9451726ee6
Binary file not shown.
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 11 KiB |
@ -176,10 +176,23 @@
|
|||||||
e.target.style.height = '';
|
e.target.style.height = '';
|
||||||
e.target.style.height = `${e.target.scrollHeight}px`;
|
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">
|
<div class=" mt-2 mb-1 flex justify-center space-x-2 text-sm font-medium">
|
||||||
<button
|
<button
|
||||||
|
id="save-edit-message-button"
|
||||||
class="px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-gray-100 transition rounded-lg"
|
class="px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-gray-100 transition rounded-lg"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
editMessageConfirmHandler();
|
editMessageConfirmHandler();
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 11 KiB |
4
static/logo.svg
Normal file
4
static/logo.svg
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<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>
|
After Width: | Height: | Size: 634 B |
Loading…
Reference in New Issue
Block a user