mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 20:47:11 +03:00
Fix style not applying to skip notice
This commit is contained in:
@@ -15,7 +15,8 @@ export interface NoticeProps {
|
|||||||
// Callback for when this is closed
|
// Callback for when this is closed
|
||||||
closeListener: () => void,
|
closeListener: () => void,
|
||||||
|
|
||||||
zIndex?: number
|
zIndex?: number,
|
||||||
|
style?: React.CSSProperties
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NoticeState {
|
export interface NoticeState {
|
||||||
@@ -70,7 +71,8 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
|
|||||||
|
|
||||||
render(): React.ReactElement {
|
render(): React.ReactElement {
|
||||||
const noticeStyle: React.CSSProperties = {
|
const noticeStyle: React.CSSProperties = {
|
||||||
zIndex: this.props.zIndex || (50 + this.amountOfPreviousNotices)
|
zIndex: this.props.zIndex || (1000 + this.amountOfPreviousNotices),
|
||||||
|
...(this.props.style ?? {})
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -126,9 +126,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
|||||||
}
|
}
|
||||||
|
|
||||||
render(): React.ReactElement {
|
render(): React.ReactElement {
|
||||||
const noticeStyle: React.CSSProperties = {
|
const noticeStyle: React.CSSProperties = { }
|
||||||
zIndex: 1000 + this.amountOfPreviousNotices
|
|
||||||
}
|
|
||||||
if (this.contentContainer().onMobileYouTube) {
|
if (this.contentContainer().onMobileYouTube) {
|
||||||
noticeStyle.bottom = "4em";
|
noticeStyle.bottom = "4em";
|
||||||
noticeStyle.transform = "scale(0.8) translate(10%, 10%)";
|
noticeStyle.transform = "scale(0.8) translate(10%, 10%)";
|
||||||
@@ -142,6 +140,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
|||||||
timed={true}
|
timed={true}
|
||||||
maxCountdownTime={this.state.maxCountdownTime}
|
maxCountdownTime={this.state.maxCountdownTime}
|
||||||
videoSpeed={() => this.contentContainer().v?.playbackRate}
|
videoSpeed={() => this.contentContainer().v?.playbackRate}
|
||||||
|
style={noticeStyle}
|
||||||
ref={this.noticeRef}
|
ref={this.noticeRef}
|
||||||
closeListener={() => this.closeListener()}>
|
closeListener={() => this.closeListener()}>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user