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') }} {{ $t('activity.account.projInfo') }}
</div> </div>
</a-menu-item> </a-menu-item>
<a-menu-item <a-menu-item v-if="isUIAllowed('duplicateProject', true, projectRole)" @click="duplicateProject(project)">
v-if="isUIAllowed('duplicateProject', true, projectRole)"
@click="duplicateProject(project)"
>
<div class="nc-menu-item-wrapper"> <div class="nc-menu-item-wrapper">
<GeneralIcon icon="duplicate" class="text-gray-700" /> <GeneralIcon icon="duplicate" class="text-gray-700" />
{{ $t('general.duplicate') }} {{ $t('objects.project') }} {{ $t('general.duplicate') }} {{ $t('objects.project') }}

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

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

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

@ -38,8 +38,8 @@ const onChange = (value: string) => {
:show-search="showSearch" :show-search="showSearch"
:filter-option="filterOption" :filter-option="filterOption"
:dropdown-match-select-width="dropdownMatchSelectWidth" :dropdown-match-select-width="dropdownMatchSelectWidth"
@change="onChange"
:allow-clear="allowClear" :allow-clear="allowClear"
@change="onChange"
> >
<template #suffixIcon> <template #suffixIcon>
<GeneralIcon icon="arrowDown" class="text-gray-800 nc-select-expand-btn" /> <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"> <style scoped lang="scss">
.badge-text { .badge-text {
@apply text-[14px] pt-1 text-center @apply text-[14px] pt-1 text-center;
} }
.nc-collaborators-list-table { .nc-collaborators-list-table {

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

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

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

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

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

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

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

@ -1,15 +1,13 @@
<template>
<div class="p-4">
<!--<WorkspaceProjectList />-->
</div>
</template>
<script> <script>
export default { export default {
name: "index" name: 'Index',
} }
</script> </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 { acceptHMRUpdate, defineStore } from 'pinia'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { isString } from '@vue/shared' 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 type { ThemeConfig } from '#imports'
import { navigateTo } from '#imports'
export const useWorkspace = defineStore('workspaceStore', () => { export const useWorkspace = defineStore('workspaceStore', () => {
const projectsStore = useProjects() const projectsStore = useProjects()

Loading…
Cancel
Save