Browse Source

chore(nc-gui): lint

pull/5903/head
Wing-Kam Wong 1 year ago
parent
commit
95964e0332
  1. 5
      packages/nc-gui/components/dashboard/TreeViewNew/ProjectNode.vue
  2. 10
      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. 16
      packages/nc-gui/pages/index/index.vue
  8. 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') }}

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

@ -1,6 +1,5 @@
<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
@ -8,7 +7,9 @@ const props = defineProps<{
</script> </script>
<template> <template>
<div class="badge-color" :class="{ <div
class="badge-color"
:class="{
'border-purple-500': props.color === 'purple', 'border-purple-500': props.color === 'purple',
'bg-purple-100': props.color === 'purple', 'bg-purple-100': props.color === 'purple',
'border-blue-500': props.color === 'blue', 'border-blue-500': props.color === 'blue',
@ -19,7 +20,8 @@ const props = defineProps<{
'bg-orange-100': props.color === 'orange', 'bg-orange-100': props.color === 'orange',
'border-yellow-500': props.color === 'yellow', 'border-yellow-500': props.color === 'yellow',
'bg-yellow-100': props.color === 'yellow', 'bg-yellow-100': props.color === 'yellow',
}"> }"
>
<slot></slot> <slot></slot>
</div> </div>
</template> </template>

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>

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