rf: dom queries in layout and pages

This commit is contained in:
Carlos Daniel Vilaseca
2024-03-03 23:02:11 -05:00
parent 50acdb09de
commit b986c2aefd
7 changed files with 32 additions and 32 deletions
+3 -2
View File
@@ -37,7 +37,7 @@
let ollamaVersion = '';
let loaded = false;
let showShortcutsButton:HTMLButtonElement
let DB = null;
let localDBChats = [];
@@ -184,7 +184,7 @@
if (isCtrlPressed && event.key === '/') {
event.preventDefault();
console.log('showShortcuts');
document.getElementById('show-shortcuts-button')?.click();
showShortcutsButton.click();
}
});
@@ -203,6 +203,7 @@
<div class=" hidden lg:flex fixed bottom-0 right-0 px-3 py-3 z-10">
<button
id="show-shortcuts-button"
bind:this={showShortcutsButton}
class="text-gray-600 dark:text-gray-300 bg-gray-300/20 w-6 h-6 flex items-center justify-center text-xs rounded-full"
on:click={() => {
showShortcuts = !showShortcuts;