diff --git a/apps/files/src/components/FileEntry/FileEntryCheckbox.vue b/apps/files/src/components/FileEntry/FileEntryCheckbox.vue index 5b80a971118d4..2bbe2a51047d2 100644 --- a/apps/files/src/components/FileEntry/FileEntryCheckbox.vue +++ b/apps/files/src/components/FileEntry/FileEntryCheckbox.vue @@ -6,7 +6,7 @@ - { + const enc = node?.attributes?.['is-encrypted'] + return enc != 1 + }) + }, + selectedNodes() { return this.selectionStore.selected }, isAllSelected() { - return this.selectedNodes.length === this.nodes.length + const total = this.selectableNodes.length + return total > 0 && this.selectedNodes.length === total }, isNoneSelected() { @@ -170,7 +178,8 @@ export default defineComponent({ }, isSomeSelected() { - return !this.isAllSelected && !this.isNoneSelected + const total = this.selectableNodes.length + return this.selectedNodes.length > 0 && this.selectedNodes.length < total }, }, @@ -213,8 +222,8 @@ export default defineComponent({ onToggleAll(selected = true) { if (selected) { - const selection = this.nodes.map(node => node.source).filter(Boolean) as FileSource[] - logger.debug('Added all nodes to selection', { selection }) + const selection = this.selectableNodes.map(node => node.source).filter(Boolean) as FileSource[] + logger.debug('Added all selectable nodes to selection', { selection }) this.selectionStore.setLastIndex(null) this.selectionStore.set(selection) } else { diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index c0cad7a1b972c..e9934671fb99b 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -122,7 +122,7 @@ + :data-cy-files-content-empty="currentView?.id">