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

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

@ -216,7 +216,7 @@ function openDeleteDialog(view: Record<string, any>) {
}
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]
}
})

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

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

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

@ -295,8 +295,7 @@ onBeforeUnmount(reset)
<!-- Copy Auth Token -->
<a-menu-item key="copy">
<div v-e="['a:navbar:user:copy-auth-token']" class="nc-project-menu-item group"
@click.stop="copyAuthToken">
<div v-e="['a:navbar:user:copy-auth-token']" class="nc-project-menu-item group" @click.stop="copyAuthToken">
<MdiScriptTextKeyOutline class="group-hover:text-accent" />
{{ $t('activity.account.authToken') }}
</div>
@ -453,8 +452,7 @@ onBeforeUnmount(reset)
<template #expandIcon></template>
<a-menu-item key="0" class="!rounded-t">
<nuxt-link v-e="['c:navbar:user:email']" class="nc-project-menu-item group !no-underline"
to="/user">
<nuxt-link v-e="['c:navbar:user:email']" class="nc-project-menu-item group !no-underline" to="/user">
<MdiAt class="mt-1 group-hover:text-accent" />&nbsp;
<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))
// })
watch(() => route.params.title, (tableTitle) => {
watch(
() => route.params.title,
(tableTitle) => {
until(tables)
.toMatch((tables) => tables.length > 0)
.then(() => {
getMeta(tableTitle as string, true).finally(() => (loading.value = false))
})
}, {immediate: true})
.toMatch((tables) => tables.length > 0)
.then(() => {
getMeta(tableTitle as string, true).finally(() => (loading.value = false))
})
},
{ immediate: true },
)
</script>
<template>
<div class="w-full h-full">
<!-- <div v-if="loading" class="flex items-center justify-center h-full w-full">-->
<!-- <a-spin size="large" />-->
<!-- </div>-->
<!-- <div v-if="loading" class="flex items-center justify-center h-full w-full"> -->
<!-- <a-spin size="large" /> -->
<!-- </div> -->
<LazyTabsSmartsheet :active-tab="activeTab" />
</div>

Loading…
Cancel
Save