-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Vitor Mattos <vitor@php.rio>
- Loading branch information
1 parent
42e69a6
commit f48d4dc
Showing
3 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<!-- | ||
- SPDX-FileCopyrightText: 2024 LibreCode coop and LibreCode contributors | ||
- SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
<template> | ||
<tr v-show="haveFiles"> | ||
<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> | ||
</th> | ||
|
||
<!-- Link to file --> | ||
<td class="files-list__row-name"> | ||
<!-- Icon or preview --> | ||
<span class="files-list__row-icon" /> | ||
|
||
<!-- Summary --> | ||
<span>{{ summary }}</span> | ||
</td> | ||
|
||
<!-- Actions --> | ||
<td class="files-list__row-actions" /> | ||
</tr> | ||
</template> | ||
|
||
<script> | ||
import { useFilesStore } from '../../store/files.js' | ||
export default { | ||
name: 'FilesListTableFooter', | ||
setup() { | ||
const filesStore = useFilesStore() | ||
return { | ||
filesStore, | ||
} | ||
}, | ||
computed: { | ||
totalFiles() { | ||
return Object.keys(this.filesStore.files).length | ||
}, | ||
summary() { | ||
const fileCount = this.totalFiles | ||
if (fileCount === 1) { | ||
return t('libresign', '1 file') | ||
} | ||
return t('libresign', '{fileCount} files', { fileCount }) | ||
}, | ||
haveFiles() { | ||
const fileCount = this.totalFiles | ||
if (this.filesStore.loading) { | ||
return false | ||
} | ||
return fileCount > 0 | ||
}, | ||
}, | ||
} | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
tr { | ||
margin-bottom: max(25vh, var(--body-container-margin)); | ||
border-top: 1px solid var(--color-border); | ||
// Prevent hover effect on the whole row | ||
background-color: transparent !important; | ||
border-bottom: none !important; | ||
td { | ||
user-select: none; | ||
// Make sure the cell colors don't apply to column headers | ||
color: var(--color-text-maxcontrast) !important; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters