mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 03:27:03 +03:00
Compare commits
2 Commits
c91df6e324
...
26f9a85b5b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26f9a85b5b | ||
|
|
bc516c21fb |
@@ -80,9 +80,9 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div data-type="react-AdvancedSkipOptionsComponent"></div>
|
||||
<div data-type="react-AdvancedSkipOptionsComponent" class="hide-when-skip-profile"></div>
|
||||
|
||||
<div data-type="toggle" data-sync="forceChannelCheck">
|
||||
<div data-type="toggle" data-sync="forceChannelCheck" class="hide-when-skip-profile">
|
||||
<div class="switch-container">
|
||||
<label class="switch">
|
||||
<input id="forceChannelCheck" type="checkbox" checked>
|
||||
@@ -96,7 +96,7 @@
|
||||
<div class="small-description">__MSG_whatForceChannelCheck__</div>
|
||||
</div>
|
||||
|
||||
<div data-type="toggle" data-sync="showCategoryWithoutPermission">
|
||||
<div data-type="toggle" data-sync="showCategoryWithoutPermission" class="hide-when-skip-profile">
|
||||
<div class="switch-container">
|
||||
<label class="switch">
|
||||
<input id="showCategoryWithoutPermission" type="checkbox" checked>
|
||||
|
||||
@@ -23,6 +23,12 @@ export function CategoryChooserComponent() {
|
||||
|
||||
updateChannelList(setChannelListText, selectedConfigurationID!);
|
||||
setSelections(getConfigurationValue<CategorySelection[]>(selectedConfigurationID, "categorySelections"));
|
||||
|
||||
if (selectedConfigurationID === null) {
|
||||
document.querySelectorAll(".hide-when-skip-profile").forEach((e) => e.classList.remove("hidden"));
|
||||
} else {
|
||||
document.querySelectorAll(".hide-when-skip-profile").forEach((e) => e.classList.add("hidden"));
|
||||
}
|
||||
}, [selectedConfigurationID]);
|
||||
|
||||
const createNewConfig = () => {
|
||||
@@ -145,6 +151,10 @@ export function CategoryChooserComponent() {
|
||||
}
|
||||
forceUpdateConfigurationIDs();
|
||||
|
||||
if (Config.local.skipProfileTemp && Config.local.skipProfileTemp.configID === selectedConfigurationID) {
|
||||
Config.local.skipProfileTemp = null;
|
||||
}
|
||||
|
||||
setConfigurations(Config.local!.skipProfiles);
|
||||
const newID = Object.keys(Config.local!.skipProfiles)[0] as ConfigurationID;
|
||||
setSelectedConfigurationID(newID);
|
||||
|
||||
Reference in New Issue
Block a user