From 9418bd9c7d0cd31e2e1356db52dd472e1561a654 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Wed, 1 May 2024 09:49:57 +0200 Subject: [PATCH] Improve and unify web dialog styling (#3167) * Rework ChangeNotetypePage with existing components * Use disabled Select instead of LabelButton * Don't use button for unclickable arrow * Rework ImportLogPage with existing components * Improve deck options styling * Align spacing in ChangeNotetypePage further * Use StickyContainer on ImportPage * Format --- ftl/core/importing.ftl | 1 + ts/lib/components/ButtonToolbar.svelte | 7 +- ts/lib/components/StickyHeader.svelte | 35 +++--- ts/lib/components/TitledContainer.svelte | 3 +- ts/lib/components/VirtualTable.svelte | 4 +- .../change-notetype/ChangeNotetypePage.svelte | 57 ++++----- .../change-notetype/NotetypeSelector.svelte | 31 ++--- ts/routes/change-notetype/StickyHeader.svelte | 52 ++------- ts/routes/deck-options/SaveButton.svelte | 108 +++++++++--------- ts/routes/deck-options/TabbedValue.svelte | 3 +- ts/routes/import-page/CloseButton.svelte | 53 --------- ts/routes/import-page/DetailsTable.svelte | 98 ++++++++-------- ts/routes/import-page/ImportLogPage.svelte | 69 ++++++----- ts/routes/import-page/ImportPage.svelte | 2 +- 14 files changed, 215 insertions(+), 308 deletions(-) delete mode 100644 ts/routes/import-page/CloseButton.svelte diff --git a/ftl/core/importing.ftl b/ftl/core/importing.ftl index 514719bf7..0987818e1 100644 --- a/ftl/core/importing.ftl +++ b/ftl/core/importing.ftl @@ -234,6 +234,7 @@ importing-match-scope-help = importing-tag-all-notes-help = These tags will be added to both newly-imported and updated notes. importing-tag-updated-notes-help = These tags will be added to any updated notes. +importing-overview = Overview ## NO NEED TO TRANSLATE. This text is no longer used by Anki, and will be removed in the future. diff --git a/ts/lib/components/ButtonToolbar.svelte b/ts/lib/components/ButtonToolbar.svelte index 27d193a06..69a64b2f4 100644 --- a/ts/lib/components/ButtonToolbar.svelte +++ b/ts/lib/components/ButtonToolbar.svelte @@ -39,11 +39,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html .button-toolbar { flex-wrap: var(--buttons-wrap); padding-left: 0.15rem; - - :global(.button-group) { - /* TODO replace with gap once available */ - margin-right: 0.15rem; - margin-bottom: 0.15rem; - } + gap: 1rem; } diff --git a/ts/lib/components/StickyHeader.svelte b/ts/lib/components/StickyHeader.svelte index e23fab216..54abfb0aa 100644 --- a/ts/lib/components/StickyHeader.svelte +++ b/ts/lib/components/StickyHeader.svelte @@ -8,6 +8,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import LabelButton from "./LabelButton.svelte"; import Shortcut from "./Shortcut.svelte"; + import StickyContainer from "./StickyContainer.svelte"; + import ButtonToolbar from "./ButtonToolbar.svelte"; export let path: string; export let onImport: () => void; @@ -19,9 +21,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html } - - + + + diff --git a/ts/routes/change-notetype/NotetypeSelector.svelte b/ts/routes/change-notetype/NotetypeSelector.svelte index cf8840366..2eaeae770 100644 --- a/ts/routes/change-notetype/NotetypeSelector.svelte +++ b/ts/routes/change-notetype/NotetypeSelector.svelte @@ -3,11 +3,9 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> - - {$info.oldNotetypeName} - - - {#if window.getComputedStyle(document.body).direction == "rtl"} - - {:else} - - {/if} - - +
+ {#if window.getComputedStyle(document.body).direction == "rtl"} + + {:else} + + {/if} +
+