mirror of
https://github.com/nextcloud/richdocuments.git
synced 2025-12-18 05:20:43 +01:00
Merge pull request #4672 from nextcloud/fix/global-templates-filepicker-limit
fix: accepted global templates file types
This commit is contained in:
commit
81bb3e6c94
1 changed files with 33 additions and 1 deletions
|
|
@ -5,10 +5,12 @@
|
|||
|
||||
<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"
|
||||
:accept="acceptedFileExtensions"
|
||||
@change="selectFile">
|
||||
|
||||
<div class="template-buttons">
|
||||
|
|
@ -66,9 +68,35 @@ export default {
|
|||
return {
|
||||
existingTemplates: [],
|
||||
templatesAvailable: false,
|
||||
templateExtensions: [
|
||||
'.ott', '.otg', '.otp', '.ots',
|
||||
'.dot', '.dotx',
|
||||
'.xlt', '.xltx',
|
||||
'.pot', '.potx',
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
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)
|
||||
|
|
@ -153,6 +181,10 @@ $padding: calc(var(--default-grid-baseline) * 3);
|
|||
display: grid;
|
||||
gap: calc(var(--default-grid-baseline) * 4);
|
||||
grid-template-columns: repeat(auto-fit, 175px);
|
||||
|
||||
button {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.template-btn {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue