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' {
export interface GlobalComponents {
'(feat(gui-v2)': add project delete and edit options)
ADivider: typeof import('ant-design-vue/es')['Divider']
ADropdown: typeof import('ant-design-vue/es')['Dropdown']
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>
</template>
<v-list class="!py-0 flex flex-col bg-white rounded-lg shadow-md border-1 border-gray-300 mt-2 ml-2">
<div
class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2"
@click="navigateTo('/create')"
>
<div 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" />
<div class="col-span-10 text-sm xl:text-md">{{ $t('activity.createProject') }}</div>
</div>

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

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

Loading…
Cancel
Save