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