From 412091ae60892b4635ed4aaaaae63444a19a6f24 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Tue, 25 May 2021 15:30:43 +0200 Subject: [PATCH 1/4] Inline some bootstrap-dark styling --- ts/deckoptions/BUILD.bazel | 1 + ts/deckoptions/TextInputModal.svelte | 19 +++++++++++++++++-- ts/deckoptions/textInputModal.ts | 13 +++++++++++-- ts/sass/bootstrap-dark.scss | 9 --------- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/ts/deckoptions/BUILD.bazel b/ts/deckoptions/BUILD.bazel index a6a9119c3..b4ab8312e 100644 --- a/ts/deckoptions/BUILD.bazel +++ b/ts/deckoptions/BUILD.bazel @@ -70,6 +70,7 @@ ts_library( "//ts/lib", "//ts/lib:backend_proto", "//ts/sveltelib", + "//ts/components", "@npm//lodash-es", "@npm//svelte", ], diff --git a/ts/deckoptions/TextInputModal.svelte b/ts/deckoptions/TextInputModal.svelte index 7f199a655..d1f24cd02 100644 --- a/ts/deckoptions/TextInputModal.svelte +++ b/ts/deckoptions/TextInputModal.svelte @@ -6,7 +6,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html /* eslint @typescript-eslint/no-non-null-assertion: "off", */ - import { onMount, onDestroy } from "svelte"; + import { onMount, onDestroy, getContext } from "svelte"; + import { nightModeKey } from "components/contextKeys"; import Modal from "bootstrap/js/dist/modal"; export let title: string; @@ -44,16 +45,30 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html container.removeEventListener("shown.bs.modal", onShown); container.removeEventListener("hidden.bs.modal", onHidden); }); + + const nightMode = getContext(nightModeKey); + +