Files
outline/plugins/slab/client/components/ImportSlabDialog.tsx
T
Tom Moor be75e8e0a8 fix: Resolve Slab cross-links and import Slab-hosted attachments (#14109)
* fix: Resolve Slab cross-links and import Slab-hosted attachments

Slab exports links between posts as absolute URLs and file attachments as
signed links, so both stayed pointing at Slab after import. Post links are
now matched to imported documents by slug (or by label for id-only mention
links) and Slab-hosted file links become attachments that are re-hosted.

Also fixes concurrent mention transforms assigning different ids to the
same not-yet-imported document.

* fix: Address review feedback on Slab link and file conversion

Prefer exact slug matches and leave ambiguous slugs unresolved, convert
file links in headings, and keep a toggle's leading text block so its
attachments are still converted.
2026-10-16 17:23:13 -04:00

31 lines
938 B
TypeScript
Raw 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 (
<>
<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>
<DropToImport
onSubmit={dialogs.closeAllModals}
service={IntegrationService.Slab}
>
<Trans>
Drag and drop the zip file exported from Slab, or click to upload
</Trans>
</DropToImport>
</>
);
}