Update options page for chapters

This commit is contained in:
Ajay Ramachandran 2021-11-07 01:12:01 -05:00
parent 8e022bfb28
commit 3a2d9c0e0e
2 changed files with 24 additions and 18 deletions

View file

@ -24,6 +24,7 @@
"music_offtopic": "https://wiki.sponsor.ajay.app/w/Music:_Non-Music_Section", "music_offtopic": "https://wiki.sponsor.ajay.app/w/Music:_Non-Music_Section",
"poi_highlight": "https://wiki.sponsor.ajay.app/w/Highlight", "poi_highlight": "https://wiki.sponsor.ajay.app/w/Highlight",
"guidelines": "https://wiki.sponsor.ajay.app/w/Guidelines", "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"
} }
} }

View file

@ -69,23 +69,27 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
</select> </select>
</td> </td>
<td id={this.props.category + "ColorOption"} {this.props.category !== "chapter" &&
className="colorOption"> <td id={this.props.category + "ColorOption"}
<input className="colorOption">
className="categoryColorTextBox option-text-box" <input
type="color" className="categoryColorTextBox option-text-box"
onChange={(event) => this.setColorState(event, false)} type="color"
value={this.state.color} /> onChange={(event) => this.setColorState(event, false)}
</td> value={this.state.color} />
</td>
}
<td id={this.props.category + "PreviewColorOption"} {this.props.category !== "chapter" &&
className="previewColorOption"> <td id={this.props.category + "PreviewColorOption"}
<input className="previewColorOption">
className="categoryColorTextBox option-text-box" <input
type="color" className="categoryColorTextBox option-text-box"
onChange={(event) => this.setColorState(event, true)} type="color"
value={this.state.previewColor} /> onChange={(event) => this.setColorState(event, true)}
</td> value={this.state.previewColor} />
</td>
}
</tr> </tr>
@ -154,7 +158,8 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
getCategorySkipOptions(): JSX.Element[] { getCategorySkipOptions(): JSX.Element[] {
const elements: JSX.Element[] = []; const elements: JSX.Element[] = [];
const optionNames = ["disable", "showOverlay", "manualSkip", "autoSkip"]; let optionNames = ["disable", "showOverlay", "manualSkip", "autoSkip"];
if (this.props.category === "chapter") optionNames = ["disable", "showOverlay"]
for (const optionName of optionNames) { for (const optionName of optionNames) {
elements.push( elements.push(