Add a footer for trash bin

Signed-off-by: greta <gretadoci@gmail.com>
This commit is contained in:
greta 2021-05-31 22:08:13 +02:00 committed by Christoph Wurst
parent e69a53acdd
commit 7b32067c8c
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
2 changed files with 15 additions and 1 deletions

2
package-lock.json generated
View File

@ -5930,7 +5930,7 @@
"dev": true
},
"cdav-library": {
"version": "git+https://github.com/nextcloud/cdav-library.git#7fdc09ccc4917635c5189a878be9a899ee81f799",
"version": "git+https://github.com/nextcloud/cdav-library.git#00e0479f545cd9d9fc445e70596ec154c106d3c7",
"from": "git+https://github.com/nextcloud/cdav-library.git",
"requires": {
"core-js": "^3.13.0",

View File

@ -50,6 +50,9 @@
</td>
</tr>
</table>
<p class="footer">
{{ n('calendar', 'Elements in the trash bin are deleted after {numDays} day', 'Elements in the trash bin are deleted after {numDays} days', retentionDuration, { numDays: retentionDuration }) }}
</p>
</div>
</Modal>
</template>
@ -115,6 +118,11 @@ export default {
return formattedCalendars.concat(formattedCalendarObjects)
},
retentionDuration() {
return Math.ceil(
this.trashBin._props['{http://nextcloud.com/ns}trash-bin-retention-duration'] / (60 * 60 * 24)
)
},
},
methods: {
async onShow() {
@ -177,4 +185,10 @@ th {
.deletedAt {
text-align: right;
}
.footer {
color: var(--color-text-lighter);
text-align: center;
font-size: small;
margin-top: 16px;
}
</style>