aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2020-05-10 20:27:33 -0400
committerAjay Ramachandran <[email protected]>2020-05-10 20:27:33 -0400
commit7c38b1f8f28db643611c610621e35e99373e1e93 (patch)
tree147d49abe47da2fca303fecfe52b76858c117ca8 /src
parent6942bcb4182a99ea615cf5882ef8951eab3fc315 (diff)
downloadSponsorBlock-7c38b1f8f28db643611c610621e35e99373e1e93.tar.gz
SponsorBlock-7c38b1f8f28db643611c610621e35e99373e1e93.zip
Fix new vote options table layout
Diffstat (limited to 'src')
-rw-r--r--src/components/SkipNoticeComponent.tsx60
1 files changed, 31 insertions, 29 deletions
diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx
index 7f75e7de..b4399e65 100644
--- a/src/components/SkipNoticeComponent.tsx
+++ b/src/components/SkipNoticeComponent.tsx
@@ -189,21 +189,23 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
{/* Downvote Options Row */}
{this.state.downvoting &&
<tr id={"sponsorSkipNoticeDownvoteOptionsRow" + this.idSuffix}>
+ <td id={"sponsorTimesDownvoteOptionsContainer" + this.idSuffix}>
- {/* Normal downvote */}
- <button className="sponsorSkipObject sponsorSkipNoticeButton"
- onClick={() => this.contentContainer().vote(0, this.UUID, undefined, this)}>
- {chrome.i18n.getMessage("downvoteDescription")}
- </button>
-
- {/* Category vote */}
- {Config.config.testingServer &&
+ {/* Normal downvote */}
<button className="sponsorSkipObject sponsorSkipNoticeButton"
- onClick={() => this.openCategoryChooser()}>
-
- {chrome.i18n.getMessage("incorrectCategory")}
+ onClick={() => this.contentContainer().vote(0, this.UUID, undefined, this)}>
+ {chrome.i18n.getMessage("downvoteDescription")}
</button>
- }
+
+ {/* Category vote */}
+ {Config.config.testingServer &&
+ <button className="sponsorSkipObject sponsorSkipNoticeButton"
+ onClick={() => this.openCategoryChooser()}>
+
+ {chrome.i18n.getMessage("incorrectCategory")}
+ </button>
+ }
+ </td>
</tr>
}
@@ -211,24 +213,24 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
{/* Category Chooser Row */}
{this.state.choosingCategory &&
<tr id={"sponsorSkipNoticeCategoryChooserRow" + this.idSuffix}>
+ <td>
+ {/* Category Selector */}
+ <select id={"sponsorTimeCategories" + this.idSuffix}
+ className="sponsorTimeCategories"
+ defaultValue={utils.getSponsorTimeFromUUID(this.props.contentContainer().sponsorTimes, this.props.UUID).category}
+ ref={this.categoryOptionRef}
+ onChange={this.categorySelectionChange.bind(this)}>
+
+ {this.getCategoryOptions()}
+ </select>
+
+ {/* Submit Button */}
+ <button className="sponsorSkipObject sponsorSkipNoticeButton"
+ onClick={() => this.contentContainer().vote(undefined, this.UUID, this.categoryOptionRef.current.value, this)}>
- {/* Category Selector */}
- <select id={"sponsorTimeCategories" + this.idSuffix}
- className="sponsorTimeCategories"
- defaultValue={utils.getSponsorTimeFromUUID(this.props.contentContainer().sponsorTimes, this.props.UUID).category}
- ref={this.categoryOptionRef}
- onChange={this.categorySelectionChange.bind(this)}>
-
- {this.getCategoryOptions()}
- </select>
-
- {/* Submit Button */}
- <button className="sponsorSkipObject sponsorSkipNoticeButton"
- onClick={() => this.contentContainer().vote(undefined, this.UUID, this.categoryOptionRef.current.value, this)}>
-
- {chrome.i18n.getMessage("submit")}
- </button>
-
+ {chrome.i18n.getMessage("submit")}
+ </button>
+ </td>
</tr>
}