diff --git a/frontend/src/ts/elements/settings/account-settings-notice.ts b/frontend/src/ts/elements/settings/account-settings-notice.ts index 7b54c68708dc..52bc92a9743a 100644 --- a/frontend/src/ts/elements/settings/account-settings-notice.ts +++ b/frontend/src/ts/elements/settings/account-settings-notice.ts @@ -1,7 +1,7 @@ import { z } from "zod"; import { LocalStorageWithSchema } from "../../utils/local-storage-with-schema"; import { navigate } from "../../controllers/route-controller"; -import { qs, qsa } from "../../utils/dom"; +import { qsa } from "../../utils/dom"; const ls = new LocalStorageWithSchema({ key: "accountSettingsMessageDismissed", @@ -13,7 +13,7 @@ if (ls.get()) { qsa(".pageSettings .accountSettingsNotice")?.remove(); } -qs(".pageSettings .accountSettingsNotice .dismissAndGo")?.on("click", () => { +qsa(".pageSettings .accountSettingsNotice .dismissAndGo").on("click", () => { ls.set(true); void navigate("/account-settings"); qsa(".pageSettings .accountSettingsNotice")?.remove(); diff --git a/frontend/src/ts/modals/custom-generator.ts b/frontend/src/ts/modals/custom-generator.ts index e4f2c3fa4dc7..8292f1217b62 100644 --- a/frontend/src/ts/modals/custom-generator.ts +++ b/frontend/src/ts/modals/custom-generator.ts @@ -93,7 +93,9 @@ export async function show(showOptions?: ShowOptions): Promise { function applyPreset(): void { const modalEl = modal.getModal(); - const presetName = modalEl.qs(".presetInput")?.getValue(); + const presetName = modalEl + .qs("select.presetInput") + ?.getValue(); if (presetName !== undefined && presetName !== "" && presets[presetName]) { const preset = presets[presetName]; diff --git a/frontend/src/ts/modals/pb-tables.ts b/frontend/src/ts/modals/pb-tables.ts index 4de644923f60..ff92a1b97b53 100644 --- a/frontend/src/ts/modals/pb-tables.ts +++ b/frontend/src/ts/modals/pb-tables.ts @@ -14,8 +14,8 @@ function update(mode: Mode): void { const modalEl = modal.getModal(); modalEl.qs("table tbody")?.empty(); - modalEl.qs("table thead tr td")?.setText(mode); - modalEl.qs("table thead tr td span.unit")?.setText(Config.typingSpeedUnit); + modalEl.qs("thead td:first-child")?.setText(mode); + modalEl.qs("thead span.unit")?.setText(Config.typingSpeedUnit); const snapshot = DB.getSnapshot(); if (!snapshot) return; diff --git a/frontend/src/ts/modals/quote-report.ts b/frontend/src/ts/modals/quote-report.ts index 90a854453dc9..fa8d346ebd5c 100644 --- a/frontend/src/ts/modals/quote-report.ts +++ b/frontend/src/ts/modals/quote-report.ts @@ -83,7 +83,7 @@ async function submitReport(): Promise { const quoteId = state.quoteToReport?.id.toString(); const quoteLanguage = removeLanguageSize(Config.language); const reason = qsr( - "#quoteReportModal .reason", + "#quoteReportModal select.reason", ).getValue() as QuoteReportReason; const comment = qsr( "#quoteReportModal .comment", diff --git a/frontend/src/ts/modals/quote-submit.ts b/frontend/src/ts/modals/quote-submit.ts index d3d7822bd123..eb7fd567312f 100644 --- a/frontend/src/ts/modals/quote-submit.ts +++ b/frontend/src/ts/modals/quote-submit.ts @@ -39,7 +39,7 @@ async function submitQuote(): Promise { .qsr(".newQuoteSource") .getValue() as string; const language = modalEl - .qsr(".newQuoteLanguage") + .qsr("select.newQuoteLanguage") .getValue() as Language; const captcha = CaptchaController.getResponse("submitQuote"); @@ -90,9 +90,11 @@ export async function show(showOptions: ShowOptions): Promise { }); modalEl - .qsr(".newQuoteLanguage") + .qsr("select.newQuoteLanguage") .setValue(Strings.removeLanguageSize(Config.language)); - modalEl.qsr(".newQuoteLanguage").dispatch("change"); + modalEl + .qsr("select.newQuoteLanguage") + .dispatch("change"); modalEl.qsr("input").setValue(""); new CharacterCounter(modalEl.qsr(".newQuoteText"), 250); diff --git a/frontend/src/ts/modals/user-report.ts b/frontend/src/ts/modals/user-report.ts index 2aafbbaff246..dd0940ff517a 100644 --- a/frontend/src/ts/modals/user-report.ts +++ b/frontend/src/ts/modals/user-report.ts @@ -84,7 +84,7 @@ async function submitReport(): Promise { } const reason = qsr( - "#userReportModal .reason", + "#userReportModal select.reason", ).getValue() as ReportUserReason; const comment = qsr( "#userReportModal .comment", diff --git a/frontend/src/ts/modals/word-filter.ts b/frontend/src/ts/modals/word-filter.ts index baa4b65d46ce..924f1974c237 100644 --- a/frontend/src/ts/modals/word-filter.ts +++ b/frontend/src/ts/modals/word-filter.ts @@ -219,7 +219,7 @@ async function filter(language: Language): Promise { async function apply(set: boolean): Promise { const language = modal .getModal() - .qsr(".languageInput") + .qsr("select.languageInput") .getValue() as Language; const filteredWords = await filter(language); @@ -271,10 +271,10 @@ async function setup(): Promise { modalEl.qsr("button.generateButton").on("click", async () => { const presetName = modalEl - .qsr(".presetInput") + .qsr("select.presetInput") .getValue() as string; const layoutName = modalEl - .qsr(".layoutInput") + .qsr("select.layoutInput") .getValue() as string; const presetToApply = presets[presetName];