Browse Source

chore(gui-v2): lint files

pull/2716/head
Braks 3 years ago committed by Pranav C
parent
commit
4181fff1e0
  1. 13
      packages/nc-gui-v2/components/dashboard/TabView.vue
  2. 3
      packages/nc-gui-v2/components/dashboard/TreeView.vue
  3. 2
      packages/nc-gui-v2/composables/metas.ts
  4. 17
      packages/nc-gui-v2/pages/projects/index.vue

13
packages/nc-gui-v2/components/dashboard/TabView.vue

@ -6,24 +6,21 @@ const { tabs, activeTab } = useTabs()
<template>
<div>
<v-tabs density="compact" v-model="activeTab">
<v-tab v-for="(tab,i) in tabs" :key="i" :value="i" >{{tab.title}} </v-tab>
<v-tabs v-model="activeTab" density="compact">
<v-tab v-for="(tab, i) in tabs" :key="i" :value="i">
{{ tab.title }}
</v-tab>
</v-tabs>
<v-window v-model="activeTab">
<v-window-item
v-for="(tab,i) in tabs"
v-for="(tab, i) in tabs"
:key="i"
:value="i"
>
<TabsSmartsheet :tab-meta="tab" />
</v-window-item>
</v-window>
</div>
</template>

3
packages/nc-gui-v2/components/dashboard/TreeView.vue

@ -10,7 +10,8 @@ const { addTab } = useTabs()
<div>
<v-list density="medium">
<v-list-item
v-for="table in tables" class="p-2 text-sm pointer"
v-for="table in tables" :key="table.id"
class="p-2 text-sm pointer"
@click="addTab({ type: 'table', title: table.title, id: table.id })"
>
{{ table.title }}

2
packages/nc-gui-v2/composables/metas.ts

@ -1,4 +1,4 @@
import type { Api, TableType } from 'nocodb-sdk'
import type { TableType } from 'nocodb-sdk'
import { useNuxtApp, useState } from '#app'
import { useUser } from '~/composables/user'
import { useProject } from '~/composables/project'

17
packages/nc-gui-v2/pages/projects/index.vue

@ -4,7 +4,7 @@ import { useRouter } from '#app'
const { $api } = useNuxtApp()
const { user } = useUser()
const $router = useRouter()
const router = useRouter()
const projects = ref()
@ -18,14 +18,7 @@ const loadProjects = async () => {
}
const navigateToDashboard = async (project) => {
await $router.push(`/dashboard/${project.id}`)
}
const navigateToCreateProject = () => {
$router.push('/projects/create')
}
const navigateToCreateExtProject = () => {
$router.push('/projects/create-external')
await router.push(`/dashboard/${project.id}`)
}
onMounted(async () => {
@ -35,15 +28,15 @@ onMounted(async () => {
<template>
<NuxtLayout>
<v-navigation-drawer color="" permanent />
<v-navigation-drawer :permanent="true" />
<v-main>
<v-container>
<div class="pa-2 d-flex mb-10">
<v-spacer />
<v-btn size="small" class="caption text-capitalize mr-2" color="primary" @click="navigateToCreateProject">
<v-btn size="small" class="caption text-capitalize mr-2" color="primary" @click="router.push('/projects/create')">
Create Project
</v-btn>
<v-btn size="small" class="caption text-capitalize mr-2" color="primary" @click="navigateToCreateExtProject">
<v-btn size="small" class="caption text-capitalize mr-2" color="primary" @click="router.push('/projects/create')">
Create External Project
</v-btn>
</div><v-row>

Loading…
Cancel
Save