From c445a46b153361ba0c73c6423c3798eef7c02a1f Mon Sep 17 00:00:00 2001 From: Miodec Date: Tue, 13 Feb 2024 12:29:53 +0100 Subject: [PATCH] fix: add missing button to the settings page also fixes incorrect modes notice with certain config combinations --- frontend/src/ts/elements/modes-notice.ts | 9 +++++++-- frontend/static/html/pages/settings.html | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/frontend/src/ts/elements/modes-notice.ts b/frontend/src/ts/elements/modes-notice.ts index 76c786457758..67c24d5d1d5c 100644 --- a/frontend/src/ts/elements/modes-notice.ts +++ b/frontend/src/ts/elements/modes-notice.ts @@ -24,6 +24,7 @@ ConfigEvent.subscribe((eventKey) => { "layout", "showAverage", "typingSpeedUnit", + "quickRestart", ].includes(eventKey) ) { void update(); @@ -50,9 +51,13 @@ export async function update(): Promise { $(".pageTest #testModesNotice").append( `
shift + tab to open commandline
` ); - } else { $(".pageTest #testModesNotice").append( - `
shift + tab to restart
` + `
shift + esc to restart
` + ); + } + if (Config.quickRestart === "tab") { + $(".pageTest #testModesNotice").append( + `
shift + tab to restart
` ); } } diff --git a/frontend/static/html/pages/settings.html b/frontend/static/html/pages/settings.html index 7155915657ae..3ec5f6245c94 100644 --- a/frontend/static/html/pages/settings.html +++ b/frontend/static/html/pages/settings.html @@ -177,9 +177,11 @@
Press tab - or + , esc - to quickly restart the test, or to quickly jump to the test page. Both + or + enter + to quickly restart the test, or to quickly jump to the test page. These options disable tab navigation on most parts of the website. Using the "esc" option will move opening the commandline to the tab @@ -210,6 +212,14 @@ > esc
+
+ enter +