feat: default to delete permanently option for errored note
This commit is contained in:
@@ -150,6 +150,7 @@ export const NotesOptions = observer(
|
|||||||
const notTrashed = notes.some((note) => !note.trashed);
|
const notTrashed = notes.some((note) => !note.trashed);
|
||||||
const pinned = notes.some((note) => note.pinned);
|
const pinned = notes.some((note) => note.pinned);
|
||||||
const unpinned = notes.some((note) => !note.pinned);
|
const unpinned = notes.some((note) => !note.pinned);
|
||||||
|
const errored = notes.some((note) => note.errorDecrypting);
|
||||||
|
|
||||||
const tagsButtonRef = useRef<HTMLButtonElement>(null);
|
const tagsButtonRef = useRef<HTMLButtonElement>(null);
|
||||||
|
|
||||||
@@ -225,6 +226,19 @@ export const NotesOptions = observer(
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (errored) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<DeletePermanentlyButton
|
||||||
|
closeOnBlur={closeOnBlur}
|
||||||
|
onClick={async () => {
|
||||||
|
await appState.notes.deleteNotesPermanently();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Switch
|
<Switch
|
||||||
|
|||||||
Reference in New Issue
Block a user