From 6da9e01a758867a9e380fa7688d170ff09d30fff Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 9 Feb 2018 18:57:42 +0900 Subject: [PATCH] wip --- src/web/app/desktop/script.ts | 6 ++---- src/web/app/init.ts | 18 ++++++------------ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/web/app/desktop/script.ts b/src/web/app/desktop/script.ts index b06cb180e..2d3714d84 100644 --- a/src/web/app/desktop/script.ts +++ b/src/web/app/desktop/script.ts @@ -5,9 +5,7 @@ // Style import './style.styl'; -require('./tags'); -require('./mixins'); -import * as riot from 'riot'; +import Vue from 'vue'; import init from '../init'; import route from './router'; import fuckAdBlock from './scripts/fuck-ad-block'; @@ -18,7 +16,7 @@ import composeNotification from '../common/scripts/compose-notification'; /** * init */ -init(async (mios: MiOS) => { +init(async (mios: MiOS, app: Vue) => { /** * Fuck AD Block */ diff --git a/src/web/app/init.ts b/src/web/app/init.ts index 4b2a3b868..5fb6ae790 100644 --- a/src/web/app/init.ts +++ b/src/web/app/init.ts @@ -13,7 +13,6 @@ import VueRouter from 'vue-router'; Vue.use(VueRouter); import checkForUpdate from './common/scripts/check-for-update'; -import mixin from './common/mixins'; import MiOS from './common/mios'; /** @@ -64,20 +63,15 @@ export default (callback, sw = false) => { const mios = new MiOS(sw); mios.init(() => { - // ミックスイン初期化 - mixin(mios); - - // ローディング画面クリア - const ini = document.getElementById('ini'); - ini.parentNode.removeChild(ini); - // アプリ基底要素マウント - const app = document.createElement('div'); - app.setAttribute('id', 'app'); - document.body.appendChild(app); + document.body.innerHTML = '
'; + + const app = new Vue({ + router: new VueRouter() + }).$mount('#app'); try { - callback(mios); + callback(mios, app); } catch (e) { panic(e); }