Browse Source

chore(nc-gui): lint

pull/7179/head
աɨռɢӄաօռɢ 12 months ago
parent
commit
8512e9b440
  1. 2
      packages/nc-gui/components/cell/Json.vue
  2. 1
      packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue
  3. 2
      packages/nc-gui/components/dashboard/settings/BaseAudit.vue
  4. 2
      packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
  5. 4
      packages/nc-gui/components/nc/Modal.vue
  6. 6
      packages/nc-gui/components/nc/Pagination.vue
  7. 1
      packages/nc-gui/components/project/View.vue
  8. 5
      packages/nc-gui/components/template/Editor.vue
  9. 8
      packages/nc-gui/composables/useColumnCreateStore.ts
  10. 2
      packages/nc-gui/helpers/parsers/CSVTemplateAdapter.ts

2
packages/nc-gui/components/cell/Json.vue

@ -156,7 +156,7 @@ watch(isExpanded, () => {
:closable="false"
centered
:footer="null"
v-bind:wrap-class-name="isExpanded ? '!z-1051' : null"
:wrap-class-name="isExpanded ? '!z-1051' : null"
>
<div v-if="editEnabled && !readonly" class="flex flex-col w-full" @mousedown.stop @mouseup.stop @click.stop>
<div class="flex flex-row justify-between pt-1 pb-2 nc-json-action" @mousedown.stop>

1
packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue

@ -1,5 +1,4 @@
<script lang="ts" setup>
import GithubButton from 'vue-github-button'
import {
computed,
message,

2
packages/nc-gui/components/dashboard/settings/BaseAudit.vue

@ -135,8 +135,8 @@ const columns = [
v-model:page-size="currentLimit"
:total="+totalRows"
show-less-items
@change="loadAudits"
class="pagination"
@change="loadAudits"
/>
</div>
</div>

2
packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue

@ -277,7 +277,7 @@ const isPublicShared = computed(() => {
<div class="flex flex-col py-2 px-3 mb-1">
<div class="flex flex-col w-full mt-2.5 px-3 py-2.5 border-gray-200 border-1 rounded-md gap-y-2">
<div class="flex flex-row w-full justify-between py-0.5">
<div class="text-gray-900 font-medium" >{{ $t('activity.enabledPublicViewing') }}</div>
<div class="text-gray-900 font-medium">{{ $t('activity.enabledPublicViewing') }}</div>
<a-switch
v-e="['c:share:view:enable:toggle']"
data-testid="share-view-toggle"

4
packages/nc-gui/components/nc/Modal.vue

@ -66,7 +66,7 @@ const height = computed(() => {
return 'auto'
})
const wrapClassName = computed(() => {
const newWrapClassName = computed(() => {
let className = 'nc-modal-wrapper'
if (_wrapClassName) {
className += ` ${_wrapClassName}`
@ -86,7 +86,7 @@ const slots = useSlots()
:width="width"
:centered="true"
:closable="false"
:wrap-class-name="wrapClassName"
:wrap-class-name="newWrapClassName"
:footer="null"
:mask-closable="maskClosable"
:destroy-on-close="destroyOnClose"

6
packages/nc-gui/components/nc/Pagination.vue

@ -90,11 +90,7 @@ const pagesList = computed(() => {
</component>
<div v-if="!isMobileMode" class="text-gray-600">
<a-select
v-model:value="current"
class="!mr-[2px]"
:options="pagesList"
>
<a-select v-model:value="current" class="!mr-[2px]" :options="pagesList">
<template #suffixIcon>
<GeneralIcon icon="arrowDown" class="text-gray-500 nc-select-expand-btn" />
</template>

1
packages/nc-gui/components/project/View.vue

@ -86,7 +86,6 @@ watch(
if (newVal && oldVal === undefined) {
updateBaseUserCount()
}
return
},
{ immediate: true },
)

5
packages/nc-gui/components/template/Editor.vue

@ -131,10 +131,7 @@ const validators = computed(() =>
hasSelectColumn.value[tableIdx] = false
table.columns?.forEach((column, columnIdx) => {
acc[`tables.${tableIdx}.columns.${columnIdx}.title`] = [
fieldRequiredValidator(),
fieldLengthValidator(),
]
acc[`tables.${tableIdx}.columns.${columnIdx}.title`] = [fieldRequiredValidator(), fieldLengthValidator()]
acc[`tables.${tableIdx}.columns.${columnIdx}.uidt`] = [fieldRequiredValidator()]
if (isSelect(column)) {
hasSelectColumn.value[tableIdx] = true

8
packages/nc-gui/composables/useColumnCreateStore.ts

@ -40,8 +40,6 @@ const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState
const { sqlUis } = storeToRefs(baseStore)
const { bases } = storeToRefs(useBases())
const { $api } = useNuxtApp()
const { getMeta } = useMetas()
@ -66,12 +64,6 @@ const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState
isXcdbBaseFunc(meta.value?.source_id ? meta.value?.source_id : Object.keys(sqlUis.value)[0]),
)
const source = computed(() =>
meta.value && meta.value.source_id && meta.value.base_id
? bases.value.get(meta.value?.base_id as string)?.sources?.find((s) => s.id === meta.value!.source_id)
: undefined,
)
const idType = null
const additionalValidations = ref<ValidationsObj>({})

2
packages/nc-gui/helpers/parsers/CSVTemplateAdapter.ts

@ -58,7 +58,7 @@ export default class CSVTemplateAdapter {
this.tables[tableIdx] = []
for (const [columnIdx, columnName] of columnNames.entries()) {
let title = ((columnNameRowExist && columnName.toString().trim()) || `Field ${columnIdx + 1}`).trim()
const title = ((columnNameRowExist && columnName.toString().trim()) || `Field ${columnIdx + 1}`).trim()
let cn: string = ((columnNameRowExist && columnName.toString().trim()) || `field_${columnIdx + 1}`)
.replace(/[` ~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/g, '_')
.trim()

Loading…
Cancel
Save