From 3a2d9c0e0e63c0302200304a9da5884a61c4ebe3 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 7 Nov 2021 01:12:01 -0500 Subject: [PATCH] Update options page for chapters --- config.json.example | 3 +- .../CategorySkipOptionsComponent.tsx | 39 +++++++++++-------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/config.json.example b/config.json.example index 787aab2e..a77a3646 100644 --- a/config.json.example +++ b/config.json.example @@ -24,6 +24,7 @@ "music_offtopic": "https://wiki.sponsor.ajay.app/w/Music:_Non-Music_Section", "poi_highlight": "https://wiki.sponsor.ajay.app/w/Highlight", "guidelines": "https://wiki.sponsor.ajay.app/w/Guidelines", - "mute": "https://wiki.sponsor.ajay.app/w/Mute_Segment" + "mute": "https://wiki.sponsor.ajay.app/w/Mute_Segment", + "chapter": "https://wiki.sponsor.ajay.app/w/Chapter" } } diff --git a/src/components/CategorySkipOptionsComponent.tsx b/src/components/CategorySkipOptionsComponent.tsx index 2d18000a..b65898df 100644 --- a/src/components/CategorySkipOptionsComponent.tsx +++ b/src/components/CategorySkipOptionsComponent.tsx @@ -69,23 +69,27 @@ class CategorySkipOptionsComponent extends React.Component - - this.setColorState(event, false)} - value={this.state.color} /> - + {this.props.category !== "chapter" && + + this.setColorState(event, false)} + value={this.state.color} /> + + } - - this.setColorState(event, true)} - value={this.state.previewColor} /> - + {this.props.category !== "chapter" && + + this.setColorState(event, true)} + value={this.state.previewColor} /> + + } @@ -154,7 +158,8 @@ class CategorySkipOptionsComponent extends React.Component