Browse Source

chore(nc-gui): lint

pull/6772/head
աɨռɢӄաօռɢ 12 months ago
parent
commit
1696ec55a2
  1. 4
      packages/nc-gui/components/cell/attachment/RenameFile.vue
  2. 3
      packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue
  3. 1
      packages/nc-gui/components/roles/Badge.vue
  4. 2
      packages/nc-gui/components/smartsheet/details/Fields.vue
  5. 2
      packages/nc-gui/components/smartsheet/expanded-form/index.vue
  6. 4
      packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue
  7. 2
      packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue
  8. 2
      packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue
  9. 5
      packages/nc-gui/components/smartsheet/toolbar/StackedBy.vue
  10. 4
      packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue
  11. 28
      packages/nc-gui/components/workspace/ProjectList.vue
  12. 12
      packages/nc-gui/components/workspace/Settings.vue
  13. 2
      packages/nc-gui/layouts/new.vue
  14. 2
      packages/nc-gui/pages/reset/[id].vue

4
packages/nc-gui/components/cell/attachment/RenameFile.vue

@ -1,8 +1,6 @@
<script lang="ts" setup>
import { onKeyStroke, onMounted, reactive, ref, useI18n } from '#imports'
const { t } = useI18n()
const props = defineProps<{
title: string
}>()
@ -12,6 +10,8 @@ const emit = defineEmits<{
(event: 'cancel'): void
}>()
const { t } = useI18n()
const inputEl = ref()
const visible = ref(true)

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

@ -148,9 +148,6 @@ onMounted(() => {
<template v-if="!isMobileMode">
<NcDivider />
<a v-e="['c:nocodb:forum-open']" href="https://community.nocodb.com" target="_blank" class="!underline-transparent">
<NcMenuItem>
<GeneralIcon icon="help" class="menu-icon mt-0.5" />

1
packages/nc-gui/components/roles/Badge.vue

@ -35,7 +35,6 @@ const roleProperties = computed(() => {
label,
}
})
</script>
<template>

2
packages/nc-gui/components/smartsheet/details/Fields.vue

@ -3,7 +3,7 @@ import { diff } from 'deep-object-diff'
import { message } from 'ant-design-vue'
import { UITypes, isSystemColumn } from 'nocodb-sdk'
import Draggable from 'vuedraggable'
import type { ColumnType, SelectOptionsType, TableType } from 'nocodb-sdk'
import type { ColumnType, SelectOptionsType } from 'nocodb-sdk'
import { Icon } from '@iconify/vue'
import { type Field, getUniqueColumnName, ref, useSmartsheetStoreOrThrow } from '#imports'

2
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -294,7 +294,7 @@ onMounted(async () => {
await loadCommentsAndLogs()
} catch (e: any) {
if (e.response?.status === 404) {
message.error(t("msg.noRecordFound"))
message.error(t('msg.noRecordFound'))
router.replace({ query: {} })
} else throw e
}

4
packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue

@ -2,7 +2,7 @@
import type { SelectProps } from 'ant-design-vue'
import type { ColumnType, LinkToAnotherRecordType } from 'nocodb-sdk'
import { RelationTypes, UITypes, isLinksOrLTAR, isSystemColumn, isVirtualCol } from 'nocodb-sdk'
import { ActiveViewInj, MetaInj, computed, inject, ref, resolveComponent, useViewColumnsOrThrow } from '#imports'
import { MetaInj, computed, inject, ref, resolveComponent, useViewColumnsOrThrow } from '#imports'
const { modelValue, isSort, allowEmpty, ...restProps } = defineProps<{
modelValue?: string
@ -22,8 +22,6 @@ const localValue = computed({
set: (val) => emit('update:modelValue', val),
})
const activeView = inject(ActiveViewInj, ref())
const { showSystemFields, metaColumnById } = useViewColumnsOrThrow()
const options = computed<SelectProps['options']>(() =>

2
packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

@ -10,8 +10,6 @@ import {
FieldsInj,
IsLockedInj,
IsPublicInj,
MetaInj,
ReloadViewDataHookInj,
computed,
iconMap,
inject,

2
packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue

@ -7,11 +7,11 @@ import {
IsLockedInj,
IsPublicInj,
MetaInj,
ReloadViewDataHookInj,
computed,
iconMap,
inject,
ref,
useSmartsheetStoreOrThrow,
useViewColumnsOrThrow,
watch,
} from '#imports'

5
packages/nc-gui/components/smartsheet/toolbar/StackedBy.vue

@ -4,12 +4,13 @@ import type { KanbanType } from 'nocodb-sdk'
import type { SelectProps } from 'ant-design-vue'
import {
ActiveViewInj,
IsKanbanInj,
IsLockedInj,
IsPublicInj,
MetaInj,
ReloadViewDataHookInj,
computed,
inject,
provide,
ref,
useKanbanViewStoreOrThrow,
useMenuCloseOnEsc,
@ -26,8 +27,6 @@ const activeView = inject(ActiveViewInj, ref())
const IsPublic = inject(IsPublicInj, ref(false))
const reloadDataHook = inject(ReloadViewDataHookInj)!
const isLocked = inject(IsLockedInj, ref(false))
const { fields, loadViewColumns, metaColumnById } = useViewColumnsOrThrow(activeView, meta)

4
packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue

@ -274,9 +274,9 @@ watch(
</div>
<div class="flex flex-row justify-end gap-x-2 border-t-1 border-gray-100 pt-3">
<a-button key="back" class="!rounded-md" @click="cancel">{{$t('general.cancel')}}</a-button>
<a-button key="back" class="!rounded-md" @click="cancel">{{ $t('general.cancel') }}</a-button>
<a-button class="!rounded-md">Manage base access</a-button>
<a-button key="submit" class="!rounded-md" type="primary" :loading="loading">{{$t('activity.share')}}</a-button>
<a-button key="submit" class="!rounded-md" type="primary" :loading="loading">{{ $t('activity.share') }}</a-button>
</div>
</div>
</GeneralModal>

28
packages/nc-gui/components/workspace/ProjectList.vue

@ -3,25 +3,41 @@ import { Empty } from 'ant-design-vue'
import type { BaseType } from 'nocodb-sdk'
import { ProjectRoles, ProjectStatus, WorkspaceUserRoles } from 'nocodb-sdk'
import { nextTick } from '@vue/runtime-core'
import { NcProjectType, isEeUI, navigateTo, storeToRefs, timeAgo, useGlobal, useWorkspace } from '#imports'
import {
NcProjectType,
computed,
extractSdkResponseErrorMsg,
isEeUI,
message,
navigateTo,
ref,
storeToRefs,
timeAgo,
useBases,
useGlobal,
useRoles,
useWorkspace,
} from '#imports'
import { useNuxtApp } from '#app'
const workspaceStore = useWorkspace()
const { updateProjectTitle } = workspaceStore
const { activePage } = storeToRefs(workspaceStore)
const basesStore = useBases()
const { basesList, isProjectsLoading } = storeToRefs(basesStore)
const { navigateToProject } = useGlobal()
// const filteredProjects = computed(() => bases.value?.filter((p) => !p.deleted) || [])
const { $e } = useNuxtApp()
const { isUIAllowed } = useRoles()
const showProjectDeleteModal = ref(false)
const toBeDeletedProjectId = ref<string | undefined>()
const openProject = async (base: BaseType) => {
@ -52,6 +68,7 @@ const deleteProject = (base: BaseType) => {
}
const renameInput = ref<HTMLInputElement>()
const enableEdit = (index: number) => {
basesList.value![index]!.temp_title = basesList.value![index].title
basesList.value![index]!.edit = true
@ -137,6 +154,7 @@ const workspaceMoveProjectOnSuccess = async (workspaceId: string) => {
}
const isDuplicateDlgOpen = ref(false)
const selectedProjectToDuplicate = ref()
const duplicateProject = (base: BaseType) => {
@ -145,7 +163,9 @@ const duplicateProject = (base: BaseType) => {
}
let clickCount = 0
let timer: any = null
const delay = 250
function onProjectTitleClick(index: number) {
@ -379,7 +399,7 @@ const setIcon = async (icon: string, base: BaseType) => {
@apply !pl-6;
}
:deep(.ant-table-cell:lst-child) {
:deep(.ant-table-cell:last-child) {
@apply !plr6;
}

12
packages/nc-gui/components/workspace/Settings.vue

@ -1,16 +1,24 @@
<script lang="ts" setup>
import { useI18n } from '#imports'
import { ref, storeToRefs, useGlobal, useI18n, useWorkspace, watch } from '#imports'
const { signOut } = useGlobal()
const { t } = useI18n()
const { deleteWorkspace, navigateToWorkspace, updateWorkspace } = useWorkspace()
const { workspacesList, activeWorkspaceId, activeWorkspace, workspaces } = storeToRefs(useWorkspace())
const formValidator = ref()
const isConfirmed = ref(false)
const isDeleting = ref(false)
const isErrored = ref(false)
const isTitleUpdating = ref(false)
const isCancelButtonVisible = ref(false)
const form = ref({
@ -108,7 +116,7 @@ const onCancel = () => {
<div class="item flex flex-col w-full">
<div class="font-medium text-base">{{ $t('labels.changeWsName') }}</div>
<a-form ref="formValidator" layout="vertical" no-style :model="form" class="w-full" @finish="titleChange">
<div class="text-gray-500 mt-6 mb-1.5">{{ $t('objects.workspace') $t('general.name')}}</div>
<div class="text-gray-500 mt-6 mb-1.5">{{ `${t('objects.workspace')} ${t('general.name')}` }}</div>
<a-form-item name="title" :rules="formRules.title">
<a-input
v-model:value="form.title"

2
packages/nc-gui/layouts/new.vue

@ -99,7 +99,7 @@ export default {
</a-menu-item>
<a-menu-divider class="!m-0" />
<!-- <a-menu-item v-if="isUIAllowed('superAdminAppStore')" key="0" class="!rounded-t">
<!-- <a-menu-item v-if="isUIAllowed('superAdminAppStore')" key="0" class="!rounded-t">
<nuxt-link
v-e="['c:settings:appstore', { page: true }]"
class="nc-base-menu-item group !no-underline"

2
packages/nc-gui/pages/reset/[id].vue

@ -8,9 +8,9 @@ import {
reactive,
ref,
useApi,
useI18n,
useRoute,
useRouter,
useI18n,
} from '#imports'
definePageMeta({

Loading…
Cancel
Save