summaryrefslogtreecommitdiff
path: root/src/client/app/init.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2019-02-15 05:08:59 +0900
committerGitHub <noreply@github.com>2019-02-15 05:08:59 +0900
commit53422ffcb296be404c0f3ef7e175bedecca4fb4d (patch)
tree39cb47b43edd8b8265bb9ad48becdea2666f8881 /src/client/app/init.ts
parentUpdate README.md [AUTOGEN] (#4253) (diff)
downloadsharkey-53422ffcb296be404c0f3ef7e175bedecca4fb4d.tar.gz
sharkey-53422ffcb296be404c0f3ef7e175bedecca4fb4d.tar.bz2
sharkey-53422ffcb296be404c0f3ef7e175bedecca4fb4d.zip
Improve desktop UX (#4262)
* wip * wip * wip * wip * wip * wip * Merge * wip * wip * wip * wip * wip * wip
Diffstat (limited to 'src/client/app/init.ts')
-rw-r--r--src/client/app/init.ts9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/app/init.ts b/src/client/app/init.ts
index 2f18030f0d..710bef8b65 100644
--- a/src/client/app/init.ts
+++ b/src/client/app/init.ts
@@ -350,7 +350,7 @@ if (localStorage.getItem('should-refresh') == 'true') {
}
// MiOSを初期化してコールバックする
-export default (callback: (launch: (router: VueRouter) => [Vue, MiOS]) => void, sw = false) => {
+export default (callback: (launch: (router: VueRouter) => [Vue, MiOS], os: MiOS) => void, sw = false) => {
const os = new MiOS(sw);
os.init(() => {
@@ -436,11 +436,6 @@ export default (callback: (launch: (router: VueRouter) => [Vue, MiOS]) => void,
});
//#endregion
- // Navigation hook
- router.beforeEach((to, from, next) => {
- next(os.store.state.navHook && os.store.state.navHook(to) ? false : undefined);
- });
-
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
os.store.commit('clearBehindNotes');
@@ -507,6 +502,6 @@ export default (callback: (launch: (router: VueRouter) => [Vue, MiOS]) => void,
return [app, os] as [Vue, MiOS];
};
- callback(launch);
+ callback(launch, os);
});
};