From 639e7b5c43404cf3df2431a80e4099cfca73ada9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Tue, 12 Sep 2023 12:08:15 +0200 Subject: [PATCH] Disable file multi value configurator --- .../ModuleFields/Configurator/multi.vue | 18 ++- .../components/PageBlocks/Navigation/Base.vue | 2 +- .../Public/Page/Attachment/Link.vue | 1 + .../Public/Page/Attachment/ListLoader.vue | 138 +++++++++--------- lib/js/src/compose/types/module-field/file.ts | 2 + 5 files changed, 87 insertions(+), 74 deletions(-) diff --git a/client/web/compose/src/components/ModuleFields/Configurator/multi.vue b/client/web/compose/src/components/ModuleFields/Configurator/multi.vue index dddc557a1..725bd2b73 100644 --- a/client/web/compose/src/components/ModuleFields/Configurator/multi.vue +++ b/client/web/compose/src/components/ModuleFields/Configurator/multi.vue @@ -9,12 +9,14 @@ :options="selectOptions" stacked /> + @@ -35,13 +37,17 @@ export default { }, }, - data () { - return { - selectOptions: [ + computed: { + selectOptions () { + return [ { text: this.$t('options.multiDelimiter.newline'), value: '\n' }, - { text: this.$t('options.multiDelimiter.comma'), value: ', ' }, - ], - } + { text: this.$t('options.multiDelimiter.comma'), value: ', ', disabled: this.isNotConfigurable }, + ] + }, + + isNotConfigurable () { + return ['File'].includes(this.field.kind) + }, }, } diff --git a/client/web/compose/src/components/PageBlocks/Navigation/Base.vue b/client/web/compose/src/components/PageBlocks/Navigation/Base.vue index 50f11624b..d4b630934 100644 --- a/client/web/compose/src/components/PageBlocks/Navigation/Base.vue +++ b/client/web/compose/src/components/PageBlocks/Navigation/Base.vue @@ -13,7 +13,7 @@ justified: options.display.justify === 'justify' }" :align="options.display.alignment" - class="border-0 h-100" + class="border-0 h-100 overflow-auto" > + diff --git a/client/web/compose/src/components/Public/Page/Attachment/ListLoader.vue b/client/web/compose/src/components/Public/Page/Attachment/ListLoader.vue index bfc302a83..a7d41c77f 100644 --- a/client/web/compose/src/components/Public/Page/Attachment/ListLoader.vue +++ b/client/web/compose/src/components/Public/Page/Attachment/ListLoader.vue @@ -14,67 +14,60 @@ :list.sync="attachments" :disabled="!enableOrder" > -
- - +
-
- -
- - - -
- - - -
- - - {{ size(a) }} - - {{ uploadedAt(a) }} - -
- - - - - - - - - -
+
+ + + + + + + {{ size(a) }} + + {{ uploadedAt(a) }} + + + + + + + + + + + @@ -85,7 +78,8 @@
-
- -
-
- +
+ +
+ + + +
diff --git a/lib/js/src/compose/types/module-field/file.ts b/lib/js/src/compose/types/module-field/file.ts index a1adf8025..5f7f86c0e 100644 --- a/lib/js/src/compose/types/module-field/file.ts +++ b/lib/js/src/compose/types/module-field/file.ts @@ -27,6 +27,7 @@ interface FileOptions extends Options { backgroundColor?: string; clickToView?: boolean; enableDownload?: boolean; + multiDelimiter: string; } const defaults = (): Readonly => Object.freeze({ @@ -47,6 +48,7 @@ const defaults = (): Readonly => Object.freeze({ backgroundColor: '#FFFFFF00', clickToView: true, enableDownload: true, + multiDelimiter: '\n', }) export class ModuleFieldFile extends ModuleField {