Browse Source

refactor: change `dahshboard` to `nc`

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2716/head
Pranav C 2 years ago
parent
commit
23f7f018f4
  1. 11
      packages/nc-gui-v2/layouts/default.vue
  2. 0
      packages/nc-gui-v2/pages/nc/[projectId].vue
  3. 2
      packages/nc-gui-v2/pages/projects/create-external.vue
  4. 2
      packages/nc-gui-v2/pages/projects/create.vue
  5. 2
      packages/nc-gui-v2/pages/projects/index.vue

11
packages/nc-gui-v2/layouts/default.vue

@ -1,7 +1,12 @@
<script> <script lang="ts" setup>
export default { import { navigateTo } from '#app'
name: 'Default', const route = useRoute()
const openDiscord = () => {
// shell.openExternal('https://discord.gg/5RgZmkW')
} }
const isDashboard = computed(() => {
return route.path && (route.path === '/nc' || route.path === '/nc/' || route.path.startsWith('/nc/'))
})
</script> </script>
<template> <template>

0
packages/nc-gui-v2/pages/dashboard/[projectId].vue → packages/nc-gui-v2/pages/nc/[projectId].vue

2
packages/nc-gui-v2/pages/projects/create-external.vue

@ -39,7 +39,7 @@ const createProject = async () => {
external: true external: true
}); });
await $router.push(`/dashboard/${result.id}`); await $router.push(`/nc/${result.id}`);
} catch (e: any) { } catch (e: any) {
// todo: toast // todo: toast
toast.error(await extractSdkResponseErrorMsg(e)); toast.error(await extractSdkResponseErrorMsg(e));

2
packages/nc-gui-v2/pages/projects/create.vue

@ -19,7 +19,7 @@ const createProject = async () => {
title: name.value, title: name.value,
}) })
await $router.push(`/dashboard/${result.id}`) await $router.push(`/nc/${result.id}`)
} catch (e:any) { } catch (e:any) {
// todo: toast // todo: toast
$toast.error(await extractSdkResponseErrorMsg(e)).goAway(3000) $toast.error(await extractSdkResponseErrorMsg(e)).goAway(3000)

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

@ -25,7 +25,7 @@ const projects = ref(response.list)
</div> </div>
<v-row> <v-row>
<v-col v-for="project of projects" :key="project.id" cols="4"> <v-col v-for="project of projects" :key="project.id" cols="4">
<v-card @click="navigateTo(`/dashboard/${project.id}`)"> <v-card @click="navigateTo(`/nc/${project.id}`)">
<v-card-title> <v-card-title>
<div class="text-center"> <div class="text-center">
<h3>{{ project.title }}</h3> <h3>{{ project.title }}</h3>

Loading…
Cancel
Save