Files
Tom Moor fe50488c97 feat: Allow selecting a destination when importing (#14486)
* feat: allow selecting import destination

* fix: address import destination review findings

* feat: multi-step import dialog with workspace root location

- Import dialog is now upload then location, the same height as the move dialog
- Document explorer lists the workspace as the root and marks the selected row
- A document export with a sibling folder merges into one document, or becomes
  the collection overview when creating new collections
- Destination document checks now rely on the createChildDocument policy

* fix: delete archived imported documents and read legacy task inputs

- Deleting an import now removes the children of archived imported documents
- Tasks queued before the rename to rootExternalId are still assigned correctly
2026-11-06 08:05:31 -05:00

31 lines
951 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Trans } from "react-i18next";
import { IntegrationService } from "@shared/types";
import Text from "@shared/components/Text";
import useStores from "~/hooks/useStores";
import DropToImport from "~/scenes/Settings/components/DropToImport";
export function ImportSlabDialog() {
const { dialogs } = useStores();
return (
<DropToImport
description={
<Text as="p">
<Trans>
Import a zip file of Markdown documents exported from Slab –
collections, posts, images, and attachments will be imported. In
Slab, open the admin settings and use the <em>Export</em> option to
download an archive of your content.
</Trans>
</Text>
}
onSubmit={dialogs.closeAllModals}
service={IntegrationService.Slab}
>
<Trans>
Drag and drop the zip file exported from Slab, or click to upload
</Trans>
</DropToImport>
);
}