Commit 9451726e authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

feat: save edited message shortcut

parent 97d68a6a
backend/static/favicon.png

6.02 KB | W: | H:

backend/static/favicon.png

10.7 KB | W: | H:

backend/static/favicon.png
backend/static/favicon.png
backend/static/favicon.png
backend/static/favicon.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -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

6.02 KB | W: | H:

static/favicon.png

10.7 KB | W: | H:

static/favicon.png
static/favicon.png
static/favicon.png
static/favicon.png
  • 2-up
  • Swipe
  • Onion skin
<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>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment