From de519ccfff2718133f098cbffd1bab80a8f52e62 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Tue, 4 Oct 2022 17:07:39 +0200 Subject: [PATCH] refactor(nc-gui): form view styles --- .../nc-gui/components/smartsheet/Form.vue | 103 +++++++++--------- .../[projectType]/form/[viewId]/index.vue | 10 +- .../form/[viewId]/index/index.vue | 4 +- .../form/[viewId]/index/survey.vue | 28 +++-- 4 files changed, 71 insertions(+), 74 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue index 8a69da9853..2892c67ead 100644 --- a/packages/nc-gui/components/smartsheet/Form.vue +++ b/packages/nc-gui/components/smartsheet/Form.vue @@ -555,6 +555,7 @@ watch(view, (nextView) => { /> +
{{ formViewData.subheading || '---' }}
{ :class="[ `nc-form-drag-${element.title.replaceAll(' ', '')}`, { - 'border-1': activeRow === element.title, + 'bg-primary bg-opacity-5 ring-0.5 ring-accent ring-opacity-100': activeRow === element.title, }, ]" @click="activeRow = element.title" @@ -584,62 +585,53 @@ watch(view, (nextView) => { v-if="isUIAllowed('editFormView') && !isRequired(element, element.required)" class="absolute flex top-2 right-2" > - + - + + + + + + + + + +
{ :required="isRequired(element, element.required)" :hide-menu="true" /> + { { { /> - {{ element.description }} +
{{ element.description }}
@@ -700,7 +695,7 @@ watch(view, (nextView) => {
-
diff --git a/packages/nc-gui/pages/[projectType]/form/[viewId]/index.vue b/packages/nc-gui/pages/[projectType]/form/[viewId]/index.vue index b1f5b50458..d5f27fa57e 100644 --- a/packages/nc-gui/pages/[projectType]/form/[viewId]/index.vue +++ b/packages/nc-gui/pages/[projectType]/form/[viewId]/index.vue @@ -27,15 +27,13 @@ const shouldRedirect = (to: string) => { if (sharedViewMeta.value.surveyMode) { if (!to.includes('survey')) navigateTo(`/nc/form/${route.params.viewId}/survey`) } else { - navigateTo(`/nc/form/${route.params.viewId}`) + if (to.includes('survey')) navigateTo(`/nc/form/${route.params.viewId}`) } } shouldRedirect(route.name as string) -router.afterEach((to) => { - shouldRedirect(to.name as string) -}) +router.afterEach((to) => shouldRedirect(to.name as string))