1010 :class =" [
1111 {
1212 'file-picker__row--selected': selected && !showCheckbox,
13+ 'file-picker__row--not-navigatable': isDirectory && !isNavigatable,
1314 'file-picker__row--not-pickable': !isPickable,
1415 },
1516 ]"
4748<script setup lang="ts">
4849import type { INode } from ' @nextcloud/files'
4950
50- import { FileType , formatFileSize } from ' @nextcloud/files'
51+ import { FileType , formatFileSize , Permission } from ' @nextcloud/files'
5152import { computed } from ' vue'
5253import NcCheckboxRadioSwitch from ' @nextcloud/vue/components/NcCheckboxRadioSwitch'
5354import NcDateTime from ' @nextcloud/vue/components/NcDateTime'
@@ -98,6 +99,11 @@ const isDirectory = computed(() => props.node.type === FileType.Folder)
9899 */
99100const isPickable = computed (() => props .canPick && (props .allowPickDirectory || ! isDirectory .value ))
100101
102+ /**
103+ * If this node is not readable, then we cannot navigate to it.
104+ */
105+ const isNavigatable = computed (() => (props .node .permissions & Permission .READ ) === Permission .READ )
106+
101107/**
102108 * Toggle the selection state
103109 */
@@ -114,7 +120,9 @@ function toggleSelected() {
114120 */
115121function handleClick() {
116122 if (isDirectory .value ) {
117- emit (' enterDirectory' , props .node )
123+ if (isNavigatable .value ) {
124+ emit (' enterDirectory' , props .node )
125+ }
118126 } else {
119127 toggleSelected ()
120128 }
@@ -145,6 +153,12 @@ function handleKeyDown(event: KeyboardEvent) {
145153 background-color : var (--color-background-dark );
146154 }
147155
156+ & --not-navigatable {
157+ filter : saturate (0.7 );
158+ opacity : 0.7 ;
159+ }
160+
161+ & --not-navigatable ,
148162 & --not-pickable {
149163
150164 * {
0 commit comments