From 4cf11fb86107a4e0157a34afbe211fe77c1c51fd Mon Sep 17 00:00:00 2001
From: JesusPerez <jpl@jesusperez.pro>
Date: Mon, 10 Jan 2022 23:53:20 +0000
Subject: [PATCH] chore: add APPHOME as route to HOME

---
 src/components/NavMenu.vue |  2 +-
 src/hooks/config.ts        |  2 ++
 src/hooks/useState.ts      |  2 ++
 src/router.ts              | 22 ++++++++++++++++++++++
 4 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/src/components/NavMenu.vue b/src/components/NavMenu.vue
index e3d90d4..969a852 100644
--- a/src/components/NavMenu.vue
+++ b/src/components/NavMenu.vue
@@ -282,7 +282,7 @@ const onNavMenu = (item: string) => {
 	}
 }
 const onHome = () => {
-  router.push('/home')
+  router.push(useState().APPHOME.value)
 }
 const goTopPage = () => {
 	const dom_body = document.getElementsByTagName('body')[0]
diff --git a/src/hooks/config.ts b/src/hooks/config.ts
index dcaeb71..ab33994 100644
--- a/src/hooks/config.ts
+++ b/src/hooks/config.ts
@@ -24,6 +24,8 @@ export const set_config = (res: any) => {
 		useState().URLKEY.value = res.URLKEY
 	if (res && res.APPNAME) 
 		useState().APPNAME.value = res.APPNAME
+	if (res && res.APPHOME) 
+		useState().APPHOME.value = res.APPHOME
 	if (res && res.AUTHKEY) 
 		useState().AUTHKEY.value = res.AUTHKEY
 	if (res && res.AUTH_SEPCHAR) 
diff --git a/src/hooks/useState.ts b/src/hooks/useState.ts
index 3607cd6..c8a42fd 100644
--- a/src/hooks/useState.ts
+++ b/src/hooks/useState.ts
@@ -102,6 +102,7 @@ const current_model = ref({} as ModelType)
 const current_modelid = ref("")
 
 const APPNAME = ref('')
+const APPHOME = ref('/')
 const AUTHKEY = ref('auth')
 const UUIDNONE = ref('none')
 const TKNLIMIT = ref(20)
@@ -172,6 +173,7 @@ export default function useState() {
 		sourceRoute,
 		// APP CONFIG VARS
 		APPNAME,
+		APPHOME,
 		AUTHKEY,
 		UUIDNONE,
 		TKNLIMIT,
diff --git a/src/router.ts b/src/router.ts
index be53f8e..2f72447 100644
--- a/src/router.ts
+++ b/src/router.ts
@@ -30,6 +30,28 @@ const routes: RouteRecordRaw[] = [
 		},
 		beforeEnter: [check_config, load_data_info	]
 	},
+	{
+		path: '/cv',
+		name: 'cv',
+		component: Home,
+		meta: {
+			requireAuth: false,
+			layout: 'AppLayout',
+			withauth: false,
+		},
+		beforeEnter: [check_config, load_data_info	]
+	},
+	{
+		path: '/cv/:ky',
+		name: 'cvKey',
+		component: Home,
+		meta: {
+			requireAuth: false,
+			layout: 'AppLayout',
+			withauth: false,
+		},
+		beforeEnter: [check_config, load_data_info	]
+	},
 	{
 		path: '/:ky',
 		name: 'HomeKey',