mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-07 19:38:09 +08:00
enabling and disabling punctuation and numbers buttons as needed
This commit is contained in:
parent
db65d9d257
commit
d7dcaf0533
3 changed files with 14 additions and 12 deletions
|
|
@ -990,6 +990,7 @@
|
|||
height: max-content;
|
||||
width: 100%;
|
||||
justify-content: space-around;
|
||||
transition: 0.125s;
|
||||
.row {
|
||||
display: flex;
|
||||
padding: 0.25rem 1rem;
|
||||
|
|
@ -1004,6 +1005,9 @@
|
|||
background: var(--bg-color);
|
||||
margin: auto 1rem;
|
||||
}
|
||||
.textButton {
|
||||
transition: 0.125s;
|
||||
}
|
||||
}
|
||||
|
||||
.pageTest {
|
||||
|
|
|
|||
|
|
@ -51,17 +51,17 @@ export function update(
|
|||
$("#testConfig .mode.textButton[mode='" + current + "']").addClass("active");
|
||||
|
||||
if (current == "time") {
|
||||
$("#top .config .punctuationMode").removeClass("disabled");
|
||||
$("#top .config .numbersMode").removeClass("disabled");
|
||||
$("#testConfig .punctuationMode").removeClass("disabled");
|
||||
$("#testConfig .numbersMode").removeClass("disabled");
|
||||
} else if (current == "words") {
|
||||
$("#top .config .punctuationMode").removeClass("disabled");
|
||||
$("#top .config .numbersMode").removeClass("disabled");
|
||||
$("#testConfig .punctuationMode").removeClass("disabled");
|
||||
$("#testConfig .numbersMode").removeClass("disabled");
|
||||
} else if (current == "custom") {
|
||||
$("#top .config .punctuationMode").removeClass("disabled");
|
||||
$("#top .config .numbersMode").removeClass("disabled");
|
||||
$("#testConfig .punctuationMode").removeClass("disabled");
|
||||
$("#testConfig .numbersMode").removeClass("disabled");
|
||||
} else if (current == "quote") {
|
||||
$("#top .config .punctuationMode").addClass("disabled");
|
||||
$("#top .config .numbersMode").addClass("disabled");
|
||||
$("#testConfig .punctuationMode").addClass("disabled");
|
||||
$("#testConfig .numbersMode").addClass("disabled");
|
||||
} else if (current == "zen") {
|
||||
//
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
<div class="page pageTest hidden">
|
||||
<div id="testConfig">
|
||||
<div class="row">
|
||||
<div class="textButton">
|
||||
<div class="textButton punctuationMode">
|
||||
<span
|
||||
class="punc"
|
||||
style="
|
||||
font-weight: 900;
|
||||
width: 1.25rem;
|
||||
|
|
@ -16,9 +15,8 @@
|
|||
</span>
|
||||
punctuation
|
||||
</div>
|
||||
<div class="textButton">
|
||||
<div class="textButton numbersMode">
|
||||
<span
|
||||
class="punc"
|
||||
style="
|
||||
font-weight: 900;
|
||||
width: 1.25rem;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue