diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..3bf4b12
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,14 @@
+# image: alpine:latest
+# pages:
+# stage: deploy
+# script:
+# - mkdir public
+# - ls -al
+# - mv -f ./assets public
+# - mv -f ./index.html public
+# - echo "Release Complete"
+# artifacts:
+# paths:
+# - public
+# only:
+# - gh-pages
diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue
index 194596d..e8211df 100644
--- a/src/components/Sidebar.vue
+++ b/src/components/Sidebar.vue
@@ -98,13 +98,13 @@ const openUserRP = () => {
aria-expanded="false"
>
- {{ store.firebaseUser?.displayName }}
+ {{ store.currentUser.displayName }}
diff --git a/src/router/index.ts b/src/router/index.ts
index 2e5b125..b6ecf56 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -5,165 +5,13 @@ import AppLayout from '@/views/App.vue'
const root = '/jm-expense-vue-ts'
-// export const routes: RouteRecordRaw[] = [
-// {
-// path: '/',
-// redirect: `${root}/`
-// },
-// {
-// path: `${root}/register`,
-// name: 'Register',
-// component: () => import('../views/Register.vue'),
-// meta: {
-// pageTitle: '註冊頁',
-// show: false
-// }
-// },
-// {
-// path: `${root}/login`,
-// name: 'Login',
-// component: () => import('../views/Login.vue'),
-// meta: {
-// pageTitle: '登入頁',
-// show: false
-// }
-// },
-// {
-// path: `${root}/`,
-// name: 'Home',
-// component: () => import('../views/Home.vue'),
-// meta: {
-// pageTitle: '首頁',
-// show: true
-// }
-// },
-// {
-// path: `${root}/record`,
-// name: 'Record',
-// component: () => import('../views/Record.vue'),
-// meta: {
-// pageTitle: '未結算紀錄',
-// show: true
-// }
-// },
-// {
-// path: `${root}/closedRecord`,
-// name: 'ClosedRecord',
-// component: () => import('../views/ClosedRecord.vue'),
-// meta: {
-// pageTitle: '已結算紀錄',
-// show: true
-// }
-// },
-// {
-// path: `${root}/logs`,
-// name: 'Logs',
-// component: () => import('../views/Logs.vue'),
-// meta: {
-// pageTitle: '更動紀錄',
-// show: true
-// }
-// },
-// {
-// path: `${root}/expense`,
-// name: 'Expense',
-// component: () => import('../views/Expense.vue'),
-// meta: {
-// pageTitle: '豬涵記帳',
-// show: true
-// }
-// },
-// // {
-// // path: `${root}/tools`,
-// // name: 'Tools',
-// // component: () => import('../views/Tools.vue'),
-// // meta: {
-// // pageTitle: '小工具',
-// // show: true
-// // }
-// // },
-// {
-// path: `${root}/game`,
-// name: 'Game',
-// component: () => import('../views/Game.vue'),
-// meta: {
-// pageTitle: '小遊戲',
-// show: true
-// // auth: ['root', 'admin', 'member']
-// }
-// },
-// // {
-// // path: `${root}/admin`,
-// // name: 'Admin',
-// // redirect: { name: 'Admin-Role' },
-// // component: AppLayout,
-// // meta: {
-// // pageTitle: '管理面板',
-// // show: true
-// // },
-// // children: [
-// // {
-// // path: 'role',
-// // name: 'Admin-Role',
-// // component: () => import('../views/Role.vue'),
-// // meta: {
-// // pageTitle: '角色管理',
-// // show: true
-// // }
-// // },
-// // {
-// // path: 'permission',
-// // name: 'Admin-Permission',
-// // component: () => import('../views/Permission.vue'),
-// // meta: {
-// // pageTitle: '權限管理',
-// // show: true
-// // }
-// // }
-// // ]
-// // },
-// // {
-// // path: `${root}/admin/role`,
-// // name: 'Admin-Role',
-// // component: () => import('@/views/Role.vue'),
-// // meta: {
-// // pageTitle: '角色管理',
-// // show: true
-// // }
-// // },
-// // {
-// // path: '/admin/role/:id/access',
-// // name: 'Admin-Role-Access',
-// // component: () => import('@/views/Access.vue'),
-// // meta: {
-// // pageTitle: '角色管理 / 設置權限[角色名稱]',
-// // show: false
-// // }
-// // },
-// // {
-// // path: '/admin/permission',
-// // name: 'Admin-Permission',
-// // component: () => import('../views/Permission.vue'),
-// // meta: {
-// // pageTitle: '權限管理',
-// // show: true
-// // }
-// // },
-// {
-// path: '/:pathMatch(.*)*',
-// name: 'NotFound',
-// component: () => import('../views/NotFound.vue')
-// }
-// ]
-
-// new
export const routes: RouteRecordRaw[] = [
- // {
- // path: '/',
- // redirect: `${root}/`
- // },
{
- path: '/register',
+ path: '/',
+ redirect: `${root}/`
+ },
+ {
+ path: `${root}/register`,
name: 'Register',
component: () => import('../views/Register.vue'),
meta: {
@@ -172,7 +20,7 @@ export const routes: RouteRecordRaw[] = [
}
},
{
- path: '/login',
+ path: `${root}/login`,
name: 'Login',
component: () => import('../views/Login.vue'),
meta: {
@@ -181,7 +29,7 @@ export const routes: RouteRecordRaw[] = [
}
},
{
- path: '/',
+ path: `${root}/`,
name: 'Home',
component: () => import('../views/Home.vue'),
meta: {
@@ -190,7 +38,7 @@ export const routes: RouteRecordRaw[] = [
}
},
{
- path: '/record',
+ path: `${root}/record`,
name: 'Record',
component: () => import('../views/Record.vue'),
meta: {
@@ -199,7 +47,7 @@ export const routes: RouteRecordRaw[] = [
}
},
{
- path: '/closedRecord',
+ path: `${root}/closedRecord`,
name: 'ClosedRecord',
component: () => import('../views/ClosedRecord.vue'),
meta: {
@@ -208,7 +56,7 @@ export const routes: RouteRecordRaw[] = [
}
},
{
- path: '/logs',
+ path: `${root}/logs`,
name: 'Logs',
component: () => import('../views/Logs.vue'),
meta: {
@@ -217,7 +65,7 @@ export const routes: RouteRecordRaw[] = [
}
},
{
- path: '/expense',
+ path: `${root}/expense`,
name: 'Expense',
component: () => import('../views/Expense.vue'),
meta: {
@@ -226,7 +74,7 @@ export const routes: RouteRecordRaw[] = [
}
},
// {
- // path: '/tools',
+ // path: `${root}/tools`,
// name: 'Tools',
// component: () => import('../views/Tools.vue'),
// meta: {
@@ -235,7 +83,7 @@ export const routes: RouteRecordRaw[] = [
// }
// },
{
- path: '/game',
+ path: `${root}/game`,
name: 'Game',
component: () => import('../views/Game.vue'),
meta: {
@@ -308,6 +156,158 @@ export const routes: RouteRecordRaw[] = [
}
]
+// new
+// export const routes: RouteRecordRaw[] = [
+// // {
+// // path: '/',
+// // redirect: `${root}/`
+// // },
+// {
+// path: '/register',
+// name: 'Register',
+// component: () => import('../views/Register.vue'),
+// meta: {
+// pageTitle: '註冊頁',
+// show: false
+// }
+// },
+// {
+// path: '/login',
+// name: 'Login',
+// component: () => import('../views/Login.vue'),
+// meta: {
+// pageTitle: '登入頁',
+// show: false
+// }
+// },
+// {
+// path: '/',
+// name: 'Home',
+// component: () => import('../views/Home.vue'),
+// meta: {
+// pageTitle: '首頁',
+// show: true
+// }
+// },
+// {
+// path: '/record',
+// name: 'Record',
+// component: () => import('../views/Record.vue'),
+// meta: {
+// pageTitle: '未結算紀錄',
+// show: true
+// }
+// },
+// {
+// path: '/closedRecord',
+// name: 'ClosedRecord',
+// component: () => import('../views/ClosedRecord.vue'),
+// meta: {
+// pageTitle: '已結算紀錄',
+// show: true
+// }
+// },
+// {
+// path: '/logs',
+// name: 'Logs',
+// component: () => import('../views/Logs.vue'),
+// meta: {
+// pageTitle: '更動紀錄',
+// show: true
+// }
+// },
+// {
+// path: '/expense',
+// name: 'Expense',
+// component: () => import('../views/Expense.vue'),
+// meta: {
+// pageTitle: '豬涵記帳',
+// show: true
+// }
+// },
+// // {
+// // path: '/tools',
+// // name: 'Tools',
+// // component: () => import('../views/Tools.vue'),
+// // meta: {
+// // pageTitle: '小工具',
+// // show: true
+// // }
+// // },
+// {
+// path: '/game',
+// name: 'Game',
+// component: () => import('../views/Game.vue'),
+// meta: {
+// pageTitle: '小遊戲',
+// show: true
+// // auth: ['root', 'admin', 'member']
+// }
+// },
+// // {
+// // path: `${root}/admin`,
+// // name: 'Admin',
+// // redirect: { name: 'Admin-Role' },
+// // component: AppLayout,
+// // meta: {
+// // pageTitle: '管理面板',
+// // show: true
+// // },
+// // children: [
+// // {
+// // path: 'role',
+// // name: 'Admin-Role',
+// // component: () => import('../views/Role.vue'),
+// // meta: {
+// // pageTitle: '角色管理',
+// // show: true
+// // }
+// // },
+// // {
+// // path: 'permission',
+// // name: 'Admin-Permission',
+// // component: () => import('../views/Permission.vue'),
+// // meta: {
+// // pageTitle: '權限管理',
+// // show: true
+// // }
+// // }
+// // ]
+// // },
+// // {
+// // path: `${root}/admin/role`,
+// // name: 'Admin-Role',
+// // component: () => import('@/views/Role.vue'),
+// // meta: {
+// // pageTitle: '角色管理',
+// // show: true
+// // }
+// // },
+// // {
+// // path: '/admin/role/:id/access',
+// // name: 'Admin-Role-Access',
+// // component: () => import('@/views/Access.vue'),
+// // meta: {
+// // pageTitle: '角色管理 / 設置權限[角色名稱]',
+// // show: false
+// // }
+// // },
+// // {
+// // path: '/admin/permission',
+// // name: 'Admin-Permission',
+// // component: () => import('../views/Permission.vue'),
+// // meta: {
+// // pageTitle: '權限管理',
+// // show: true
+// // }
+// // },
+// {
+// path: '/:pathMatch(.*)*',
+// name: 'NotFound',
+// component: () => import('../views/NotFound.vue')
+// }
+// ]
+
const router = createRouter({
history: createWebHistory(),
routes
diff --git a/vite.config.js b/vite.config.js
index 1d6ebce..0a24c37 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -16,6 +16,6 @@ export default defineConfig({
port: 8080
},
// base: import.meta.env.DEV ? '/' : '/jm-expense-vue-ts/'
- // base: '/jm-expense-vue-ts/'
- base: './'
+ base: '/jm-expense-vue-ts/'
+ // base: './'
})