mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-09-19 20:51:28 +02:00
Update options page for chapters
This commit is contained in:
parent
8e022bfb28
commit
3a2d9c0e0e
2 changed files with 24 additions and 18 deletions
|
@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue