From dc5a2fbbb60d781401252cb874b3d1bca8cf4256 Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Fri, 8 Sep 2023 07:41:02 +0200 Subject: [PATCH 1/2] fix(design): edit columns - add column info popover - don't show -1 as maxTextLength, which just means unlimited - visual fixes Signed-off-by: Florian Steffens --- .../main/partials/ColumnInfoPopover.vue | 28 ++++++++++++------- src/modules/modals/EditColumn.vue | 22 +++++++++------ .../columnTypePartials/forms/TextLineForm.vue | 13 +++++++-- 3 files changed, 43 insertions(+), 20 deletions(-) diff --git a/src/modules/main/partials/ColumnInfoPopover.vue b/src/modules/main/partials/ColumnInfoPopover.vue index c7e3d41b3..e1c709b59 100644 --- a/src/modules/main/partials/ColumnInfoPopover.vue +++ b/src/modules/main/partials/ColumnInfoPopover.vue @@ -5,36 +5,36 @@ - - - - - - - - @@ -80,4 +80,12 @@ export default { vertical-align: text-top; } +td { + vertical-align: top; +} + +td.value { + text-align: end; +} + diff --git a/src/modules/modals/EditColumn.vue b/src/modules/modals/EditColumn.vue index bc9ae69c9..b05e0a6aa 100644 --- a/src/modules/modals/EditColumn.vue +++ b/src/modules/modals/EditColumn.vue @@ -22,13 +22,15 @@
- -
- {{ t('tables', 'Last edit') + ': ' }} - {{ updateTime }} - +
+   +
+ {{ t('tables', 'Last edit') + ': ' }} + {{ updateTime }}  + +
-
+
{{ t('tables', 'Cancel') }} @@ -109,8 +111,6 @@ export default { editColumn: structuredClone(this.column), deleteId: null, editErrorTitle: false, - // To enable the column info popup - debug: false, } }, computed: { @@ -204,4 +204,10 @@ export default { align-items: center; } +.buttons :deep(.user-bubble__wrapper) { + padding-top: 5px; +} + +.flex { display: flex } + diff --git a/src/shared/components/ncTable/partials/columnTypePartials/forms/TextLineForm.vue b/src/shared/components/ncTable/partials/columnTypePartials/forms/TextLineForm.vue index f7c191209..699a9544a 100644 --- a/src/shared/components/ncTable/partials/columnTypePartials/forms/TextLineForm.vue +++ b/src/shared/components/ncTable/partials/columnTypePartials/forms/TextLineForm.vue @@ -28,7 +28,7 @@ {{ t('tables', 'Maximum text length') }}
- @@ -42,23 +42,32 @@ import { translate as t } from '@nextcloud/l10n' export default { - name: 'TextLineForm', + props: { column: { type: Object, default: null, }, }, + data() { return { mutableColumn: this.column, } }, + + computed: { + getMaxLength() { + return this.mutableColumn.textMaxLength >= 0 ? this.mutableColumn.textMaxLength : null + }, + }, + watch: { column() { this.mutableColumn = this.column }, }, + methods: { t, }, From a15e08e393c836d56a809aa429750017d31d0957 Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Fri, 8 Sep 2023 10:40:38 +0200 Subject: [PATCH 2/2] Only set a text max length if greater than 0 Signed-off-by: Florian Steffens --- .../ncTable/partials/columnTypePartials/forms/TextLineForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/ncTable/partials/columnTypePartials/forms/TextLineForm.vue b/src/shared/components/ncTable/partials/columnTypePartials/forms/TextLineForm.vue index 699a9544a..a7c98f8e4 100644 --- a/src/shared/components/ncTable/partials/columnTypePartials/forms/TextLineForm.vue +++ b/src/shared/components/ncTable/partials/columnTypePartials/forms/TextLineForm.vue @@ -58,7 +58,7 @@ export default { computed: { getMaxLength() { - return this.mutableColumn.textMaxLength >= 0 ? this.mutableColumn.textMaxLength : null + return this.mutableColumn.textMaxLength > 0 ? this.mutableColumn.textMaxLength : null }, },
+ {{ t('tables', 'Last edit') }} - {{ updateTime }}
+
+ {{ updateTime }} 
+ {{ t('tables', 'Create') }} - {{ createTime }}
+
+ {{ createTime }} 
+ {{ t('tables', 'Column ID') }} + {{ column.id }}
+ {{ t('tables', 'Table ID') }} + {{ column.tableId }}