misskey/src/client/app/auth/script.ts

31 lines
485 B
TypeScript
Raw Normal View History

2018-02-27 16:11:28 +01:00
/**
* Authorize Form
*/
2018-04-15 23:31:56 +02:00
import VueRouter from 'vue-router';
2018-02-27 16:11:28 +01:00
// Style
import './style.styl';
import init from '../init';
import Index from './views/index.vue';
2018-12-27 12:22:54 +01:00
import NotFound from '../common/views/pages/not-found.vue';
2018-02-27 16:11:28 +01:00
/**
* init
*/
2018-04-15 23:31:56 +02:00
init(launch => {
// Init router
const router = new VueRouter({
mode: 'history',
2018-05-29 16:56:44 +02:00
base: '/auth/',
2018-04-15 23:31:56 +02:00
routes: [
{ path: '/:token', component: Index },
{ path: '*', component: NotFound }
2018-04-15 23:31:56 +02:00
]
});
2018-02-27 16:11:28 +01:00
2018-04-15 23:31:56 +02:00
// Launch the app
launch(router);
2018-02-27 16:11:28 +01:00
});