feat: short description of accepted file types

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
This commit is contained in:
Elizabeth Danzberger 2025-04-11 17:19:34 -04:00
parent ab102e736c
commit 2467a849ef
No known key found for this signature in database
GPG key ID: D64CE07FD0188C79

View file

@ -5,7 +5,8 @@
<template>
<NcSettingsSection v-if="templatesAvailable"
:name="t('richdocuments', 'Global Templates')">
:name="t('richdocuments', 'Global Templates')"
:description="description">
<input ref="newTemplateInput"
type="file"
class="hidden-visually"
@ -76,6 +77,26 @@ export default {
}
},
computed: {
acceptedFileExtensions() {
return this.templateExtensions.join(', ')
},
description() {
return t(
'richdocuments',
'Accepted file types: {accepts}',
{
/*
* TRANSLATORS
* The file extensions will be displayed as
* .ott, .otg, .otp, .ots, and so on
*/
accepts: this.acceptedFileExtensions,
},
)
},
},
mounted() {
// Later maybe we can retrieve these settings from AdminSettings.vue`
// and pass them in as props (once AdminSettings is cleaned up)
@ -87,12 +108,6 @@ export default {
})
},
computed: {
acceptedFileExtensions() {
return this.templateExtensions.join(', ')
}
},
methods: {
t,
newTemplate() {