From 2ed2a7baca17106253f58ecbdd3cb4099fc3f3d7 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Tue, 6 Jul 2021 03:36:02 +0200 Subject: [PATCH 1/3] Export under anki.components --- ts/deck-options/index.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/ts/deck-options/index.ts b/ts/deck-options/index.ts index 5fa0c33a2..3d6794f89 100644 --- a/ts/deck-options/index.ts +++ b/ts/deck-options/index.ts @@ -9,11 +9,6 @@ import { getDeckOptionsInfo, DeckOptionsState } from "./lib"; import { setupI18n, ModuleName } from "lib/i18n"; import { checkNightMode } from "lib/nightmode"; import DeckOptionsPage from "./DeckOptionsPage.svelte"; -import SpinBox from "./SpinBox.svelte"; -import SpinBoxFloat from "./SpinBoxFloat.svelte"; -import EnumSelector from "./EnumSelector.svelte"; -import CheckBox from "./CheckBox.svelte"; - import { nightModeKey, touchDeviceKey, modalsKey } from "components/context-keys"; export async function deckOptions( @@ -49,9 +44,16 @@ export async function deckOptions( } as any); } -export const deckConfigComponents = { - SpinBox, - SpinBoxFloat, - EnumSelector, - CheckBox, +import TitledContainer from "./TitledContainer.svelte"; +import SpinBoxRow from "./SpinBoxRow.svelte"; +import SpinBoxFloatRow from "./SpinBoxFloatRow.svelte"; +import EnumSelectorRow from "./EnumSelectorRow.svelte"; +import SwitchRow from "./SwitchRow.svelte"; + +export const components = { + TitledContainer, + SpinBoxRow, + SpinBoxFloatRow, + EnumSelectorRow, + SwitchRow, }; From ca4d4424e6d9c238f13e13ebd7aee0ac06bcbf91 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Tue, 6 Jul 2021 03:43:40 +0200 Subject: [PATCH 2/3] Don't use containers components within Container - dynamic componets will be placed outside of the inner container --- ts/deck-options/DeckOptionsPage.svelte | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ts/deck-options/DeckOptionsPage.svelte b/ts/deck-options/DeckOptionsPage.svelte index 90384cc44..72089665e 100644 --- a/ts/deck-options/DeckOptionsPage.svelte +++ b/ts/deck-options/DeckOptionsPage.svelte @@ -57,8 +57,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html - -
+
+ @@ -96,17 +96,17 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -
- + +