Browse Source

chore(nc-gui): lint

pull/6231/head
Wing-Kam Wong 1 year ago
parent
commit
66ef07efab
  1. 5
      packages/nc-gui/components/dashboard/TreeViewNew/ProjectNode.vue
  2. 38
      packages/nc-gui/components/nc/Badge.vue
  3. 2
      packages/nc-gui/components/nc/Select.vue
  4. 2
      packages/nc-gui/components/workspace/CollaboratorsList.vue
  5. 2
      packages/nc-gui/pages/index/[typeOrId]/[projectId].vue
  6. 3
      packages/nc-gui/pages/index/[typeOrId]/[projectId]/index/index.vue
  7. 8
      packages/nc-gui/pages/index/[typeOrId]/map/[viewId]/index.vue
  8. 16
      packages/nc-gui/pages/index/index.vue
  9. 3
      packages/nc-gui/store/workspace.ts

5
packages/nc-gui/components/dashboard/TreeViewNew/ProjectNode.vue

@ -455,10 +455,7 @@ const DlgProjectDuplicateOnOk = async (jobData: { id: string; project_id: string
{{ $t('activity.account.projInfo') }}
</div>
</a-menu-item>
<a-menu-item
v-if="isUIAllowed('duplicateProject', true, projectRole)"
@click="duplicateProject(project)"
>
<a-menu-item v-if="isUIAllowed('duplicateProject', true, projectRole)" @click="duplicateProject(project)">
<div class="nc-menu-item-wrapper">
<GeneralIcon icon="duplicate" class="text-gray-700" />
{{ $t('general.duplicate') }} {{ $t('objects.project') }}

38
packages/nc-gui/components/nc/Badge.vue

@ -1,31 +1,33 @@
<script lang="ts" setup>
import { computed } from 'vue';
import { computed } from 'vue'
const props = defineProps<{
color: string
color: string
}>()
</script>
<template>
<div class="badge-color" :class="{
'border-purple-500': props.color === 'purple',
'bg-purple-100': props.color === 'purple',
'border-blue-500': props.color === 'blue',
'bg-blue-100': props.color === 'blue',
'border-green-500': props.color === 'green',
'bg-green-100': props.color === 'green',
'border-orange-500': props.color === 'orange',
'bg-orange-100': props.color === 'orange',
'border-yellow-500': props.color === 'yellow',
'bg-yellow-100': props.color === 'yellow',
}">
<slot></slot>
</div>
<div
class="badge-color"
:class="{
'border-purple-500': props.color === 'purple',
'bg-purple-100': props.color === 'purple',
'border-blue-500': props.color === 'blue',
'bg-blue-100': props.color === 'blue',
'border-green-500': props.color === 'green',
'bg-green-100': props.color === 'green',
'border-orange-500': props.color === 'orange',
'bg-orange-100': props.color === 'orange',
'border-yellow-500': props.color === 'yellow',
'bg-yellow-100': props.color === 'yellow',
}"
>
<slot></slot>
</div>
</template>
<style>
.badge-color {
@apply mt-1 border w-23 h-6 rounded-lg;
@apply mt-1 border w-23 h-6 rounded-lg;
}
</style>

2
packages/nc-gui/components/nc/Select.vue

@ -38,8 +38,8 @@ const onChange = (value: string) => {
:show-search="showSearch"
:filter-option="filterOption"
:dropdown-match-select-width="dropdownMatchSelectWidth"
@change="onChange"
:allow-clear="allowClear"
@change="onChange"
>
<template #suffixIcon>
<GeneralIcon icon="arrowDown" class="text-gray-800 nc-select-expand-btn" />

2
packages/nc-gui/components/workspace/CollaboratorsList.vue

@ -147,7 +147,7 @@ const accessibleRoles = computed<WorkspaceUserRoles[]>(() => {
<style scoped lang="scss">
.badge-text {
@apply text-[14px] pt-1 text-center
@apply text-[14px] pt-1 text-center;
}
.nc-collaborators-list-table {

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

@ -24,7 +24,7 @@ provide(ToggleDialogInj, toggleDialog)
<template>
<div>
<NuxtPage :transition="false"/>
<NuxtPage :transition="false" />
</div>
</template>

3
packages/nc-gui/pages/index/[typeOrId]/[projectId]/index/index.vue

@ -10,7 +10,6 @@ provide(TabMetaInj, activeTab)
useSidebar('nc-left-sidebar')
const router = useRouter()
const route = router.currentRoute
@ -72,7 +71,7 @@ const route = router.currentRoute
</div>
-->
<div class="w-full min-h-[300px] flex-auto">
<NuxtPage/>
<NuxtPage />
</div>
</div>
</div>

8
packages/nc-gui/pages/index/[typeOrId]/map/[viewId]/index.vue

@ -26,8 +26,8 @@ try {
</script>
<template>
<div v-if="showPassword">
<LazySharedViewAskPassword v-model="showPassword" />
</div>
<LazySharedViewMap v-else />
<div v-if="showPassword">
<LazySharedViewAskPassword v-model="showPassword" />
</div>
<LazySharedViewMap v-else />
</template>

16
packages/nc-gui/pages/index/index.vue

@ -1,15 +1,13 @@
<template>
<div class="p-4">
<!--<WorkspaceProjectList />-->
</div>
</template>
<script>
export default {
name: "index"
name: 'Index',
}
</script>
<style scoped>
<template>
<div class="p-4">
<!-- <WorkspaceProjectList /> -->
</div>
</template>
</style>
<style scoped></style>

3
packages/nc-gui/store/workspace.ts

@ -2,9 +2,8 @@ import type { ProjectType } from 'nocodb-sdk'
import { acceptHMRUpdate, defineStore } from 'pinia'
import { message } from 'ant-design-vue'
import { isString } from '@vue/shared'
import { computed, ref, useCommandPalette, useNuxtApp, useRouter, useTheme } from '#imports'
import { computed, navigateTo, ref, useCommandPalette, useNuxtApp, useRouter, useTheme } from '#imports'
import type { ThemeConfig } from '#imports'
import { navigateTo } from '#imports'
export const useWorkspace = defineStore('workspaceStore', () => {
const projectsStore = useProjects()

Loading…
Cancel
Save