misskey/src/client/app/admin/script.ts
Aya Morisawa 1f890c5bed Assign URL to each page of admin (#5366)
* Assign URL to each page of admin

* Remove cursor pointer
2019-08-30 04:19:49 +09:00

31 lines
530 B
TypeScript

/**
* Admin
*/
import VueRouter from 'vue-router';
// Style
import './style.styl';
import init from '../init';
import Index from './views/index.vue';
import NotFound from '../common/views/pages/not-found.vue';
init(launch => {
document.title = 'Admin';
// Init router
const router = new VueRouter({
mode: 'history',
base: '/admin/',
routes: [
{ path: '/:page', component: Index },
{ path: '/', redirect: '/dashboard' },
{ path: '*', component: NotFound }
]
});
// Launch the app
launch(router);
});