Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions apps/files/src/components/FilesListVirtual.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
</template>

<template v-if="!isNoneSelected" #header-overlay>
<span class="files-list__selected">{{ t('files', '{count} selected', { count: selectedNodes.length }) }}</span>
<span class="files-list__selected">
{{ n('files', '{count} selected', '{count} selected', selectedNodes.length, { count: selectedNodes.length }) }}
</span>
<FilesListTableHeaderActions :current-view="currentView"
:selected-nodes="selectedNodes" />
</template>
Expand Down Expand Up @@ -65,8 +67,8 @@ import type { Location } from 'vue-router'

import { Folder, View, getFileActions, FileType } from '@nextcloud/files'
import { showError } from '@nextcloud/dialogs'
import { translate as t } from '@nextcloud/l10n'
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
import { n, t } from '@nextcloud/l10n'
import { defineComponent } from 'vue'

import { action as sidebarAction } from '../actions/sidebarAction.ts'
Expand Down Expand Up @@ -130,6 +132,9 @@ export default defineComponent({

userConfigStore,
selectionStore,

n,
t,
}
},

Expand Down Expand Up @@ -353,8 +358,6 @@ export default defineComponent({
tableElement.scrollTop = tableElement.scrollTop + 25
}
},

t,
},
})
</script>
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/files/files-selection.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('files: Select all files', { testIsolation: true }, () => {

selectAllFiles()

cy.get('.files-list__selected').should('have.text', '7 selected')
cy.get('.files-list__selected').should('contain.text', '7 selected')
cy.get('[data-cy-files-list-row-checkbox]').findByRole('checkbox').should('be.checked')

deselectAllFiles()
Expand All @@ -59,7 +59,7 @@ describe('files: Select all files', { testIsolation: true }, () => {

randomFiles.forEach(name => selectRowForFile(name))

cy.get('.files-list__selected').should('have.text', `${randomFiles.length} selected`)
cy.get('.files-list__selected').should('contain.text', `${randomFiles.length} selected`)
cy.get('[data-cy-files-list-row-checkbox] input[type="checkbox"]:checked').should('have.length', randomFiles.length)
})

Expand All @@ -70,7 +70,7 @@ describe('files: Select all files', { testIsolation: true }, () => {
selectRowForFile('readme.md', { shiftKey: true })
cy.window().trigger('keyup', { shiftKey: false, key: 'Shift' })

cy.get('.files-list__selected').should('have.text', '4 selected')
cy.get('.files-list__selected').should('contain.text', '4 selected')
cy.get('[data-cy-files-list-row-checkbox] input[type="checkbox"]:checked').should('have.length', 4)

})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/files_trashbin/files.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('files_trashbin: download files', { testIsolation: true }, () => {
it('does not offer bulk download', () => {
cy.get('[data-cy-files-list-row-checkbox]').should('have.length', 2)
selectAllFiles()
cy.get('.files-list__selected').should('have.text', '2 selected')
cy.get('.files-list__selected').should('contain.text', '2 selected')
cy.get('.files-list__row-actions-batch')
.should('be.visible')
.within(() => {
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

Loading