fix: add missing button to the settings page

also fixes incorrect modes notice with certain config combinations
This commit is contained in:
Miodec 2024-02-13 12:29:53 +01:00
parent ee3f9d43a8
commit c445a46b15
2 changed files with 19 additions and 4 deletions

View file

@ -24,6 +24,7 @@ ConfigEvent.subscribe((eventKey) => {
"layout",
"showAverage",
"typingSpeedUnit",
"quickRestart",
].includes(eventKey)
) {
void update();
@ -50,9 +51,13 @@ export async function update(): Promise<void> {
$(".pageTest #testModesNotice").append(
`<div class="textButton noInteraction"><i class="fas fa-long-arrow-alt-right"></i>shift + tab to open commandline</div>`
);
} else {
$(".pageTest #testModesNotice").append(
`<div class="textButton noInteraction"><i class="fas fa-long-arrow-alt-right"></i>shift + tab to restart</div>`
`<div class="textButton noInteraction"><i class="fas fa-level-down-alt fa-rotate-90"></i>shift + esc to restart</div>`
);
}
if (Config.quickRestart === "tab") {
$(".pageTest #testModesNotice").append(
`<div class="textButton noInteraction"><i class="fas fa-level-down-alt fa-rotate-90"></i>shift + tab to restart</div>`
);
}
}

View file

@ -177,9 +177,11 @@
<div class="text">
Press
<key>tab</key>
or
,
<key>esc</key>
to quickly restart the test, or to quickly jump to the test page. Both
or
<key>enter</key>
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
<key>tab</key>
@ -210,6 +212,14 @@
>
esc
</div>
<div
class="button"
quickRestart="enter"
tabindex="0"
onclick="this.blur();"
>
enter
</div>
</div>
</div>