Skip to content

Commit

Permalink
fix: Disable view file in trashbin
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Dec 5, 2023
1 parent c1aeed3 commit aa46848
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/views/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,10 @@ export default {
},
iconSvgInline: () => EyeSvg,
default: DefaultType.DEFAULT,
enabled: (nodes) => {
enabled: (nodes, view) => {
if (view.id === 'trashbin') {
return false
}
// Faster to check if at least one node doesn't match the requirements
return !nodes.some(node => (
(node.permissions & Permission.READ) === 0
Expand Down

0 comments on commit aa46848

Please sign in to comment.