Browse Source

refactor(gui-v2): rename projects dir to `index`

pull/2722/head
braks 2 years ago
parent
commit
f3f46b2502
  1. 4
      packages/nc-gui-v2/app.vue
  2. 13
      packages/nc-gui-v2/pages/index.vue
  3. 0
      packages/nc-gui-v2/pages/index/create-external.vue
  4. 0
      packages/nc-gui-v2/pages/index/create.vue
  5. 12
      packages/nc-gui-v2/pages/index/index.vue
  6. 4
      packages/nc-gui-v2/pages/index/index/index.vue
  7. 0
      packages/nc-gui-v2/pages/index/index/list.vue
  8. 2
      packages/nc-gui-v2/pages/signin.vue
  9. 2
      packages/nc-gui-v2/pages/signup.vue

4
packages/nc-gui-v2/app.vue

@ -26,7 +26,7 @@ const signOut = () => {
<div class="flex items-center gap-2">
<img width="35" src="~/assets/img/icons/512x512-trans.png" />
<span class="prose-xl" @click="navigateTo('/projects')">NocoDB</span>
<span class="prose-xl" @click="navigateTo('/')">NocoDB</span>
</div>
</v-toolbar-title>
@ -67,7 +67,7 @@ const signOut = () => {
<nuxt-link
v-t="['c:navbar:user:email']"
class="group hover:(bg-gray-200) dark:(hover:bg-gray-600) flex items-center p-2 no-underline"
to="/user/settings"
to="/user"
>
<MdiAt class="mt-1 group-hover:text-success" />&nbsp;
<span class="prose">{{ email }}</span>

13
packages/nc-gui-v2/pages/index.vue

@ -1,13 +0,0 @@
<script setup lang="ts">
import { useRouter } from '#app'
const router = useRouter()
router.replace('/projects')
</script>
<template>
<div class="container" />
</template>
<style lang="scss"></style>

0
packages/nc-gui-v2/pages/projects/create-external.vue → packages/nc-gui-v2/pages/index/create-external.vue

0
packages/nc-gui-v2/pages/projects/create.vue → packages/nc-gui-v2/pages/index/create.vue

12
packages/nc-gui-v2/pages/projects/index.vue → packages/nc-gui-v2/pages/index/index.vue

@ -57,14 +57,14 @@ const activePage = $ref(navDrawerOptions[0].title)
<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('/projects/create')"
@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>
<div
class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2"
@click="navigateTo('/projects/create-external')"
@click="navigateTo('/create-external')"
>
<MdiDatabaseOutline class="col-span-2 mr-1 mt-[1px] text-green-500 text-lg" />
<div class="col-span-10 text-sm xl:text-md" v-html="$t('activity.createProjectExtended.extDB')" />
@ -113,14 +113,14 @@ const activePage = $ref(navDrawerOptions[0].title)
<div class="self-end flex text-4xl mb-1">
<MaterialSymbolsGridView
:class="route.name === 'projects-index' ? 'text-primary dark:(!text-secondary/75)' : ''"
:class="route.name === 'index-index' ? 'text-primary dark:(!text-secondary/75)' : ''"
class="cursor-pointer p-2 hover:bg-gray-300/50 rounded-full"
@click="navigateTo('/projects')"
@click="navigateTo('/')"
/>
<MaterialSymbolsFormatListBulletedRounded
:class="route.name === 'projects-index-list' ? 'text-primary dark:(!text-secondary/75)' : ''"
:class="route.name === 'index-index-list' ? 'text-primary dark:(!text-secondary/75)' : ''"
class="cursor-pointer p-2 hover:bg-gray-300/50 rounded-full"
@click="navigateTo('/projects/list')"
@click="navigateTo('/list')"
/>
</div>
</div>

4
packages/nc-gui-v2/pages/projects/index/index.vue → packages/nc-gui-v2/pages/index/index/index.vue

@ -50,14 +50,14 @@ const formatTitle = (title: string) =>
<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('/projects/create')"
@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>
<div
class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2"
@click="navigateTo('/projects/create-external')"
@click="navigateTo('/create-external')"
>
<MdiDatabaseOutline class="col-span-2 mr-1 mt-[1px] text-green-500 text-lg" />
<div class="col-span-10 text-sm xl:text-md" v-html="$t('activity.createProjectExtended.extDB')" />

0
packages/nc-gui-v2/pages/projects/index/list.vue → packages/nc-gui-v2/pages/index/index/list.vue

2
packages/nc-gui-v2/pages/signin.vue

@ -55,7 +55,7 @@ const signIn = async () => {
try {
const { token } = await $api.auth.signin(form)
$state.signIn(token!)
await navigateTo('/projects')
await navigateTo('/')
} catch (e: any) {
// todo: errors should not expose what was wrong (i.e. do not show "Password is wrong" messages)
error = await extractSdkResponseErrorMsg(e)

2
packages/nc-gui-v2/pages/signup.vue

@ -46,7 +46,7 @@ const signUp = async () => {
try {
const { token } = await $api.auth.signup(form)
$state.signIn(token!)
await navigateTo('/projects')
await navigateTo('/')
} catch (e: any) {
error = await extractSdkResponseErrorMsg(e)
}

Loading…
Cancel
Save