2FAuth/resources/js/app.js

45 lines
1.7 KiB
JavaScript
Raw Normal View History

2019-05-28 17:29:15 +02:00
import Vue from 'vue'
import VueRouter from 'vue-router'
2020-01-15 23:00:06 +01:00
import axios from './packages/axios'
import i18n from './packages/i18n'
import FontAwesome from './packages/fontawesome'
2019-05-20 07:37:41 +02:00
2020-01-14 17:06:59 +01:00
import App from './views/App'
import Accounts from './views/Accounts'
2020-01-15 23:00:06 +01:00
import Create from './views/twofaccounts/Create'
import Edit from './views/twofaccounts/Edit'
import Login from './views/auth/Login'
import Register from './views/auth/Register'
2020-01-14 17:06:59 +01:00
import PasswordRequest from './views/auth/password/Request'
2020-01-14 23:50:07 +01:00
import PasswordReset from './views/auth/password/Reset'
2020-01-14 17:06:59 +01:00
import NotFound from './views/Error'
import './components'
2020-01-15 23:00:06 +01:00
Vue.use(VueRouter)
2019-05-28 17:29:15 +02:00
const router = new VueRouter({
mode: 'history',
routes: [
2020-01-14 17:06:59 +01:00
{ path: '/', name: 'accounts', component: Accounts, props: true },
{ path: '/login', name: 'login',component: Login },
{ path: '/register', name: 'register',component: Register },
{ path: '/create', name: 'create',component: Create },
{ path: '/edit/:twofaccountId', name: 'edit',component: Edit },
{ path: '/password/request', name: 'password.request', component: PasswordRequest },
2020-01-14 23:50:07 +01:00
{ path: '/password/reset/:token', name: 'password.reset', component: PasswordReset },
2020-01-14 17:06:59 +01:00
{ path: '/flooded', name: 'flooded',component: NotFound,props: true },
{ path: '/error', name: 'genericError',component: NotFound,props: true },
{ path: '/404', name: '404',component: NotFound,props: true },
{ path: '*', redirect: { name: '404' } }
2019-05-28 17:29:15 +02:00
],
});
2019-05-20 07:37:41 +02:00
const app = new Vue({
el: '#app',
2019-05-28 17:29:15 +02:00
components: { App },
i18n,
2019-05-28 17:29:15 +02:00
router,
});