From 6111f42bc76d5208a843fc54a30f48ddcdc56774 Mon Sep 17 00:00:00 2001 From: Rustem Mussabekov Date: Fri, 31 Jan 2025 12:42:58 +0300 Subject: [PATCH] Show warning for duplicates in import --- src/data/reducers/import.js | 1 + src/routes/settings/import/file.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/data/reducers/import.js b/src/data/reducers/import.js index d3a8a7b6..57f0b4f1 100644 --- a/src/data/reducers/import.js +++ b/src/data/reducers/import.js @@ -112,6 +112,7 @@ const initialState = Immutable({ items: [], count: { bookmarks: 0, + duplicates: 0, folders: 0, tags: 0, highlights: 0 diff --git a/src/routes/settings/import/file.js b/src/routes/settings/import/file.js index 0ad49f70..d6699514 100644 --- a/src/routes/settings/import/file.js +++ b/src/routes/settings/import/file.js @@ -43,6 +43,14 @@ class ImportFile extends React.Component { {count.folders} {t.s('folders').toLowerCase()}, {count.bookmarks} {t.s('bookmarks')}, {count.tags} {t.s('tags').toLowerCase()} {t.s('und')} {count.highlights} {t.s('highlights').toLowerCase()} + + {count.duplicates ? (<> +

+ + + Your file contains {count.duplicates} duplicate bookmarks. Only {count.bookmarks-count.duplicates} unique bookmarks will be imported. + + ) : null} )