From 59d36ed2088d0ac37b209b6dc6ce14415ab64239 Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Thu, 23 Feb 2023 11:03:15 +0100 Subject: [PATCH] Some UI improvements --- gui/dashboard/app.css | 2 +- gui/dashboard/settings.svelte | 19 +++++++++++++++---- index.js | 16 +++++----------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/gui/dashboard/app.css b/gui/dashboard/app.css index f62e8c8..5771a1f 100644 --- a/gui/dashboard/app.css +++ b/gui/dashboard/app.css @@ -40,7 +40,7 @@ button { } .btn { - border: 1px solid var(--dark); + border: 1px solid var(--body-fg); padding: 0.7rem; border-radius: var(--radius); } diff --git a/gui/dashboard/settings.svelte b/gui/dashboard/settings.svelte index 14a927a..c941111 100644 --- a/gui/dashboard/settings.svelte +++ b/gui/dashboard/settings.svelte @@ -4,9 +4,11 @@ let open = false; let showCopyCheck = false; + let copyButton; - function toggle() { - open = !open; + function openModal() { + open = true; + copyButton?.focus(); } function copy() { @@ -16,15 +18,24 @@ setTimeout(() => showCopyCheck = false, 2000); } } + + function keydown(event) { + if ((event.key === ',') && (event.metaKey || event.ctrlKey)) { + event.preventDefault(); + openModal(); + } + } -
-