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> <template>
<div> <div>
<v-tabs v-model="activeTab" density="compact">
<v-tab v-for="(tab, i) in tabs" :key="i" :value="i">
<v-tabs density="compact" v-model="activeTab"> {{ tab.title }}
</v-tab>
<v-tab v-for="(tab,i) in tabs" :key="i" :value="i" >{{tab.title}} </v-tab>
</v-tabs> </v-tabs>
<v-window v-model="activeTab"> <v-window v-model="activeTab">
<v-window-item <v-window-item
v-for="(tab,i) in tabs" v-for="(tab, i) in tabs"
:key="i" :key="i"
:value="i" :value="i"
> >
<TabsSmartsheet :tab-meta="tab" /> <TabsSmartsheet :tab-meta="tab" />
</v-window-item> </v-window-item>
</v-window> </v-window>
</div> </div>
</template> </template>

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

@ -10,7 +10,8 @@ const { addTab } = useTabs()
<div> <div>
<v-list density="medium"> <v-list density="medium">
<v-list-item <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 })" @click="addTab({ type: 'table', title: table.title, id: table.id })"
> >
{{ table.title }} {{ 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 { useNuxtApp, useState } from '#app'
import { useUser } from '~/composables/user' import { useUser } from '~/composables/user'
import { useProject } from '~/composables/project' 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 { $api } = useNuxtApp()
const { user } = useUser() const { user } = useUser()
const $router = useRouter() const router = useRouter()
const projects = ref() const projects = ref()
@ -18,14 +18,7 @@ const loadProjects = async () => {
} }
const navigateToDashboard = async (project) => { const navigateToDashboard = async (project) => {
await $router.push(`/dashboard/${project.id}`) await router.push(`/dashboard/${project.id}`)
}
const navigateToCreateProject = () => {
$router.push('/projects/create')
}
const navigateToCreateExtProject = () => {
$router.push('/projects/create-external')
} }
onMounted(async () => { onMounted(async () => {
@ -35,15 +28,15 @@ onMounted(async () => {
<template> <template>
<NuxtLayout> <NuxtLayout>
<v-navigation-drawer color="" permanent /> <v-navigation-drawer :permanent="true" />
<v-main> <v-main>
<v-container> <v-container>
<div class="pa-2 d-flex mb-10"> <div class="pa-2 d-flex mb-10">
<v-spacer /> <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 Create Project
</v-btn> </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 Create External Project
</v-btn> </v-btn>
</div><v-row> </div><v-row>

Loading…
Cancel
Save