mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Improve locked category display
This commit is contained in:
@@ -317,6 +317,10 @@ input[type='number'] {
|
|||||||
color: grey;
|
color: grey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.disabled .slider {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
tr.disabled {
|
tr.disabled {
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
@@ -358,6 +362,10 @@ tr.disabled {
|
|||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.switch-label {
|
||||||
|
width: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
.switch {
|
.switch {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
@@ -78,9 +78,6 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
|
|||||||
className={`categoryTableElement${extraClasses}`} >
|
className={`categoryTableElement${extraClasses}`} >
|
||||||
<td id={this.props.category + "OptionName"}
|
<td id={this.props.category + "OptionName"}
|
||||||
className="categoryTableLabel">
|
className="categoryTableLabel">
|
||||||
{disabled &&
|
|
||||||
<LockSvg className="upsellButton" onClick={() => chrome.tabs.create({url: chrome.runtime.getURL('upsell/index.html')})}/>
|
|
||||||
}
|
|
||||||
{chrome.i18n.getMessage("category_" + this.props.category)}
|
{chrome.i18n.getMessage("category_" + this.props.category)}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@@ -93,6 +90,10 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
|
|||||||
onChange={this.skipOptionSelected.bind(this)}>
|
onChange={this.skipOptionSelected.bind(this)}>
|
||||||
{this.getCategorySkipOptions()}
|
{this.getCategorySkipOptions()}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
{disabled &&
|
||||||
|
<LockSvg className="upsellButton" onClick={() => chrome.tabs.create({url: chrome.runtime.getURL('upsell/index.html')})}/>
|
||||||
|
}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
{this.props.category !== "chapter" &&
|
{this.props.category !== "chapter" &&
|
||||||
@@ -226,6 +227,7 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
|
|||||||
configKey={option.configKey}
|
configKey={option.configKey}
|
||||||
label={option.label}
|
label={option.label}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
style={{width: "300px"}}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export interface ToggleOptionProps {
|
|||||||
configKey: string;
|
configKey: string;
|
||||||
label: string;
|
label: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
style?: React.CSSProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ToggleOptionState {
|
export interface ToggleOptionState {
|
||||||
@@ -26,7 +27,7 @@ class ToggleOptionComponent extends React.Component<ToggleOptionProps, ToggleOpt
|
|||||||
render(): React.ReactElement {
|
render(): React.ReactElement {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="switch-container">
|
<div className="switch-container" style={this.props.style}>
|
||||||
<label className="switch">
|
<label className="switch">
|
||||||
<input id={this.props.configKey}
|
<input id={this.props.configKey}
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|||||||
Reference in New Issue
Block a user