From c7c81c8f1514161e9dceca9e6688a3de25622f41 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 22 Apr 2021 21:57:32 +1000 Subject: [PATCH] override some bootstrap styles for night mode There's probably a better way to accomplish this - fixes welcome! Also fix the page reloading when enter hit inside the modal. --- ts/deckconfig/DeckConfigPage.svelte | 3 --- ts/deckconfig/TextInputModal.svelte | 11 ++------ ts/deckconfig/deckconfig-base.scss | 2 ++ ts/sass/BUILD.bazel | 1 + ts/sass/bootstrap-dark.scss | 39 +++++++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 ts/sass/bootstrap-dark.scss diff --git a/ts/deckconfig/DeckConfigPage.svelte b/ts/deckconfig/DeckConfigPage.svelte index 2997930d1..754807293 100644 --- a/ts/deckconfig/DeckConfigPage.svelte +++ b/ts/deckconfig/DeckConfigPage.svelte @@ -16,9 +16,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html evt.getModifierState(primaryModifierForPlatform()) ) { state.save(false); - } else { - console.log(evt.getModifierState(primaryModifierForPlatform())); - console.log(primaryModifierForPlatform()); } } diff --git a/ts/deckconfig/TextInputModal.svelte b/ts/deckconfig/TextInputModal.svelte index 917e4dbed..7f199a655 100644 --- a/ts/deckconfig/TextInputModal.svelte +++ b/ts/deckconfig/TextInputModal.svelte @@ -31,13 +31,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html modal.hide(); } - function onKeyUp(evt: KeyboardEvent): void { - if (evt.code === "Enter") { - evt.stopPropagation(); - onOkClicked(); - } - } - onMount(() => { const container = document.getElementById("modal")!; container.addEventListener("shown.bs.modal", onShown); @@ -54,7 +47,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html