Browse Source

chore(gui): lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3830/head
Pranav C 2 years ago
parent
commit
73208defe5
  1. 4
      packages/nc-gui/components/smartsheet/Form.vue
  2. 2
      packages/nc-gui/components/smartsheet/sidebar/MenuTop.vue
  3. 1
      packages/nc-gui/composables/useViews.ts
  4. 6
      packages/nc-gui/pages/[projectType]/[projectId]/index.vue
  5. 23
      packages/nc-gui/pages/[projectType]/[projectId]/index/index/[type]/[title]/[[viewTitle]].vue

4
packages/nc-gui/components/smartsheet/Form.vue

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import Draggable from 'vuedraggable' import Draggable from 'vuedraggable'
import { RelationTypes, UITypes, getSystemColumns, isVirtualCol, ViewTypes } from 'nocodb-sdk' import { RelationTypes, UITypes, ViewTypes, getSystemColumns, isVirtualCol } from 'nocodb-sdk'
import { import {
ActiveViewInj, ActiveViewInj,
IsFormInj, IsFormInj,
@ -377,7 +377,7 @@ onMounted(async () => {
}) })
watch(view, (nextView) => { watch(view, (nextView) => {
if(nextView?.type === ViewTypes.FORM) { if (nextView?.type === ViewTypes.FORM) {
reloadEventHook.trigger() reloadEventHook.trigger()
} }
}) })

2
packages/nc-gui/components/smartsheet/sidebar/MenuTop.vue

@ -216,7 +216,7 @@ function openDeleteDialog(view: Record<string, any>) {
} }
watch(views, (nextViews) => { watch(views, (nextViews) => {
if(nextViews?.length && (!activeView.value || !nextViews.includes(activeView.value))){ if (nextViews?.length && (!activeView.value || !nextViews.includes(activeView.value))) {
activeView.value = nextViews[0] activeView.value = nextViews[0]
} }
}) })

1
packages/nc-gui/composables/useViews.ts

@ -7,7 +7,6 @@ export function useViews(meta: MaybeRef<TableType | undefined>) {
const { $api } = useNuxtApp() const { $api } = useNuxtApp()
const loadViews = async () => { const loadViews = async () => {
const _meta = unref(meta) const _meta = unref(meta)

6
packages/nc-gui/pages/[projectType]/[projectId]/index.vue

@ -295,8 +295,7 @@ onBeforeUnmount(reset)
<!-- Copy Auth Token --> <!-- Copy Auth Token -->
<a-menu-item key="copy"> <a-menu-item key="copy">
<div v-e="['a:navbar:user:copy-auth-token']" class="nc-project-menu-item group" <div v-e="['a:navbar:user:copy-auth-token']" class="nc-project-menu-item group" @click.stop="copyAuthToken">
@click.stop="copyAuthToken">
<MdiScriptTextKeyOutline class="group-hover:text-accent" /> <MdiScriptTextKeyOutline class="group-hover:text-accent" />
{{ $t('activity.account.authToken') }} {{ $t('activity.account.authToken') }}
</div> </div>
@ -453,8 +452,7 @@ onBeforeUnmount(reset)
<template #expandIcon></template> <template #expandIcon></template>
<a-menu-item key="0" class="!rounded-t"> <a-menu-item key="0" class="!rounded-t">
<nuxt-link v-e="['c:navbar:user:email']" class="nc-project-menu-item group !no-underline" <nuxt-link v-e="['c:navbar:user:email']" class="nc-project-menu-item group !no-underline" to="/user">
to="/user">
<MdiAt class="mt-1 group-hover:text-accent" />&nbsp; <MdiAt class="mt-1 group-hover:text-accent" />&nbsp;
<span class="prose-sm">{{ email }}</span> <span class="prose-sm">{{ email }}</span>

23
packages/nc-gui/pages/[projectType]/[projectId]/index/index/[type]/[title]/[[viewTitle]].vue

@ -22,21 +22,24 @@ const activeTab = inject(
// getMeta(route.params.title as string, true).finally(() => (loading.value = false)) // getMeta(route.params.title as string, true).finally(() => (loading.value = false))
// }) // })
watch(() => route.params.title, (tableTitle) => { watch(
() => route.params.title,
(tableTitle) => {
until(tables) until(tables)
.toMatch((tables) => tables.length > 0) .toMatch((tables) => tables.length > 0)
.then(() => { .then(() => {
getMeta(tableTitle as string, true).finally(() => (loading.value = false)) getMeta(tableTitle as string, true).finally(() => (loading.value = false))
}) })
}, {immediate: true}) },
{ immediate: true },
)
</script> </script>
<template> <template>
<div class="w-full h-full"> <div class="w-full h-full">
<!-- <div v-if="loading" class="flex items-center justify-center h-full w-full">--> <!-- <div v-if="loading" class="flex items-center justify-center h-full w-full"> -->
<!-- <a-spin size="large" />--> <!-- <a-spin size="large" /> -->
<!-- </div>--> <!-- </div> -->
<LazyTabsSmartsheet :active-tab="activeTab" /> <LazyTabsSmartsheet :active-tab="activeTab" />
</div> </div>

Loading…
Cancel
Save