Browse Source

chore(nc-gui): add `powered by` note to bottom of form page

pull/3669/head
braks 2 years ago committed by Raju Udava
parent
commit
9e8f500d1a
  1. 2
      packages/nc-gui/pages/[projectType]/form/[viewId]/index.vue
  2. 11
      packages/nc-gui/pages/[projectType]/form/[viewId]/index/index.vue
  3. 3
      packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue

2
packages/nc-gui/pages/[projectType]/form/[viewId]/index.vue

@ -8,6 +8,8 @@ const { passwordDlg, password, loadSharedView } = useSharedFormStoreOrThrow()
<div class="nc-form-view md:bg-primary bg-opacity-5 h-full min-h-[600px] flex flex-col justify-center items-center nc-form-signin"> <div class="nc-form-view md:bg-primary bg-opacity-5 h-full min-h-[600px] flex flex-col justify-center items-center nc-form-signin">
<NuxtPage /> <NuxtPage />
<div class="self-end prose-xs text-gray-400 mx-auto my-4 relative flex items-center gap-2">Powered by NocoDB</div>
<a-modal <a-modal
v-model:visible="passwordDlg" v-model:visible="passwordDlg"
:closable="false" :closable="false"

11
packages/nc-gui/pages/[projectType]/form/[viewId]/index/index.vue

@ -2,8 +2,7 @@
import { RelationTypes, UITypes, isVirtualCol } from 'nocodb-sdk' import { RelationTypes, UITypes, isVirtualCol } from 'nocodb-sdk'
import { useSharedFormStoreOrThrow } from '#imports' import { useSharedFormStoreOrThrow } from '#imports'
const { sharedFormView, submitForm, v$, formState, notFound, formColumns, submitted, secondsRemain, isLoading } = const { sharedFormView, submitForm, v$, formState, notFound, formColumns, submitted, secondsRemain } = useSharedFormStoreOrThrow()
useSharedFormStoreOrThrow()
function isRequired(_columnObj: Record<string, any>, required = false) { function isRequired(_columnObj: Record<string, any>, required = false) {
let columnObj = _columnObj let columnObj = _columnObj
@ -24,11 +23,9 @@ function isRequired(_columnObj: Record<string, any>, required = false) {
class="bg-white relative flex flex-col justify-center gap-2 w-full lg:max-w-1/2 max-w-500px m-auto p-8 md:(rounded-lg border-1 border-gray-200 shadow-xl)" class="bg-white relative flex flex-col justify-center gap-2 w-full lg:max-w-1/2 max-w-500px m-auto p-8 md:(rounded-lg border-1 border-gray-200 shadow-xl)"
> >
<template v-if="sharedFormView"> <template v-if="sharedFormView">
<general-noco-icon class="color-transition hover:(ring ring-accent)" :class="[isLoading ? 'animated-bg-gradient' : '']" /> <h1 class="prose-2xl font-bold self-center my-4">{{ sharedFormView.heading }}</h1>
<h1 class="prose-2xl font-bold self-center my-4">{{ sharedFormView?.heading }}</h1> <h2 v-if="sharedFormView.subheading" class="prose-lg text-gray-500 self-center">{{ sharedFormView.subheading }}</h2>
<h2 v-if="sharedFormView?.subheading" class="prose-lg text-gray-500 self-center">{{ sharedFormView.subheading }}</h2>
<a-alert v-if="notFound" type="warning" class="my-4 text-center" message="Not found" /> <a-alert v-if="notFound" type="warning" class="my-4 text-center" message="Not found" />
@ -53,7 +50,7 @@ function isRequired(_columnObj: Record<string, any>, required = false) {
</div> </div>
</template> </template>
<template v-else-if="sharedFormView"> <template v-else>
<div class="nc-form-wrapper"> <div class="nc-form-wrapper">
<div class="nc-form h-full max-w-3/4 mx-auto"> <div class="nc-form h-full max-w-3/4 mx-auto">
<div v-for="(field, index) in formColumns" :key="index" class="flex flex-col my-6 gap-2"> <div v-for="(field, index) in formColumns" :key="index" class="flex flex-col my-6 gap-2">

3
packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue

@ -0,0 +1,3 @@
<template>
<div>Survey Mode</div>
</template>
Loading…
Cancel
Save