Merge pull request #453 from thignus/add-review-button

Add review button to submission popup
This commit is contained in:
Ajay Ramachandran 2020-09-10 19:52:27 -04:00 committed by GitHub
commit 2c5cc926ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View file

@ -436,6 +436,9 @@
"preview": {
"message": "Preview"
},
"inspect": {
"message": "Inspect"
},
"edit": {
"message": "Edit"
},

View file

@ -218,6 +218,14 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
</span>
): ""}
{(!isNaN(segment[1])) ? (
<span id={"sponsorTimeInspectButton" + this.idSuffix}
className="sponsorTimeEditButton"
onClick={this.inspectTime.bind(this)}>
{chrome.i18n.getMessage("inspect")}
</span>
): ""}
{(!isNaN(segment[1])) ? (
<span id={"sponsorTimeEditButton" + this.idSuffix}
className="sponsorTimeEditButton"
@ -346,6 +354,20 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
this.props.contentContainer().previewTime(skipTime - 2);
}
inspectTime(): void {
let sponsorTimes = this.props.contentContainer().sponsorTimesSubmitting;
let index = this.props.index;
let skipTime = sponsorTimes[index].segment[0];
if (this.state.editing) {
// Save edits before inspecting
this.saveEditTimes();
}
this.props.contentContainer().previewTime(skipTime + 0.000001);
}
deleteTime(): void {
let sponsorTimes = this.props.contentContainer().sponsorTimesSubmitting;
let index = this.props.index;