From 56629d26cc4a02918b9a4fc8578e17b2160175b4 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 6 Jun 2020 02:25:12 +0100 Subject: [PATCH] added an option to hide the discord dot --- public/css/style.scss | 6 +++++- public/index.html | 8 ++++++++ public/js/settings.js | 12 +++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/public/css/style.scss b/public/css/style.scss index 456ee6c87..2e4b7af23 100644 --- a/public/css/style.scss +++ b/public/css/style.scss @@ -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); diff --git a/public/index.html b/public/index.html index b9bcca077..bfed880e9 100644 --- a/public/index.html +++ b/public/index.html @@ -394,6 +394,14 @@
hide
+
+

discord dot

+
Shows the notification dot on the Discord icon.
+
+
show
+
hide
+
+
diff --git a/public/js/settings.js b/public/js/settings.js index 9aeab1cd3..29502ba63 100644 --- a/public/js/settings.js +++ b/public/js/settings.js @@ -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');