Skip to content

Commit

Permalink
Show warning for duplicates in import
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustem Mussabekov committed Jan 31, 2025
1 parent 8681f2f commit 6111f42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/data/reducers/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ const initialState = Immutable({
items: [],
count: {
bookmarks: 0,
duplicates: 0,
folders: 0,
tags: 0,
highlights: 0
Expand Down
8 changes: 8 additions & 0 deletions src/routes/settings/import/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ class ImportFile extends React.Component {
<span>
{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()}
</span>

{count.duplicates ? (<>
<br /><br />

<Alert variant='warning'>
Your file contains <b>{count.duplicates} duplicate bookmarks</b>. Only <b>{count.bookmarks-count.duplicates} unique bookmarks will be imported</b>.
</Alert>
</>) : null}
</div>
)

Expand Down

0 comments on commit 6111f42

Please sign in to comment.