(asset: AssetMeta)
| 109 | } |
| 110 | |
| 111 | const menuItems = (asset: AssetMeta): ContextMenuItem[] => [ |
| 112 | { label: 'Open', onSelect: () => void openNoteInTab(assetTabPath(asset.path)) }, |
| 113 | { label: 'Copy embed', onSelect: () => copyEmbed(asset) }, |
| 114 | { label: 'Reveal in file manager', onSelect: () => void window.zen.revealNote(asset.path) }, |
| 115 | { label: 'Rename…', onSelect: () => void renameAsset(asset) }, |
| 116 | { |
| 117 | label: 'Move to Trash', |
| 118 | danger: true, |
| 119 | onSelect: async () => { |
| 120 | if (await confirmMoveToTrash(asset.name)) await deleteAsset(asset.path) |
| 121 | } |
| 122 | } |
| 123 | ] |
| 124 | |
| 125 | return ( |
| 126 | <div className="flex min-h-0 flex-1 flex-col bg-paper-100 text-ink-900"> |
no test coverage detected