From 0c4ea74fb7cff67631152002915df12653896708 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sat, 8 Mar 2025 15:33:24 +0000 Subject: feat(web): Redesign the import/export page --- apps/web/components/settings/ImportExport.tsx | 203 +++++++++++++++++--------- 1 file changed, 135 insertions(+), 68 deletions(-) (limited to 'apps') diff --git a/apps/web/components/settings/ImportExport.tsx b/apps/web/components/settings/ImportExport.tsx index e38f629a..9d10f578 100644 --- a/apps/web/components/settings/ImportExport.tsx +++ b/apps/web/components/settings/ImportExport.tsx @@ -31,19 +31,56 @@ import { } from "@hoarder/shared-react/hooks/lists"; import { BookmarkTypes } from "@hoarder/shared/types/bookmarks"; -export function ExportButton() { +import { Card, CardContent } from "../ui/card"; + +function ImportCard({ + text, + description, + children, +}: { + text: string; + description: string; + children: React.ReactNode; +}) { + return ( + + +
+ +
+
+

{text}

+

{description}

+
+ {children} +
+
+ ); +} + +function ExportButton() { const { t } = useTranslation(); return ( - - -

{t("settings.import.export_links_and_notes")}

- + + +
+ +
+
+

Export File

+

{t("settings.import.export_links_and_notes")}

+
+ +

Export

+ +
+
); } @@ -195,68 +232,98 @@ export function ImportExportRow() { return (
-
- - runUploadBookmarkFile({ file, source: "html" }) - } +
+ - -

{t("settings.import.import_bookmarks_from_html_file")}

- - - - runUploadBookmarkFile({ file, source: "pocket" }) - } + + runUploadBookmarkFile({ file, source: "html" }) + } + > +

Import

+
+
+ - -

{t("settings.import.import_bookmarks_from_pocket_export")}

- - - runUploadBookmarkFile({ file, source: "omnivore" }) - } + + runUploadBookmarkFile({ file, source: "pocket" }) + } + > +

Import

+
+
+ - -

{t("settings.import.import_bookmarks_from_omnivore_export")}

- - - runUploadBookmarkFile({ file, source: "linkwarden" }) - } + + runUploadBookmarkFile({ file, source: "omnivore" }) + } + > +

Import

+
+
+ - -

{t("settings.import.import_bookmarks_from_linkwarden_export")}

- - - runUploadBookmarkFile({ file, source: "hoarder" }) - } + + runUploadBookmarkFile({ file, source: "linkwarden" }) + } + > +

Import

+
+
+ - -

{t("settings.import.import_bookmarks_from_hoarder_export")}

- + + runUploadBookmarkFile({ file, source: "hoarder" }) + } + > +

Import

+
+
{importProgress && ( -- cgit v1.2.3-70-g09d2