Compare commits

...

3 Commits

Author SHA1 Message Date
Ajay
e1b18944bb Colour time inputs as well 2025-10-03 02:29:11 -04:00
Ajay
068307f98a Colour segment selector based on category colour 2025-10-03 02:27:21 -04:00
Ajay
9deb69b71b Fix layout on donation button 2025-10-03 00:55:11 -04:00
3 changed files with 10 additions and 6 deletions

View File

@@ -591,6 +591,8 @@
#sponsorTimesDonateContainer a {
color: var(--sb-main-fg-color);
text-decoration: none;
padding-left: 5px;
}
/*

View File

@@ -123,6 +123,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
style.marginTop = "15px";
}
const borderColor = this.state.selectedCategory ? Config.config.barTypes[this.state.selectedCategory]?.color : null;
// Create time display
let timeDisplay: JSX.Element;
const timeDisplayStyle: React.CSSProperties = {};
@@ -151,7 +153,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<input id={"submittingTime0" + this.idSuffix}
className="sponsorTimeEdit sponsorTimeEditInput"
type="text"
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
value={this.state.sponsorTimeEdits[0] ?? ""}
onKeyDown={(e) => e.stopPropagation()}
onKeyUp={(e) => e.stopPropagation()}
@@ -168,7 +170,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<input id={"submittingTime1" + this.idSuffix}
className="sponsorTimeEdit sponsorTimeEditInput"
type="text"
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
value={this.state.sponsorTimeEdits[1] ?? ""}
onKeyDown={(e) => e.stopPropagation()}
onKeyUp={(e) => e.stopPropagation()}
@@ -215,7 +217,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<select id={"sponsorTimeCategories" + this.idSuffix}
className="sponsorTimeEditSelector sponsorTimeCategories"
ref={this.categoryOptionRef}
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
value={this.state.selectedCategory}
onChange={(event) => this.categorySelectionChange(event)}>
{this.getCategoryOptions()}
@@ -240,7 +242,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<select id={"sponsorTimeActionTypes" + this.idSuffix}
className="sponsorTimeEditSelector sponsorTimeActionTypes"
value={this.state.selectedActionType}
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
ref={this.actionTypeOptionRef}
onChange={(e) => this.actionTypeSelectionChange(e)}>
{this.getActionTypeOptions(sponsorTime)}
@@ -269,7 +271,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<div onBlur={() => this.setState({chapterNameSelectorOpen: false})}>
<input id={"chapterName" + this.idSuffix}
className="sponsorTimeEdit sponsorTimeEditInput sponsorChapterNameInput"
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
ref={this.descriptionOptionRef}
type="text"
value={this.state.description}

View File

@@ -191,7 +191,7 @@ function TimeSavedMessage({ viewCount, minutesSaved }: { viewCount: number; minu
function DonateMessage(props: { onClose: () => void }): JSX.Element {
return (
<div id="sponsorTimesDonateContainer" style={{ alignItems: "center", justifyContent: "center" }}>
<div id="sponsorTimesDonateContainer" style={{ alignItems: "center", justifyContent: "center", display: "flex" }}>
<img className="sbHeart" src="/icons/heart.svg" alt="Heart icon" />
<a id="sbConsiderDonateLink" href="https://sponsor.ajay.app/donate" target="_blank" rel="noreferrer" onClick={() => {
Config.config.donateClicked = Config.config.donateClicked + 1;