mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Colour time inputs as well
This commit is contained in:
@@ -123,6 +123,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
style.marginTop = "15px";
|
style.marginTop = "15px";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const borderColor = this.state.selectedCategory ? Config.config.barTypes[this.state.selectedCategory]?.color : null;
|
||||||
|
|
||||||
// Create time display
|
// Create time display
|
||||||
let timeDisplay: JSX.Element;
|
let timeDisplay: JSX.Element;
|
||||||
const timeDisplayStyle: React.CSSProperties = {};
|
const timeDisplayStyle: React.CSSProperties = {};
|
||||||
@@ -151,7 +153,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
<input id={"submittingTime0" + this.idSuffix}
|
<input id={"submittingTime0" + this.idSuffix}
|
||||||
className="sponsorTimeEdit sponsorTimeEditInput"
|
className="sponsorTimeEdit sponsorTimeEditInput"
|
||||||
type="text"
|
type="text"
|
||||||
style={{color: "inherit", backgroundColor: "inherit"}}
|
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
|
||||||
value={this.state.sponsorTimeEdits[0] ?? ""}
|
value={this.state.sponsorTimeEdits[0] ?? ""}
|
||||||
onKeyDown={(e) => e.stopPropagation()}
|
onKeyDown={(e) => e.stopPropagation()}
|
||||||
onKeyUp={(e) => e.stopPropagation()}
|
onKeyUp={(e) => e.stopPropagation()}
|
||||||
@@ -168,7 +170,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
<input id={"submittingTime1" + this.idSuffix}
|
<input id={"submittingTime1" + this.idSuffix}
|
||||||
className="sponsorTimeEdit sponsorTimeEditInput"
|
className="sponsorTimeEdit sponsorTimeEditInput"
|
||||||
type="text"
|
type="text"
|
||||||
style={{color: "inherit", backgroundColor: "inherit"}}
|
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
|
||||||
value={this.state.sponsorTimeEdits[1] ?? ""}
|
value={this.state.sponsorTimeEdits[1] ?? ""}
|
||||||
onKeyDown={(e) => e.stopPropagation()}
|
onKeyDown={(e) => e.stopPropagation()}
|
||||||
onKeyUp={(e) => e.stopPropagation()}
|
onKeyUp={(e) => e.stopPropagation()}
|
||||||
@@ -205,8 +207,6 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const borderColor = this.state.selectedCategory ? Config.config.barTypes[this.state.selectedCategory]?.color : null;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id={"sponsorTimeEditContainer" + this.idSuffix} style={style}>
|
<div id={"sponsorTimeEditContainer" + this.idSuffix} style={style}>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user