summaryrefslogtreecommitdiff
path: root/src/web/app/dev/script.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-27 14:13:12 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-27 14:13:12 +0900
commitf298fc6eb39553ed14080694b6f22c83ff49c057 (patch)
tree75e257ec7f52d4ebc60c336da5b7b8574d21f907 /src/web/app/dev/script.ts
parentMerge pull request #1313 from akihikodaki/key (diff)
downloadsharkey-f298fc6eb39553ed14080694b6f22c83ff49c057.tar.gz
sharkey-f298fc6eb39553ed14080694b6f22c83ff49c057.tar.bz2
sharkey-f298fc6eb39553ed14080694b6f22c83ff49c057.zip
Bye bye subdomains
Diffstat (limited to 'src/web/app/dev/script.ts')
-rw-r--r--src/web/app/dev/script.ts23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/web/app/dev/script.ts b/src/web/app/dev/script.ts
index 2f4a16fab1..c043813b40 100644
--- a/src/web/app/dev/script.ts
+++ b/src/web/app/dev/script.ts
@@ -3,6 +3,7 @@
*/
import Vue from 'vue';
+import VueRouter from 'vue-router';
import BootstrapVue from 'bootstrap-vue';
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap-vue/dist/bootstrap-vue.css';
@@ -26,14 +27,18 @@ Vue.component('mk-ui', ui);
* init
*/
init(launch => {
- // Launch the app
- const [app] = launch();
+ // Init router
+ const router = new VueRouter({
+ mode: 'history',
+ base: '/dev/',
+ routes: [
+ { path: '/', component: Index },
+ { path: '/apps', component: Apps },
+ { path: '/app/new', component: AppNew },
+ { path: '/app/:id', component: App },
+ ]
+ });
- // Routing
- app.$router.addRoutes([
- { path: '/', component: Index },
- { path: '/apps', component: Apps },
- { path: '/app/new', component: AppNew },
- { path: '/app/:id', component: App },
- ]);
+ // Launch the app
+ launch(router);
});