Browse Source

code scanner for forms - put behind feature toggle

pull/5114/head
Daniel Spaude 2 years ago
parent
commit
f163097532
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 10
      packages/nc-gui/components/smartsheet/Form.vue

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

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import Draggable from 'vuedraggable' import Draggable from 'vuedraggable'
import { RelationTypes, UITypes, ViewTypes, getSystemColumns, isVirtualCol, ColumnType } from 'nocodb-sdk' import { RelationTypes, UITypes, ViewTypes, getSystemColumns, isVirtualCol } from 'nocodb-sdk'
import { import {
ActiveViewInj, ActiveViewInj,
IsFormInj, IsFormInj,
@ -99,6 +99,8 @@ const activeRow = ref('')
const { t } = useI18n() const { t } = useI18n()
const { betaFeatureToggleState } = useBetaFeatureToggle()
const updateView = useDebounceFn( const updateView = useDebounceFn(
() => { () => {
if ((formViewData.value?.subheading?.length || 0) > 255) { if ((formViewData.value?.subheading?.length || 0) > 255) {
@ -361,7 +363,9 @@ function handleMouseUp(col: Record<string, any>, hiddenColIndex: number) {
} }
} }
const columnSupportsScanning = (elementType: UITypes) => [UITypes.SingleLineText, UITypes.Number].includes(elementType) const columnSupportsScanning = (elementType: UITypes) =>
betaFeatureToggleState.show &&
[UITypes.SingleLineText, UITypes.Number, UITypes.Email, UITypes.URL, UITypes.LongText].includes(elementType)
onClickOutside(draggableRef, () => { onClickOutside(draggableRef, () => {
activeRow.value = '' activeRow.value = ''
@ -853,7 +857,7 @@ watch(view, (nextView) => {
@apply px-4 min-h-[75px] w-full h-full; @apply px-4 min-h-[75px] w-full h-full;
.nc-attachment { .nc-attachment {
@apply md:(w-[50px] h-[50px]) lg:(w-[75px] h-[75px]) min-h-[50px] min-w-[50px]; @apply md: (w-[50px] h-[50px]) lg:(w-[75px] h-[75px]) min-h-[50px] min-w-[50px];
} }
.nc-attachment-cell-dropzone { .nc-attachment-cell-dropzone {

Loading…
Cancel
Save