Fixes for vote notice

This commit is contained in:
Ajay
2025-03-05 01:45:08 -05:00
parent 8b0b670ea8
commit 5903d1a023

View File

@@ -243,15 +243,18 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
</div> </div>
{/* Copy and Downvote Button */} {/* Copy and Downvote Button */}
<div id={"sponsorTimesDownvoteButtonsContainerCopyDownvote" + this.idSuffix} {
className="voteButton" !this.props.voteNotice &&
style={{marginLeft: "5px"}} <div id={"sponsorTimesDownvoteButtonsContainerCopyDownvote" + this.idSuffix}
onClick={() => this.openEditingOptions()}> className="voteButton"
<PencilSvg fill={this.state.editing === true style={{marginLeft: "5px"}}
|| this.state.actionState === SkipNoticeAction.CopyDownvote onClick={() => this.openEditingOptions()}>
|| this.state.choosingCategory === true <PencilSvg fill={this.state.editing === true
? this.selectedColor : this.unselectedColor} /> || this.state.actionState === SkipNoticeAction.CopyDownvote
</div> || this.state.choosingCategory === true
? this.selectedColor : this.unselectedColor} />
</div>
}
</td> </td>
: :
@@ -283,7 +286,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
? this.getSkipButton(1) : null} ? this.getSkipButton(1) : null}
{/* Never show button */} {/* Never show button */}
{!this.autoSkip || this.props.startReskip ? "" : {!this.autoSkip || this.props.startReskip || this.props.voteNotice ? "" :
<td className="sponsorSkipNoticeRightSection" <td className="sponsorSkipNoticeRightSection"
key={1}> key={1}>
<button className="sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeRightButton" <button className="sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeRightButton"
@@ -375,7 +378,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
style.minWidth = "100px"; style.minWidth = "100px";
} }
const showSkipButton = (buttonIndex !== 0 || this.props.smaller || this.props.voteNotice || this.segments[0].actionType === ActionType.Mute) && !this.props.upcomingNotice; const showSkipButton = (buttonIndex !== 0 || this.props.smaller || !this.props.voteNotice || this.segments[0].actionType === ActionType.Mute) && !this.props.upcomingNotice;
return ( return (
<span className="sponsorSkipNoticeUnskipSection" style={{ visibility: !showSkipButton ? "hidden" : null }}> <span className="sponsorSkipNoticeUnskipSection" style={{ visibility: !showSkipButton ? "hidden" : null }}>