feat: Export collection as direct download instead of emailing (#1001)

* feat: Export collection as zip instead of emailing

* Flow typing download.js
This commit is contained in:
Tom Moor
2019-07-29 22:35:34 -07:00
committed by GitHub
parent c9b86ec2e7
commit 92a18159b5
8 changed files with 192 additions and 17 deletions

View File

@ -26,8 +26,6 @@ class CollectionExport extends React.Component<Props> {
this.isLoading = true;
await this.props.collection.export();
this.isLoading = false;
this.props.ui.showToast('Export in progress…');
this.props.onSubmit();
};
@ -40,11 +38,11 @@ class CollectionExport extends React.Component<Props> {
<form onSubmit={this.handleSubmit}>
<HelpText>
Exporting the collection <strong>{collection.name}</strong> may take
a few minutes. Well put together a zip file of your documents in
Markdown format and email it to <strong>{auth.user.email}</strong>.
a few seconds. Your documents will be downloaded as a zip of folders
with files in Markdown format.
</HelpText>
<Button type="submit" disabled={this.isLoading} primary>
{this.isLoading ? 'Requesting Export…' : 'Export Collection'}
{this.isLoading ? 'Exporting…' : 'Export Collection'}
</Button>
</form>
</Flex>