Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable29] fix: consider filter status to toggle components #4101

Merged
merged 1 commit into from
Dec 2, 2024
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
5 changes: 4 additions & 1 deletion src/views/FilesList/FilesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
class="files-list__loading-icon"
:size="38"
:name="t('libresign', 'Loading …')" />
<NcEmptyContent v-else-if="!loading && isEmptyDir"
<NcEmptyContent v-else-if="!loading && isEmptyDir && filtersStore.activeChips.length === 0"
:name="t('libresign', 'There are no documents')"
:description="t('libresign', 'Choose the file to request signatures.')">
<template #action>
Expand Down Expand Up @@ -79,6 +79,7 @@ import FilesListVirtual from './FilesListVirtual.vue'
import RequestPicker from '../../Components/Request/RequestPicker.vue'

import { useFilesStore } from '../../store/files.js'
import { useFiltersStore } from '../../store/filters.js'
import { useUserConfigStore } from '../../store/userconfig.js'

export default {
Expand All @@ -99,9 +100,11 @@ export default {
},
setup() {
const filesStore = useFilesStore()
const filtersStore = useFiltersStore()
const userConfigStore = useUserConfigStore()
return {
filesStore,
filtersStore,
userConfigStore,
}
},
Expand Down
5 changes: 4 additions & 1 deletion src/views/FilesList/FilesListTableFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<tr v-show="haveFiles">
<tr v-show="haveFiles || filtersStore.activeChips.length > 0">
<th class="files-list__row-checkbox">
<!-- TRANSLATORS Label for a table footer which summarizes the columns of the table -->
<span class="hidden-visually">{{ t('libresign', 'Total rows summary') }}</span>
Expand All @@ -25,13 +25,16 @@

<script>
import { useFilesStore } from '../../store/files.js'
import { useFiltersStore } from '../../store/filters.js'

export default {
name: 'FilesListTableFooter',
setup() {
const filesStore = useFilesStore()
const filtersStore = useFiltersStore()
return {
filesStore,
filtersStore,
}
},
computed: {
Expand Down
4 changes: 3 additions & 1 deletion src/views/FilesList/FilesListTableHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<tr class="files-list__row-head">
<tr v-if="filesStore.ordered.length > 0"
class="files-list__row-head">
<th class="files-list__column files-list__row-checkbox"
@keyup.esc.exact="resetSelection">
<NcCheckboxRadioSwitch v-bind="selectAllBind" @update:checked="onToggleAll" />
Expand Down Expand Up @@ -101,6 +102,7 @@ export default {
},
isAllSelected() {
return this.selectedNodes.length === this.filesStore.ordered.length
&& this.filesStore.ordered.length > 0
},
isNoneSelected() {
return this.selectedNodes.length === 0
Expand Down
Loading