aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/SponsorTimeEditComponent.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/SponsorTimeEditComponent.tsx')
-rw-r--r--src/components/SponsorTimeEditComponent.tsx71
1 files changed, 36 insertions, 35 deletions
diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx
index 0564293a..527dbbe2 100644
--- a/src/components/SponsorTimeEditComponent.tsx
+++ b/src/components/SponsorTimeEditComponent.tsx
@@ -272,48 +272,49 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
</div>
): ""}
- <br/>
-
{/* Editing Tools */}
- <span id={"sponsorTimeDeleteButton" + this.idSuffix}
- className="sponsorTimeEditButton"
- onClick={this.deleteTime.bind(this)}>
- {chrome.i18n.getMessage("delete")}
- </span>
-
- {(!isNaN(segment[1]) && ![ActionType.Poi, ActionType.Full].includes(this.state.selectedActionType))
- && this.state.selectedActionType !== ActionType.Chapter ? (
- <span id={"sponsorTimePreviewButton" + this.idSuffix}
+ <div style={{ marginTop: "3px" }}>
+ <span id={"sponsorTimeDeleteButton" + this.idSuffix}
className="sponsorTimeEditButton"
- onClick={(e) => this.previewTime(e.ctrlKey, e.shiftKey)}>
- {chrome.i18n.getMessage("preview")}
+ onClick={this.deleteTime.bind(this)}>
+ {chrome.i18n.getMessage("delete")}
</span>
- ): ""}
- {(!isNaN(segment[1]) && this.state.selectedActionType != ActionType.Full) ? (
- <span id={"sponsorTimeInspectButton" + this.idSuffix}
- className="sponsorTimeEditButton"
- onClick={this.inspectTime.bind(this)}>
- {chrome.i18n.getMessage("inspect")}
- </span>
- ): ""}
+ {(!isNaN(segment[1]) && ![ActionType.Poi, ActionType.Full].includes(this.state.selectedActionType))
+ && this.state.selectedActionType !== ActionType.Chapter ? (
+ <span id={"sponsorTimePreviewButton" + this.idSuffix}
+ className="sponsorTimeEditButton"
+ onClick={(e) => this.previewTime(e.ctrlKey, e.shiftKey)}>
+ {chrome.i18n.getMessage("preview")}
+ </span>
+ ): ""}
- {(!isNaN(segment[1]) && ![ActionType.Poi, ActionType.Full].includes(this.state.selectedActionType)) ? (
- <span id={"sponsorTimePreviewEndButton" + this.idSuffix}
- className="sponsorTimeEditButton"
- onClick={(e) => this.previewTime(e.ctrlKey, e.shiftKey, true)}>
- {chrome.i18n.getMessage("End")}
- </span>
- ): ""}
+ {(!isNaN(segment[1]) && this.state.selectedActionType != ActionType.Full) ? (
+ <span id={"sponsorTimeInspectButton" + this.idSuffix}
+ className="sponsorTimeEditButton"
+ onClick={this.inspectTime.bind(this)}>
+ {chrome.i18n.getMessage("inspect")}
+ </span>
+ ): ""}
+
+ {(!isNaN(segment[1]) && ![ActionType.Poi, ActionType.Full].includes(this.state.selectedActionType)) ? (
+ <span id={"sponsorTimePreviewEndButton" + this.idSuffix}
+ className="sponsorTimeEditButton"
+ onClick={(e) => this.previewTime(e.ctrlKey, e.shiftKey, true)}>
+ {chrome.i18n.getMessage("End")}
+ </span>
+ ): ""}
+
+ {(!isNaN(segment[1]) && this.state.selectedActionType != ActionType.Full) ? (
+ <span id={"sponsorTimeEditButton" + this.idSuffix}
+ className="sponsorTimeEditButton"
+ onClick={this.toggleEditTime.bind(this)}>
+ {this.state.editing ? chrome.i18n.getMessage("save") : chrome.i18n.getMessage("edit")}
+ </span>
+ ): ""}
+ </div>
- {(!isNaN(segment[1]) && this.state.selectedActionType != ActionType.Full) ? (
- <span id={"sponsorTimeEditButton" + this.idSuffix}
- className="sponsorTimeEditButton"
- onClick={this.toggleEditTime.bind(this)}>
- {this.state.editing ? chrome.i18n.getMessage("save") : chrome.i18n.getMessage("edit")}
- </span>
- ): ""}
</div>
);
}