lightmode -> dark mode

This commit is contained in:
Ajay
2022-01-24 23:33:27 -05:00
parent c49ebbe371
commit 8452bfb32a
5 changed files with 10 additions and 10 deletions

View File

@@ -790,8 +790,8 @@
"hideDonationLink": {
"message": "Hide Donation Link"
},
"lightModeOptionsPage": {
"message": "Light Mode On Options Page"
"darkModeOptionsPage": {
"message": "Dark Mode On Options Page"
},
"helpPageThanksForInstalling": {
"message": "Thanks for installing SponsorBlock."

View File

@@ -278,14 +278,14 @@
<div class="small-description">__MSG_showTimeWithSkipsDescription__</div>
</div>
<div data-type="toggle" data-sync="lightMode">
<div data-type="toggle" data-sync="darkMode">
<div class="switch-container">
<label class="switch">
<input id="lightMode" type="checkbox" checked>
<input id="darkMode" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="lightMode">
__MSG_lightModeOptionsPage__
<label class="switch-label" for="darkMode">
__MSG_darkModeOptionsPage__
</label>
</div>
</div>

View File

@@ -52,7 +52,7 @@ interface SBConfig {
},
scrollToEditTimeUpdate: boolean,
categoryPillUpdate: boolean,
lightMode: boolean,
darkMode: boolean,
skipKeybind: Keybind,
startSponsorKeybind: Keybind,
@@ -208,7 +208,7 @@ const Config: SBObject = {
autoSkipOnMusicVideos: false,
scrollToEditTimeUpdate: false, // false means the tooltip will be shown
categoryPillUpdate: false,
lightMode: false,
darkMode: true,
/**
* Default keybinds should not set "code" as that's gonna be different based on the user's locale. They should also only use EITHER ctrl OR alt modifiers (or none).

View File

@@ -11,7 +11,7 @@ async function init() {
await utils.wait(() => Config.config !== null);
if (Config.config.lightMode) {
if (!Config.config.darkMode) {
document.documentElement.setAttribute("data-theme", "light");
}

View File

@@ -50,7 +50,7 @@ async function init() {
await utils.wait(() => Config.config !== null);
if (Config.config.lightMode) {
if (!Config.config.darkMode) {
document.documentElement.setAttribute("data-theme", "light");
}