summaryrefslogtreecommitdiff
path: root/src/web/app/init.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-02-10 14:56:33 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-02-10 14:56:33 +0900
commit08ee9e4eaffa4b6809440ec2cbe4daad084c00df (patch)
treee07b083068569ff26c8df29cbb949d29f5cbd648 /src/web/app/init.ts
parentwip (diff)
downloadsharkey-08ee9e4eaffa4b6809440ec2cbe4daad084c00df.tar.gz
sharkey-08ee9e4eaffa4b6809440ec2cbe4daad084c00df.tar.bz2
sharkey-08ee9e4eaffa4b6809440ec2cbe4daad084c00df.zip
wip
Diffstat (limited to 'src/web/app/init.ts')
-rw-r--r--src/web/app/init.ts18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/web/app/init.ts b/src/web/app/init.ts
index 91797a95ac..796a966940 100644
--- a/src/web/app/init.ts
+++ b/src/web/app/init.ts
@@ -61,22 +61,24 @@ if (localStorage.getItem('should-refresh') == 'true') {
}
// MiOSを初期化してコールバックする
-export default (callback, sw = false) => {
+export default (callback: (os: MiOS, launch: () => Vue) => void, sw = false) => {
const mios = new MiOS(sw);
mios.init(() => {
// アプリ基底要素マウント
document.body.innerHTML = '<div id="app"></div>';
- const app = new Vue({
- router: new VueRouter({
- mode: 'history'
- }),
- render: createEl => createEl(App)
- }).$mount('#app');
+ const launch = () => {
+ return new Vue({
+ router: new VueRouter({
+ mode: 'history'
+ }),
+ render: createEl => createEl(App)
+ }).$mount('#app');
+ };
try {
- callback(mios, app);
+ callback(mios, launch);
} catch (e) {
panic(e);
}