chore: don't show listed menu option if note is in shared vault
This commit is contained in:
@@ -208,6 +208,8 @@ const NotesOptions = ({ notes, closeMenu }: NotesOptionsProps) => {
|
|||||||
return <ProtectedUnauthorizedLabel />
|
return <ProtectedUnauthorizedLabel />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const areSomeNotesInSharedVault = notes.some((note) => application.vaults.getItemVault(note)?.isSharedVaultListing())
|
||||||
|
|
||||||
if (notes.length === 0) {
|
if (notes.length === 0) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -468,9 +470,13 @@ const NotesOptions = ({ notes, closeMenu }: NotesOptionsProps) => {
|
|||||||
enableSuperMarkdownPreview={enableSuperMarkdownPreview}
|
enableSuperMarkdownPreview={enableSuperMarkdownPreview}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<HorizontalSeparator classes="my-2" />
|
|
||||||
|
|
||||||
<ListedActionsOption iconClassName={iconClass} application={application} note={notes[0]} />
|
{!areSomeNotesInSharedVault && (
|
||||||
|
<>
|
||||||
|
<HorizontalSeparator classes="my-2" />
|
||||||
|
<ListedActionsOption iconClassName={iconClass} application={application} note={notes[0]} />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
<HorizontalSeparator classes="my-2" />
|
<HorizontalSeparator classes="my-2" />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user