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

37 lines
1.1 KiB
TypeScript

import { Trans } from "react-i18next";
import { IntegrationService } from "@shared/types";
import env from "~/env";
import useStores from "~/hooks/useStores";
import DropToImport from "./DropToImport";
import Text from "@shared/components/Text";
function ImportJSONDialog() {
const { dialogs } = useStores();
const appName = env.APP_NAME;
return (
<DropToImport
description={
<Text as="p">
<Trans
defaults="You can import a zip file that was previously exported from the JSON option in another instance. In {{ appName }}, open <em>Export</em> in the Settings sidebar and click on <em>Export data</em>."
values={{ appName }}
components={{
em: <strong />,
}}
/>
</Text>
}
onSubmit={dialogs.closeAllModals}
service={IntegrationService.JSON}
>
<Trans>
Drag and drop the zip file from the JSON export option in {{ appName }},
or click to upload
</Trans>
</DropToImport>
);
}
export default ImportJSONDialog;