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

View File

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