diff --git a/frontend/src/ts/commandline/commandline-metadata.ts b/frontend/src/ts/commandline/commandline-metadata.ts index 60d6c9d2fb26..7c610c2dd565 100644 --- a/frontend/src/ts/commandline/commandline-metadata.ts +++ b/frontend/src/ts/commandline/commandline-metadata.ts @@ -493,10 +493,6 @@ export const commandlineConfigMetadata: CommandlineConfigMetadataObject = { }, //appearence - timerStyle: { - subgroup: { options: "fromSchema" }, - alias: "timer", - }, liveSpeedStyle: { subgroup: { options: "fromSchema", @@ -515,7 +511,13 @@ export const commandlineConfigMetadata: CommandlineConfigMetadataObject = { }, alias: "wpm", }, + timerStyle: { + display: "Live progress style...", + subgroup: { options: "fromSchema" }, + alias: "timer", + }, timerColor: { + display: "Live progress color...", alias: "timer speed wpm burst acc", subgroup: { options: "fromSchema", @@ -523,6 +525,7 @@ export const commandlineConfigMetadata: CommandlineConfigMetadataObject = { }, }, timerOpacity: { + display: "Live progress opacity...", alias: "timer speed wpm burst acc", subgroup: { options: "fromSchema", diff --git a/frontend/src/ts/commandline/util.ts b/frontend/src/ts/commandline/util.ts index 878a3b61215d..347baeddc49f 100644 --- a/frontend/src/ts/commandline/util.ts +++ b/frontend/src/ts/commandline/util.ts @@ -74,8 +74,12 @@ function _buildCommandForConfigKey< configMeta: configMeta as unknown as ConfigMetadata< keyof ConfigSchemas.Config >, - schema, + schema: + "secondKey" in inputProps + ? ConfigSchemas.ConfigSchema.shape[inputProps.secondKey] + : schema, }); + if (result === undefined) { return inputCommand; } diff --git a/frontend/src/ts/constants/fonts.ts b/frontend/src/ts/constants/fonts.ts index d2330a22adaa..67be7228a347 100644 --- a/frontend/src/ts/constants/fonts.ts +++ b/frontend/src/ts/constants/fonts.ts @@ -16,7 +16,7 @@ export type FontConfig = { export const Fonts: Record = { Roboto_Mono: { - fileName: "Roboto-Regular.woff2", + fileName: "RobotoMono-Regular.woff2", }, Noto_Naskh_Arabic: { fileName: "NotoNaskhArabic-Regular.woff2", @@ -38,7 +38,7 @@ export const Fonts: Record = { fileName: "JetBrainsMono-Regular.woff2", }, Roboto: { - fileName: "RobotoMono-Regular.woff2", + fileName: "Roboto-Regular.woff2", }, Montserrat: { fileName: "Montserrat-Regular.woff2", diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 8a0d3de61017..cf5fceb76c0b 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -1149,6 +1149,34 @@ export async function finish(difficultyFailed = false): Promise { completedEvent.keyDuration = "toolong"; } + if ( + completedEvent.wpm === 0 && + !difficultyFailed && + completedEvent.testDuration >= 5 + ) { + const roundedTime = Math.round(completedEvent.testDuration); + + const messages = [ + `Congratulations. You just wasted ${roundedTime} seconds of your life by typing nothing. Be proud of yourself.`, + `Bravo! You've managed to waste ${roundedTime} seconds and accomplish exactly zero. A true productivity icon.`, + `That was ${roundedTime} seconds of absolutely legendary idleness. History will remember this moment.`, + `Wow, ${roundedTime} seconds of typing... nothing. Bold. Mysterious. Completely useless.`, + `Thank you for those ${roundedTime} seconds of utter nothingness. The keyboard needed the break.`, + `A breathtaking display of inactivity. ${roundedTime} seconds of absolutely nothing. Powerful.`, + `You just gave ${roundedTime} seconds of your life to the void. And the void says thanks.`, + `Stunning. ${roundedTime} seconds of intense... whatever that wasn't. Keep it up, champ.`, + `Is it performance art? A protest? Or just ${roundedTime} seconds of glorious nothing? We may never know.`, + `You typed nothing for ${roundedTime} seconds. And in that moment, you became legend.`, + ]; + + Result.showConfetti(); + Notifications.add(Arrays.randomElementFromArray(messages), 0, { + customTitle: "Nice", + duration: 15, + important: true, + }); + } + if (dontSave) { void AnalyticsController.log("testCompletedInvalid"); return;