Browse Source

chore: lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2723/head
Pranav C 2 years ago
parent
commit
cb5dd5816d
  1. 1
      packages/nc-gui-v2/components.d.ts
  2. 5
      packages/nc-gui-v2/pages/index/index/index.vue
  3. 28
      packages/nc-gui-v2/pages/nc/[projectId].vue

1
packages/nc-gui-v2/components.d.ts vendored

@ -7,7 +7,6 @@ export {}
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {
export interface GlobalComponents { export interface GlobalComponents {
'(feat(gui-v2)': add project delete and edit options)
ADivider: typeof import('ant-design-vue/es')['Divider'] ADivider: typeof import('ant-design-vue/es')['Divider']
ADropdown: typeof import('ant-design-vue/es')['Dropdown'] ADropdown: typeof import('ant-design-vue/es')['Dropdown']
ALayout: typeof import('ant-design-vue/es')['Layout'] ALayout: typeof import('ant-design-vue/es')['Layout']

5
packages/nc-gui-v2/pages/index/index/index.vue

@ -50,10 +50,7 @@ const formatTitle = (title: string) =>
</div> </div>
</template> </template>
<v-list class="!py-0 flex flex-col bg-white rounded-lg shadow-md border-1 border-gray-300 mt-2 ml-2"> <v-list class="!py-0 flex flex-col bg-white rounded-lg shadow-md border-1 border-gray-300 mt-2 ml-2">
<div <div class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2" @click="navigateTo('/create')">
class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2"
@click="navigateTo('/create')"
>
<MdiPlus class="col-span-2 mr-1 mt-[1px] text-primary text-lg" /> <MdiPlus class="col-span-2 mr-1 mt-[1px] text-primary text-lg" />
<div class="col-span-10 text-sm xl:text-md">{{ $t('activity.createProject') }}</div> <div class="col-span-10 text-sm xl:text-md">{{ $t('activity.createProject') }}</div>
</div> </div>

28
packages/nc-gui-v2/pages/nc/[projectId].vue

@ -1,29 +1,29 @@
<script setup lang="ts"> <script setup lang="ts">
import { watch } from "vue"; import { watch } from 'vue'
import useProject from "~/composables/useProject"; import useProject from '~/composables/useProject'
import useTabs from "~/composables/useTabs"; import useTabs from '~/composables/useTabs'
const route = useRoute(); const route = useRoute()
const { loadProject, loadTables } = useProject(); const { loadProject, loadTables } = useProject()
const { clearTabs } = useTabs(); const { clearTabs } = useTabs()
onMounted(async () => { onMounted(async () => {
await loadProject(route.params.projectId as string); await loadProject(route.params.projectId as string)
await loadTables(); await loadTables()
}); })
watch( watch(
() => route.params.projectId, () => route.params.projectId,
async (newVal, oldVal) => { async (newVal, oldVal) => {
if (newVal !== oldVal) { if (newVal !== oldVal) {
clearTabs(); clearTabs()
if (newVal) { if (newVal) {
await loadProject(newVal as string); await loadProject(newVal as string)
await loadTables(); await loadTables()
} }
} }
} },
); )
</script> </script>
<template> <template>

Loading…
Cancel
Save