diff --git a/frontend/src/styles/test.scss b/frontend/src/styles/test.scss index 6ee552b1c..e21f52929 100644 --- a/frontend/src/styles/test.scss +++ b/frontend/src/styles/test.scss @@ -538,20 +538,27 @@ outline: none; } + button { + padding: 1em 2em; + } + .buttons { display: grid; grid-auto-flow: column; gap: 1rem; justify-content: center; - // grid-area: buttons; grid-column: 1/3; } .ssWatermark { - // grid-area: ssw; grid-column: 1/3; } + #retrySavingResultButton { + margin: 0 auto 1rem auto; + display: flex; + } + #resultWordsHistory, #resultReplay { // grid-area: wordsHistory; @@ -888,63 +895,6 @@ } } -#restartTestButton, -#showWordHistoryButton, -#saveScreenshotButton, -#restartTestButtonWithSameWordset, -#nextTestButton, -#practiseWordsButton, -#watchReplayButton, -#watchVideoAdButton { - position: relative; - border-radius: var(--roundness); - padding: 1rem 2rem; - width: min-content; - width: -moz-min-content; - color: var(--sub-color); - transition: 0.125s; - cursor: pointer; - - &:hover, - &:focus { - color: var(--text-color); - outline: none; - } - - &:focus { - background: var(--text-color); - color: var(--bg-color); - } -} - -#retrySavingResultButton { - position: relative; - border-radius: var(--roundness); - padding: 1rem 2rem; - color: var(--error-color); - transition: 0.25s; - cursor: pointer; - width: -moz-max-content; - width: max-content; - background: var(--colorful-error-color); - color: var(--bg-color); - justify-self: center; - justify-content: center; - margin: 0 auto 1rem auto; - -webkit-user-select: none; - user-select: none; - - &:hover, - &:focus { - background: var(--text-color); - outline: none; - } - - &:focus { - background: var(--text-color); - } -} - #showWordHistoryButton { opacity: 1; } @@ -961,8 +911,9 @@ } #restartTestButton { - margin: 0 auto; - margin-top: 1rem; + margin: 1rem auto 0 auto; + display: flex; + padding: 1em 2em; } #koInputVisualContainer { diff --git a/frontend/src/ts/test/practise-words.ts b/frontend/src/ts/test/practise-words.ts index 37d3176bc..692a94fa4 100644 --- a/frontend/src/ts/test/practise-words.ts +++ b/frontend/src/ts/test/practise-words.ts @@ -202,12 +202,6 @@ $(document).on("keydown", (event) => { } }); -$(document).on("keypress", "#practiseWordsButton", (event) => { - if (event.key === "Enter") { - showPopup(true); - } -}); - $(".pageTest").on("click", "#practiseWordsButton", () => { showPopup(); }); diff --git a/frontend/src/ts/test/replay.ts b/frontend/src/ts/test/replay.ts index 2cc95f023..5ef88f1c2 100644 --- a/frontend/src/ts/test/replay.ts +++ b/frontend/src/ts/test/replay.ts @@ -317,12 +317,6 @@ $("#replayWords").on("click", "letter", (event) => { loadOldReplay(); }); -$(document).on("keypress", "#watchReplayButton", (event) => { - if (event.key === "Enter") { - toggleReplayDisplay(); - } -}); - $(".pageTest").on("click", "#watchReplayButton", () => { toggleReplayDisplay(); }); diff --git a/frontend/src/ts/test/result.ts b/frontend/src/ts/test/result.ts index 7cbbeaa44..a85555ede 100644 --- a/frontend/src/ts/test/result.ts +++ b/frontend/src/ts/test/result.ts @@ -814,7 +814,6 @@ export async function update( $("#words").empty(); ChartController.result.resize(); - $("#result").trigger("focus"); window.scrollTo({ top: 0 }); $("#testModesNotice").addClass("hidden"); }, diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index cd0586c4f..06e3e4f42 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -1418,12 +1418,6 @@ $(".pageTest").on("click", "#testModesNotice .textButton.restart", () => { restart(); }); -$(document).on("keypress", "#restartTestButton", (event) => { - if (event.key === "Enter") { - restart(); - } -}); - $(".pageTest").on("click", "#restartTestButton", () => { ManualRestart.set(); if (TestUI.resultCalculating) return; @@ -1442,12 +1436,6 @@ $(".pageTest").on("click", "#restartTestButton", () => { $(".pageTest").on("click", "#retrySavingResultButton", retrySavingResult); -$(document).on("keypress", "#nextTestButton", (event) => { - if (event.key === "Enter") { - restart(); - } -}); - $(".pageTest").on("click", "#nextTestButton", () => { ManualRestart.set(); restart(); @@ -1464,18 +1452,6 @@ $(".pageTest").on("click", "#restartTestButtonWithSameWordset", () => { }); }); -$(document).on("keypress", "#restartTestButtonWithSameWordset", (event) => { - if (Config.mode === "zen") { - Notifications.add("Repeat test disabled in zen mode"); - return; - } - if (event.key === "Enter") { - restart({ - withSameWordset: true, - }); - } -}); - $(".pageTest").on("click", "#testConfig .mode .textButton", (e) => { if (TestUI.testRestarting) return; if ($(e.currentTarget).hasClass("active")) return; diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index 7108b90dd..6ea793ed2 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -1217,12 +1217,6 @@ $(".pageTest").on("click", "#saveScreenshotButton", () => { screenshot(); }); -$("#saveScreenshotButton").on("keypress", (e) => { - if (e.key === "Enter") { - screenshot(); - } -}); - $(".pageTest #copyWordsListButton").on("click", async () => { try { let words; @@ -1303,12 +1297,6 @@ $("#wordsInput").on("focusout", () => { Caret.hide(); }); -$(document).on("keypress", "#showWordHistoryButton", (event) => { - if (event.key === "Enter") { - toggleResultWords(); - } -}); - $(".pageTest").on("click", "#showWordHistoryButton", () => { toggleResultWords(); }); diff --git a/frontend/static/html/pages/test.html b/frontend/static/html/pages/test.html index 8b07de031..d402564c9 100644 --- a/frontend/static/html/pages/test.html +++ b/frontend/static/html/pages/test.html @@ -117,7 +117,6 @@ -
-
+
@@ -172,7 +169,7 @@
-