diff --git a/public/content.css b/public/content.css index 7c7a7760..aa297e95 100644 --- a/public/content.css +++ b/public/content.css @@ -554,4 +554,15 @@ input::-webkit-inner-spin-button { border-width: 15px; border-style: solid; border-color: rgba(28, 28, 28, 0.7) transparent transparent transparent; +} + +.sponsorBlockRectangleTooltip { + position: absolute; + background-color: rgba(28, 28, 28, 0.7); + border-radius: 5px; + padding: 10px; + min-width: 250px; + min-height: 75px; + white-space: normal; + line-height: 1.5em; } \ No newline at end of file diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 08813440..08b80479 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -5,6 +5,7 @@ import { ActionType, ActionTypes, Category, CategoryActionType, ContentContainer import Utils from "../utils"; import { getCategoryActionType } from "../utils/categoryUtils"; import SubmissionNoticeComponent from "./SubmissionNoticeComponent"; +import { RectangleTooltip } from "../render/RectangleTooltip"; const utils = new Utils(); @@ -110,14 +111,7 @@ class SponsorTimeEditComponent extends React.Component { - const sponsorTimeEdits = this.state.sponsorTimeEdits; - sponsorTimeEdits[0] = e.target.value; - if (getCategoryActionType(sponsorTime.category) === CategoryActionType.POI) sponsorTimeEdits[1] = e.target.value; - - this.setState({sponsorTimeEdits}); - this.saveEditTimes(); - }} + onChange={(e) => {this.handleOnChange(0, e, sponsorTime, e.target.value)}} onWheel={(e) => {this.changeTimesWhenScrolling(0, e, sponsorTime)}}> @@ -132,14 +126,7 @@ class SponsorTimeEditComponent extends React.Component { - const sponsorTimeEdits = this.state.sponsorTimeEdits; - sponsorTimeEdits[1] = e.target.value; - - this.setState({sponsorTimeEdits}); - - this.saveEditTimes(); - }} + onChange={(e) => {this.handleOnChange(1, e, sponsorTime, e.target.value)}} onWheel={(e) => {this.changeTimesWhenScrolling(1, e, sponsorTime)}}> @@ -247,6 +234,21 @@ class SponsorTimeEditComponent extends React.Component {Config.config.scrollToEditTimeUpdate = true} + }); + } + } + getCategoryOptions(): React.ReactElement[] { const elements = [(