diff --git a/frontend/src/ts/controllers/challenge-controller.ts b/frontend/src/ts/controllers/challenge-controller.ts index 84339c1dd4db..a47d7bb849ee 100644 --- a/frontend/src/ts/controllers/challenge-controller.ts +++ b/frontend/src/ts/controllers/challenge-controller.ts @@ -368,6 +368,23 @@ export async function setup(challengeName: string): Promise { setConfig("keymapMode", "static", { nosave: true, }); + } else if (challenge.name === "wingdings") { + // Ten Words of Pain: 10-word Master mode test using the Wingdings custom font, no keymap + setConfig("mode", "words", { + nosave: true, + }); + setConfig("words", 10, { + nosave: true, + }); + setConfig("difficulty", "master", { + nosave: true, + }); + setConfig("fontFamily", "Wingdings", { + nosave: true, + }); + setConfig("keymapMode", "off", { + nosave: true, + }); } } notitext = challenge.message; @@ -375,9 +392,9 @@ export async function setup(challengeName: string): Promise { qs(".page.pageTest")?.show(); if (notitext === undefined) { - showNoticeNotification(`Challenge '${challenge.display}' loaded.`); + showSuccessNotification(`Challenge '${challenge.display}' loaded.`); } else { - showNoticeNotification("Challenge loaded. " + notitext); + showSuccessNotification("Challenge loaded. " + notitext); } setLoadedChallenge(challenge); challengeLoading = false; @@ -405,6 +422,7 @@ configEvent.subscribe(({ key }) => { "keymapMode", "keymapLayout", "layout", + "fontFamily", ].includes(key) ) { clearActive(); diff --git a/frontend/src/ts/controllers/url-handler.tsx b/frontend/src/ts/controllers/url-handler.tsx index 27b62003a14a..1577ef1dd1f9 100644 --- a/frontend/src/ts/controllers/url-handler.tsx +++ b/frontend/src/ts/controllers/url-handler.tsx @@ -315,11 +315,9 @@ export function loadChallengeFromUrl(getOverride?: string): void { ).toLowerCase(); if (getValue === "") return; - showNoticeNotification("Loading challenge"); ChallengeController.setup(getValue) .then((result) => { if (result) { - showSuccessNotification("Challenge loaded"); restartTest({ nosave: true, }); diff --git a/frontend/static/challenges/_list.json b/frontend/static/challenges/_list.json index 69d487158ea0..92f26a255e0a 100644 --- a/frontend/static/challenges/_list.json +++ b/frontend/static/challenges/_list.json @@ -722,5 +722,17 @@ "display": "Feet warrior", "type": "customTime", "parameters": [3600] + }, + { + "name": "wingdings", + "display": "Ten Words of Pain", + "type": "special", + "parameters": [], + "message": "Complete a 10-word Master mode test using the Wingdings custom font. No keymap allowed.", + "requirements": { + "wpm": { + "min": 1 + } + } } ] diff --git a/packages/schemas/src/challenges.ts b/packages/schemas/src/challenges.ts index a8b30853f80e..bc6c67a96be1 100644 --- a/packages/schemas/src/challenges.ts +++ b/packages/schemas/src/challenges.ts @@ -17,6 +17,7 @@ export const ChallengeSchema = z "script", "accuracy", "funbox", + "special", ]), message: z.string().optional(), parameters: z.array(