diff --git a/qt/aqt/changenotetype.py b/qt/aqt/changenotetype.py index 3928bed04..89be796fb 100644 --- a/qt/aqt/changenotetype.py +++ b/qt/aqt/changenotetype.py @@ -52,7 +52,7 @@ class ChangeNotetypeDialog(QDialog): self.web = AnkiWebView(title=self.TITLE) self.web.setVisible(False) - self.web.load_ts_page("ChangeNotetype") + self.web.load_ts_page("change-notetype") layout = QVBoxLayout() layout.setContentsMargins(0, 0, 0, 0) layout.addWidget(self.web) diff --git a/qt/aqt/data/web/css/deckbrowser.scss b/qt/aqt/data/web/css/deckbrowser.scss index 21d7d54b7..6a123a23c 100644 --- a/qt/aqt/data/web/css/deckbrowser.scss +++ b/qt/aqt/data/web/css/deckbrowser.scss @@ -1,7 +1,7 @@ /* Copyright: Ankitects Pty Ltd and contributors * License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */ -@use 'ts/sass/card_counts'; +@use 'ts/sass/card-counts'; a.deck { color: var(--text-fg); diff --git a/qt/aqt/data/web/css/overview.scss b/qt/aqt/data/web/css/overview.scss index 7b9c4587e..7973aff99 100644 --- a/qt/aqt/data/web/css/overview.scss +++ b/qt/aqt/data/web/css/overview.scss @@ -1,7 +1,7 @@ /* Copyright: Ankitects Pty Ltd and contributors * License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */ -@use 'ts/sass/card_counts'; +@use 'ts/sass/card-counts'; .smallLink { font-size: 10px; diff --git a/qt/aqt/data/web/css/reviewer-bottom.scss b/qt/aqt/data/web/css/reviewer-bottom.scss index 3d2267b16..67ca6d3b2 100644 --- a/qt/aqt/data/web/css/reviewer-bottom.scss +++ b/qt/aqt/data/web/css/reviewer-bottom.scss @@ -1,7 +1,7 @@ /* Copyright: Ankitects Pty Ltd and contributors * License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */ -@use 'ts/sass/card_counts'; +@use 'ts/sass/card-counts'; body { margin: 0; diff --git a/qt/aqt/data/web/pages/BUILD.bazel b/qt/aqt/data/web/pages/BUILD.bazel index 8b24cbe54..b3aecd12f 100644 --- a/qt/aqt/data/web/pages/BUILD.bazel +++ b/qt/aqt/data/web/pages/BUILD.bazel @@ -3,8 +3,8 @@ load("//ts:copy.bzl", "copy_files_into_group") _pages = [ "graphs", "congrats", - "deckoptions", - "ChangeNotetype", + "deck-options", + "change-notetype", ] [copy_files_into_group( diff --git a/qt/aqt/deckoptions.py b/qt/aqt/deckoptions.py index 3e87cfcda..9027bc8fb 100644 --- a/qt/aqt/deckoptions.py +++ b/qt/aqt/deckoptions.py @@ -46,7 +46,7 @@ class DeckOptionsDialog(QDialog): self.web = AnkiWebView(title=self.TITLE) self.web.setVisible(False) - self.web.load_ts_page("deckoptions") + self.web.load_ts_page("deck-options") layout = QVBoxLayout() layout.setContentsMargins(0, 0, 0, 0) layout.addWidget(self.web) diff --git a/ts/ChangeNotetype/BUILD.bazel b/ts/change-notetype/BUILD.bazel similarity index 93% rename from ts/ChangeNotetype/BUILD.bazel rename to ts/change-notetype/BUILD.bazel index be24c1eac..697ae9685 100644 --- a/ts/ChangeNotetype/BUILD.bazel +++ b/ts/change-notetype/BUILD.bazel @@ -7,7 +7,7 @@ load("//ts:compile_sass.bzl", "compile_sass") load("//ts:jest.bzl", "jest_test") compile_sass( - srcs = ["ChangeNotetype-base.scss"], + srcs = ["change-notetype-base.scss"], group = "base_css", visibility = ["//visibility:public"], deps = [ @@ -48,7 +48,7 @@ ts_library( srcs = [ "lib.ts", ], - module_name = "ChangeNotetype", + module_name = "change-notetype", deps = [ "//ts/components", "//ts/lib", @@ -60,7 +60,7 @@ ts_library( ) esbuild( - name = "ChangeNotetype", + name = "change-notetype", srcs = [ "//ts:protobuf-shim.js", ], @@ -75,22 +75,22 @@ esbuild( external = [ "protobufjs/light", ], - output_css = "ChangeNotetype.css", + output_css = "change-notetype.css", visibility = ["//visibility:public"], deps = [ "index", + ":base_css", + "@npm//bootstrap", + "@npm//marked", "//ts/lib", "//ts/lib:backend_proto", - "@npm//bootstrap", - ":base_css", "//ts/sveltelib", - "@npm//marked", "//ts/components", "//ts/components:svelte_components", ] + svelte_names, ) -exports_files(["ChangeNotetype.html"]) +exports_files(["change-notetype.html"]) # Tests ################ diff --git a/ts/ChangeNotetype/ChangeNotetypePage.svelte b/ts/change-notetype/ChangeNotetypePage.svelte similarity index 100% rename from ts/ChangeNotetype/ChangeNotetypePage.svelte rename to ts/change-notetype/ChangeNotetypePage.svelte diff --git a/ts/ChangeNotetype/Mapper.svelte b/ts/change-notetype/Mapper.svelte similarity index 100% rename from ts/ChangeNotetype/Mapper.svelte rename to ts/change-notetype/Mapper.svelte diff --git a/ts/ChangeNotetype/MapperRow.svelte b/ts/change-notetype/MapperRow.svelte similarity index 100% rename from ts/ChangeNotetype/MapperRow.svelte rename to ts/change-notetype/MapperRow.svelte diff --git a/ts/ChangeNotetype/NotetypeSelector.svelte b/ts/change-notetype/NotetypeSelector.svelte similarity index 100% rename from ts/ChangeNotetype/NotetypeSelector.svelte rename to ts/change-notetype/NotetypeSelector.svelte diff --git a/ts/ChangeNotetype/SaveButton.svelte b/ts/change-notetype/SaveButton.svelte similarity index 100% rename from ts/ChangeNotetype/SaveButton.svelte rename to ts/change-notetype/SaveButton.svelte diff --git a/ts/ChangeNotetype/ChangeNotetype-base.scss b/ts/change-notetype/change-notetype-base.scss similarity index 100% rename from ts/ChangeNotetype/ChangeNotetype-base.scss rename to ts/change-notetype/change-notetype-base.scss diff --git a/ts/ChangeNotetype/ChangeNotetype.html b/ts/change-notetype/change-notetype.html similarity index 79% rename from ts/ChangeNotetype/ChangeNotetype.html rename to ts/change-notetype/change-notetype.html index ffb644492..244e1cf81 100644 --- a/ts/ChangeNotetype/ChangeNotetype.html +++ b/ts/change-notetype/change-notetype.html @@ -3,11 +3,11 @@ - - + + - +
diff --git a/ts/ChangeNotetype/index.ts b/ts/change-notetype/index.ts similarity index 95% rename from ts/ChangeNotetype/index.ts rename to ts/change-notetype/index.ts index 89482144d..67bb83707 100644 --- a/ts/ChangeNotetype/index.ts +++ b/ts/change-notetype/index.ts @@ -9,7 +9,7 @@ import { ChangeNotetypeState, getChangeNotetypeInfo, getNotetypeNames } from "./ import { setupI18n, ModuleName } from "lib/i18n"; import { checkNightMode } from "lib/nightmode"; import ChangeNotetypePage from "./ChangeNotetypePage.svelte"; -import { nightModeKey } from "components/contextKeys"; +import { nightModeKey } from "components/context-keys"; export async function changeNotetypePage( target: HTMLDivElement, diff --git a/ts/ChangeNotetype/lib.test.ts b/ts/change-notetype/lib.test.ts similarity index 100% rename from ts/ChangeNotetype/lib.test.ts rename to ts/change-notetype/lib.test.ts diff --git a/ts/ChangeNotetype/lib.ts b/ts/change-notetype/lib.ts similarity index 100% rename from ts/ChangeNotetype/lib.ts rename to ts/change-notetype/lib.ts diff --git a/ts/components/ButtonDropdown.svelte b/ts/components/ButtonDropdown.svelte index 8c18d92a3..4beaaccc0 100644 --- a/ts/components/ButtonDropdown.svelte +++ b/ts/components/ButtonDropdown.svelte @@ -4,7 +4,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> - - - - - - diff --git a/ts/components/contextKeys.ts b/ts/components/context-keys.ts similarity index 100% rename from ts/components/contextKeys.ts rename to ts/components/context-keys.ts diff --git a/ts/components/types.ts b/ts/components/types.ts deleted file mode 100644 index ef4b39a31..000000000 --- a/ts/components/types.ts +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright: Ankitects Pty Ltd and contributors -// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import type { DynamicSvelteComponent } from "sveltelib/dynamicComponent"; -import type { SvelteComponentDev } from "svelte/internal"; - -export interface ToolbarItem< - T extends typeof SvelteComponentDev = typeof SvelteComponentDev -> extends DynamicSvelteComponent { - id?: string; - hidden?: boolean; -} - -export interface IterableToolbarItem< - T extends typeof SvelteComponentDev = typeof SvelteComponentDev -> extends ToolbarItem { - items: ToolbarItem[]; -} diff --git a/ts/deckoptions/Addons.svelte b/ts/deck-options/Addons.svelte similarity index 100% rename from ts/deckoptions/Addons.svelte rename to ts/deck-options/Addons.svelte diff --git a/ts/deckoptions/AdvancedOptions.svelte b/ts/deck-options/AdvancedOptions.svelte similarity index 100% rename from ts/deckoptions/AdvancedOptions.svelte rename to ts/deck-options/AdvancedOptions.svelte diff --git a/ts/deckoptions/AudioOptions.svelte b/ts/deck-options/AudioOptions.svelte similarity index 100% rename from ts/deckoptions/AudioOptions.svelte rename to ts/deck-options/AudioOptions.svelte diff --git a/ts/deckoptions/BUILD.bazel b/ts/deck-options/BUILD.bazel similarity index 95% rename from ts/deckoptions/BUILD.bazel rename to ts/deck-options/BUILD.bazel index 688733c84..6703cb8b5 100644 --- a/ts/deckoptions/BUILD.bazel +++ b/ts/deck-options/BUILD.bazel @@ -8,7 +8,7 @@ load("//ts:compile_sass.bzl", "compile_sass") load("//ts:jest.bzl", "jest_test") compile_sass( - srcs = ["deckoptions-base.scss"], + srcs = ["deck-options-base.scss"], group = "base_css", visibility = ["//visibility:public"], deps = [ @@ -76,7 +76,7 @@ ts_library( ) esbuild( - name = "deckoptions", + name = "deck-options", srcs = [ "//ts:protobuf-shim.js", ], @@ -91,23 +91,23 @@ esbuild( external = [ "protobufjs/light", ], - output_css = "deckoptions.css", + output_css = "deck-options.css", visibility = ["//visibility:public"], deps = [ "index", + ":bootstrap-icons", + ":base_css", + "@npm//bootstrap", + "@npm//marked", "//ts/lib", "//ts/lib:backend_proto", - ":bootstrap-icons", - "@npm//bootstrap", - ":base_css", "//ts/sveltelib", - "@npm//marked", "//ts/components", "//ts/components:svelte_components", ] + svelte_names, ) -exports_files(["deckoptions.html"]) +exports_files(["deck-options.html"]) # Tests ################ diff --git a/ts/deckoptions/Badge.svelte b/ts/deck-options/Badge.svelte similarity index 94% rename from ts/deckoptions/Badge.svelte rename to ts/deck-options/Badge.svelte index 5fbfa4d4b..be767bb24 100644 --- a/ts/deckoptions/Badge.svelte +++ b/ts/deck-options/Badge.svelte @@ -4,7 +4,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> - +
diff --git a/ts/deckoptions/icons.ts b/ts/deck-options/icons.ts similarity index 100% rename from ts/deckoptions/icons.ts rename to ts/deck-options/icons.ts diff --git a/ts/deckoptions/index.ts b/ts/deck-options/index.ts similarity index 98% rename from ts/deckoptions/index.ts rename to ts/deck-options/index.ts index 436146eb1..5fa0c33a2 100644 --- a/ts/deckoptions/index.ts +++ b/ts/deck-options/index.ts @@ -14,7 +14,7 @@ import SpinBoxFloat from "./SpinBoxFloat.svelte"; import EnumSelector from "./EnumSelector.svelte"; import CheckBox from "./CheckBox.svelte"; -import { nightModeKey, touchDeviceKey, modalsKey } from "components/contextKeys"; +import { nightModeKey, touchDeviceKey, modalsKey } from "components/context-keys"; export async function deckOptions( target: HTMLDivElement, diff --git a/ts/deckoptions/lib.test.ts b/ts/deck-options/lib.test.ts similarity index 100% rename from ts/deckoptions/lib.test.ts rename to ts/deck-options/lib.test.ts diff --git a/ts/deckoptions/lib.ts b/ts/deck-options/lib.ts similarity index 100% rename from ts/deckoptions/lib.ts rename to ts/deck-options/lib.ts diff --git a/ts/deckoptions/steps.test.ts b/ts/deck-options/steps.test.ts similarity index 100% rename from ts/deckoptions/steps.test.ts rename to ts/deck-options/steps.test.ts diff --git a/ts/deckoptions/steps.ts b/ts/deck-options/steps.ts similarity index 100% rename from ts/deckoptions/steps.ts rename to ts/deck-options/steps.ts diff --git a/ts/deckoptions/strings.ts b/ts/deck-options/strings.ts similarity index 100% rename from ts/deckoptions/strings.ts rename to ts/deck-options/strings.ts diff --git a/ts/editor/ClozeButton.svelte b/ts/editor/ClozeButton.svelte index e5fa9f934..a83428583 100644 --- a/ts/editor/ClozeButton.svelte +++ b/ts/editor/ClozeButton.svelte @@ -4,8 +4,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/editor/TemplateButtons.svelte b/ts/editor/TemplateButtons.svelte index 42dd4164b..693a7b4b7 100644 --- a/ts/editor/TemplateButtons.svelte +++ b/ts/editor/TemplateButtons.svelte @@ -5,8 +5,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html