From cbedf6f0469ae4bd36ac2cba4d510374fc268456 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 4 Oct 2022 10:09:56 +0200 Subject: [PATCH] change from review --- webapp/components/Group/GroupForm.vue | 113 +++++++++++++++----------- 1 file changed, 66 insertions(+), 47 deletions(-) diff --git a/webapp/components/Group/GroupForm.vue b/webapp/components/Group/GroupForm.vue index c4b1195f7..defd4a72c 100644 --- a/webapp/components/Group/GroupForm.vue +++ b/webapp/components/Group/GroupForm.vue @@ -17,15 +17,12 @@ autofocus :placeholder="`${$t('group.name')} …`" /> - - {{ `${formData.name.length} / ${formSchema.name.max}` }} + {{ `${formData.name.length} / ${formSchema.name.min}–${formSchema.name.max}` }} - - + - - - {{ $t('group.type') }} - {{ formData.groupType }} + + - - - - - - + + + + - - - - + + + {{ $t('group.description') }} @@ -84,19 +77,17 @@ name="description" @input="updateEditorDescription" /> - - - {{ `${descriptionLength} / ${formSchema.description.min}` }} - - - - + + {{ `${descriptionLength} / ${formSchema.description.min}` }} + + - {{ $t('group.actionRadius') }} + + - - - - - - + + + - - - - + + + + - + + {{ $t('actions.cancel') }} @@ -208,7 +197,7 @@ export default { }, }, data() { - const { name, slug, groupType, goal, description, actionRadius, locationName, categories } = + const { name, slug, groupType, about, description, actionRadius, locationName, categories } = this.group return { categoriesActive: this.$env.CATEGORIES_ACTIVE, @@ -222,7 +211,7 @@ export default { name: name || '', slug: slug || '', groupType: groupType || '', - goal: goal || '', + about: about || '', description: description || '', locationName: locationName || '', actionRadius: actionRadius || '', @@ -232,7 +221,7 @@ export default { name: { required: true, min: NAME_LENGTH_MIN, max: NAME_LENGTH_MAX }, slug: { required: false, min: NAME_LENGTH_MIN }, groupType: { required: true }, - goal: { required: false }, + about: { required: false }, description: { required: true, min: DESCRIPTION_WITHOUT_HTML_LENGTH_MIN }, actionRadius: { required: true }, locationName: { required: false }, @@ -268,11 +257,11 @@ export default { this.$refs.groupForm.update('description', value) }, submit() { - const { name, goal, description, groupType, actionRadius, locationName, categoryIds } = + const { name, about, description, groupType, actionRadius, locationName, categoryIds } = this.formData const variables = { name, - goal, + about, description, groupType, actionRadius, @@ -333,9 +322,39 @@ export default { -moz-appearance: auto; appearance: auto; } +.select-label { + margin-bottom: 0; + padding-bottom: 4px; + color: #70677e; + font-size: 1rem; +} + +.textarea-label { + padding-bottom: 14px; +} + +.group-form > .base-card { + display: flex; + flex-direction: column; + + > .ds-form-item { + margin: 0; + } + + > .ds-chip { + align-self: flex-end; + margin: $space-xx-small 0 $space-base; + cursor: default; + } + + > .select-field { + align-self: flex-end; + } + + > .buttons { + align-self: flex-end; + margin-top: $space-base; + } -ds-chip { - position: absolute; - right: 0px; }