From a1692ebc7cfa7b3c6943d552ae059261fa5d18d3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 17 May 2018 16:24:01 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A2=E3=83=90=E3=82=A4=E3=83=AB=E7=89=88?= =?UTF-8?q?=E3=81=AE=E3=82=A6=E3=82=A3=E3=82=B8=E3=82=A7=E3=83=83=E3=83=88?= =?UTF-8?q?=E5=BE=A9=E6=B4=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/common/scripts/streaming/home.ts | 11 ++++ src/client/app/mobile/script.ts | 2 + .../app/mobile/views/components/ui.nav.vue | 1 + .../pages/{dashboard.vue => widgets.vue} | 57 +++++++------------ src/client/app/store.ts | 36 ++++++++++++ 5 files changed, 71 insertions(+), 36 deletions(-) rename src/client/app/mobile/views/pages/{dashboard.vue => widgets.vue} (77%) diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts index 32685f3c2..09d830bec 100644 --- a/src/client/app/common/scripts/streaming/home.ts +++ b/src/client/app/common/scripts/streaming/home.ts @@ -48,6 +48,17 @@ export class HomeStream extends Stream { } }); + this.on('mobile_home_updated', x => { + if (x.home) { + os.store.commit('settings/setMobileHome', x.home); + } else { + os.store.commit('settings/setMobileHomeWidget', { + id: x.id, + data: x.data + }); + } + }); + // トークンが再生成されたとき // このままではMisskeyが利用できないので強制的にサインアウトさせる this.on('my_token_regenerated', () => { diff --git a/src/client/app/mobile/script.ts b/src/client/app/mobile/script.ts index 2e9805e0d..1405139be 100644 --- a/src/client/app/mobile/script.ts +++ b/src/client/app/mobile/script.ts @@ -23,6 +23,7 @@ import MkUser from './views/pages/user.vue'; import MkSelectDrive from './views/pages/selectdrive.vue'; import MkDrive from './views/pages/drive.vue'; import MkNotifications from './views/pages/notifications.vue'; +import MkWidgets from './views/pages/widgets.vue'; import MkMessaging from './views/pages/messaging.vue'; import MkMessagingRoom from './views/pages/messaging-room.vue'; import MkNote from './views/pages/note.vue'; @@ -56,6 +57,7 @@ init((launch) => { { path: '/i/settings', component: MkSettings }, { path: '/i/settings/profile', component: MkProfileSetting }, { path: '/i/notifications', name: 'notifications', component: MkNotifications }, + { path: '/i/widgets', name: 'widgets', component: MkWidgets }, { path: '/i/messaging', name: 'messaging', component: MkMessaging }, { path: '/i/messaging/:user', component: MkMessagingRoom }, { path: '/i/drive', name: 'drive', component: MkDrive }, diff --git a/src/client/app/mobile/views/components/ui.nav.vue b/src/client/app/mobile/views/components/ui.nav.vue index 5c65d5223..ec42dbc99 100644 --- a/src/client/app/mobile/views/components/ui.nav.vue +++ b/src/client/app/mobile/views/components/ui.nav.vue @@ -21,6 +21,7 @@
  • %fa:gamepad%ゲーム%fa:angle-right%