added an option to hide the discord dot

This commit is contained in:
Jack 2020-06-06 02:25:12 +01:00
parent cd6776f085
commit 56629d26cc
3 changed files with 24 additions and 2 deletions

View file

@ -388,6 +388,10 @@ a:hover {
right: .25rem;
border: 2px solid var(--bg-color);
}
&.dotHidden::after{
background: transparent;
border-color: transparent;
}
}
&:focus{
background: var(--sub-color);
@ -788,7 +792,7 @@ key {
#restartTestButton, #showWordHistoryButton, #copyResultToClipboardButton, #restartTestButtonWithSameWordset {
position: relative;
border-radius: var(--roundness);
padding: 1rem 2rem;
padding: 1rem 2 rem;
width: min-content;
width: -moz-min-content;
color: var(--sub-color);

View file

@ -394,6 +394,14 @@
<div class="button off" tabindex="0" onclick="this.blur();">hide</div>
</div>
</div>
<div class="section discordDot">
<h1>discord dot</h1>
<div class="text">Shows the notification dot on the Discord icon.</div>
<div class="buttons">
<div class="button on" tabindex="0" onclick="this.blur();">show</div>
<div class="button off" tabindex="0" onclick="this.blur();">hide</div>
</div>
</div>
</div>

View file

@ -25,7 +25,7 @@ function updateSettingsPage(){
setSettingsButton('blindMode', config.blindMode);
setSettingsButton('quickEnd', config.quickEnd);
setSettingsButton('flipTestColors', config.flipTestColors);
setSettingsButton('discordDot', config.showDiscordDot);
setActiveThemeButton();
setActiveLanguageButton();
@ -172,6 +172,16 @@ $(".pageSettings .section.keyTips .buttons .button.off").click(e => {
}
})
//keytips
$(".pageSettings .section.discordDot .buttons .button.on").click(e => {
setDiscordDot(true);
setSettingsButton('discordDot', config.showDiscordDot);
})
$(".pageSettings .section.discordDot .buttons .button.off").click(e => {
setDiscordDot(false);
setSettingsButton('discordDot', config.showDiscordDot);
})
//themes
// $(document).on("mouseover",".pageSettings .section.themes .theme", (e) => {
// let theme = $(e.currentTarget).attr('theme');