From 5f6307041a0b00424c13a56628ed21f65a1ba583 Mon Sep 17 00:00:00 2001 From: mini-bomba <55105495+mini-bomba@users.noreply.github.com> Date: Wed, 24 Aug 2022 14:25:35 +0200 Subject: Add an Export Segments button to the unsubmitted segments list --- src/components/UnsubmittedVideoListItem.tsx | 21 +++++++++++++++++++-- src/components/UnsubmittedVideosComponent.tsx | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/components/UnsubmittedVideoListItem.tsx b/src/components/UnsubmittedVideoListItem.tsx index ab00fa83..fec08dc9 100644 --- a/src/components/UnsubmittedVideoListItem.tsx +++ b/src/components/UnsubmittedVideoListItem.tsx @@ -1,6 +1,7 @@ import * as React from "react"; import Config from "../config"; +import { exportTimes } from "../utils/exporter"; export interface UnsubmittedVideosListItemProps { videoID: string; @@ -40,6 +41,12 @@ class UnsubmittedVideoListItem extends React.Component +
+ {chrome.i18n.getMessage("exportSegments")} +
+ {" "}
@@ -55,10 +62,20 @@ class UnsubmittedVideoListItem extends React.Component { + alert(chrome.i18n.getMessage("CopiedExclamation")); + }) + .catch(() => { + alert(chrome.i18n.getMessage("copyDebugInformationFailed")); + }); + } } export default UnsubmittedVideoListItem; diff --git a/src/components/UnsubmittedVideosComponent.tsx b/src/components/UnsubmittedVideosComponent.tsx index 04542adc..ee1f70f2 100644 --- a/src/components/UnsubmittedVideosComponent.tsx +++ b/src/components/UnsubmittedVideosComponent.tsx @@ -38,7 +38,7 @@ class UnsubmittedVideosComponent extends React.Component 0 &&
this.setState({tableVisible: !this.state.tableVisible})}> {chrome.i18n.getMessage(this.state.tableVisible ? "hideUnsubmittedSegments" : "showUnsubmittedSegments")}
} - + {" "}
{chrome.i18n.getMessage("clearUnsubmittedSegments")}
-- cgit v1.2.3