Export in the support form

Summary: This diff adds exporting UI in the support form itself. It replaces the "Export as File and Link" buttons with a submit button, which uploads media and then initiates flipper export.

Reviewed By: mweststrate

Differential Revision: D18714630

fbshipit-source-id: ccbb9b2d47687e77a0fdb5449c18e91a5bd5f96e
This commit is contained in:
Pritesh Nandgaonkar
2019-11-29 05:56:23 -08:00
committed by Facebook Github Bot
parent 0116fcdb87
commit 92bbccb6e0
2 changed files with 29 additions and 13 deletions

View File

@@ -37,8 +37,9 @@ const Uploading = styled(Text)({
export default function(props: {
statusMessage: string;
statusUpdate: string | null;
onCancel: () => void;
onRunInBackground: () => void;
hideNavButtons?: boolean;
onCancel?: () => void;
onRunInBackground?: () => void;
}) {
return (
<Container>
@@ -50,19 +51,32 @@ export default function(props: {
</Uploading>
) : (
<Uploading bold color={colors.macOSTitleBarIcon}>
{props.statusUpdate}
{props.statusMessage}
</Uploading>
)}
</Center>
<FlexRow>
<Spacer />
<Button compact padded onClick={() => props.onCancel()}>
Cancel
</Button>
<Button compact padded type="primary" onClick={props.onRunInBackground}>
Run In Background
</Button>
</FlexRow>
{!props.hideNavButtons && props.onCancel && props.onRunInBackground && (
<FlexRow>
<Spacer />
<Button
compact
padded
onClick={() => {
props.onCancel && props.onCancel();
}}>
Cancel
</Button>
<Button
compact
padded
type="primary"
onClick={() => {
props.onRunInBackground && props.onRunInBackground();
}}>
Run In Background
</Button>
</FlexRow>
)}
</Container>
);
}

View File

@@ -59,7 +59,9 @@ exports[`ShareSheetPendingDialog is rendered without status update 1`] = `
<span
className="css-91luyc"
color="#6f6f6f"
/>
>
wubba lubba dub dub
</span>
</div>
<div
className="css-a1glw"