feat: add login in frontend

* extract icon library from main.js
* extract router from main.js
* failure with error in passport
* add example to swagger
This commit is contained in:
Lin, Hung-Shin committed 2023-09-13 14:02:28 +08:00
1 parent b55b7aa1ec
commit 49417c405a
11 files changed
+206 -61

No files matched your search

+2 -50
View File
@@ -1,59 +1,11 @@
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import './style.css'
/* import the fontawesome core */
import { library } from '@fortawesome/fontawesome-svg-core'
/* import font awesome icon component */
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
/* import specific icons */
import {
faBars,
faArrowLeft,
faList,
faGear,
faTriangleExclamation,
faExpand,
faTerminal,
faArrowRotateLeft,
} from '@fortawesome/free-solid-svg-icons'
import {
faLightbulb,
faCircleQuestion,
faCircleRight,
} from '@fortawesome/free-regular-svg-icons'
import './library'
import App from './App.vue'
import GamePage from './views/GamePage.vue'
import AuthPage from './views/AuthPage.vue'
/* add icons to the library */
library.add(
faBars,
faArrowLeft,
faTriangleExclamation,
faGear,
faExpand,
faList,
faLightbulb,
faCircleQuestion,
faArrowRotateLeft,
faCircleRight,
faTerminal
)
const routes = [
{ path: '/', name: 'Home', component: AuthPage },
{ path: '/game', name: 'Game', component: GamePage },
]
const router = createRouter({
history: createWebHistory(),
routes,
})
import router from './router'
const app = createApp(App)