Browse Source

fix(nc-gui): disable hide nocodb branding in oss also update shared form

pull/7664/head
Ramesh Mane 9 months ago
parent
commit
a40ff107e6
  1. 8
      packages/nc-gui/components/smartsheet/Form.vue
  2. 3
      packages/nc-gui/lang/en.json
  3. 2
      packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/index.vue
  4. 2
      packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue

8
packages/nc-gui/components/smartsheet/Form.vue

@ -330,7 +330,6 @@ function setFormData() {
.filter((f) => !hiddenColTypes.includes(f.uidt) && !systemFieldsIds.value.includes(f.fk_column_id)) .filter((f) => !hiddenColTypes.includes(f.uidt) && !systemFieldsIds.value.includes(f.fk_column_id))
.sort((a, b) => a.order - b.order) .sort((a, b) => a.order - b.order)
.map((c) => ({ ...c, required: !!c.required })) .map((c) => ({ ...c, required: !!c.required }))
} }
function isRequired(_columnObj: Record<string, any>, required = false) { function isRequired(_columnObj: Record<string, any>, required = false) {
@ -1128,7 +1127,12 @@ useEventListener(
} }
" "
/> />
<a-switch v-else :checked="false" size="small" :disabled="true" /> <a-tooltip v-else placement="top">
<template #title>
{{ $t('msg.info.upgradeToEnterpriseEdition', { extraInfo: 'to ' + $t('labels.hideNocodbBranding') }) }}
</template>
<a-switch :checked="false" size="small" :disabled="true" />
</a-tooltip>
<span class="ml-4">{{ $t('labels.hideNocodbBranding') }}</span> <span class="ml-4">{{ $t('labels.hideNocodbBranding') }}</span>
</div> </div>
</div> </div>

3
packages/nc-gui/lang/en.json

@ -1292,7 +1292,8 @@
"editingSystemKeyNotSupported": "Editing system key not supported", "editingSystemKeyNotSupported": "Editing system key not supported",
"notAvailableAtTheMoment": "Not available at the moment", "notAvailableAtTheMoment": "Not available at the moment",
"groupPasteIsNotSupportedOnLinksColumn": "Group paste operation is not supported on Links/LinkToAnotherRecord column", "groupPasteIsNotSupportedOnLinksColumn": "Group paste operation is not supported on Links/LinkToAnotherRecord column",
"groupClearIsNotSupportedOnLinksColumn": "Group clear operation is not supported on Links/LinkToAnotherRecord column" "groupClearIsNotSupportedOnLinksColumn": "Group clear operation is not supported on Links/LinkToAnotherRecord column",
"upgradeToEnterpriseEdition": "Upgrade to Enterprise Edition {extraInfo}"
}, },
"error": { "error": {
"scopesRequired": "Scopes required", "scopesRequired": "Scopes required",

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

@ -235,7 +235,7 @@ const onDecode = async (scannedCodeValue: string) => {
</div> </div>
</div> </div>
</div> </div>
<div v-if="!parseProp(sharedFormView?.meta).hide_branding"> <div>
<a-divider class="!my-6 !md:my-8" /> <a-divider class="!my-6 !md:my-8" />
<div class="inline-block"> <div class="inline-block">
<GeneralFormBranding /> <GeneralFormBranding />

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

@ -454,7 +454,7 @@ onMounted(() => {
</div> </div>
</Transition> </Transition>
<div v-if="!parseProp(sharedFormView?.meta)?.hide_branding" class="w-full flex justify-center"> <div class="w-full flex justify-center">
<GeneralFormBranding class="inline-flex mx-auto" /> <GeneralFormBranding class="inline-flex mx-auto" />
</div> </div>
</div> </div>

Loading…
Cancel
Save