Skip to content

Commit 26f9a85

Browse files
committed
Hide settings not affected by skip profile when non-default profile is selected
1 parent bc516c2 commit 26f9a85

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

public/options/options.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@
8080
</a>
8181
</div>
8282

83-
<div data-type="react-AdvancedSkipOptionsComponent"></div>
83+
<div data-type="react-AdvancedSkipOptionsComponent" class="hide-when-skip-profile"></div>
8484

85-
<div data-type="toggle" data-sync="forceChannelCheck">
85+
<div data-type="toggle" data-sync="forceChannelCheck" class="hide-when-skip-profile">
8686
<div class="switch-container">
8787
<label class="switch">
8888
<input id="forceChannelCheck" type="checkbox" checked>
@@ -96,7 +96,7 @@
9696
<div class="small-description">__MSG_whatForceChannelCheck__</div>
9797
</div>
9898

99-
<div data-type="toggle" data-sync="showCategoryWithoutPermission">
99+
<div data-type="toggle" data-sync="showCategoryWithoutPermission" class="hide-when-skip-profile">
100100
<div class="switch-container">
101101
<label class="switch">
102102
<input id="showCategoryWithoutPermission" type="checkbox" checked>

src/components/options/CategoryChooserComponent.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ export function CategoryChooserComponent() {
2323

2424
updateChannelList(setChannelListText, selectedConfigurationID!);
2525
setSelections(getConfigurationValue<CategorySelection[]>(selectedConfigurationID, "categorySelections"));
26+
27+
if (selectedConfigurationID === null) {
28+
document.querySelectorAll(".hide-when-skip-profile").forEach((e) => e.classList.remove("hidden"));
29+
} else {
30+
document.querySelectorAll(".hide-when-skip-profile").forEach((e) => e.classList.add("hidden"));
31+
}
2632
}, [selectedConfigurationID]);
2733

2834
const createNewConfig = () => {

0 commit comments

Comments
 (0)