From 37f862947bb04fd962d2a1b43e486750360c37e3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 4 Jul 2020 22:53:56 +0900 Subject: [PATCH] :v: --- src/client/app.vue | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/client/app.vue b/src/client/app.vue index 88c924aad..7a4412964 100644 --- a/src/client/app.vue +++ b/src/client/app.vue @@ -177,12 +177,26 @@ export default Vue.extend({ }, widgets(): any[] { - const widgets = this.$store.state.deviceUser.widgets; - return { - left: widgets.filter(x => x.place === 'left'), - right: widgets.filter(x => x.place == null || x.place === 'right'), - mobile: widgets.filter(x => x.place === 'mobile'), - }; + if (this.$store.getters.isSignedIn) { + const widgets = this.$store.state.deviceUser.widgets; + return { + left: widgets.filter(x => x.place === 'left'), + right: widgets.filter(x => x.place == null || x.place === 'right'), + mobile: widgets.filter(x => x.place === 'mobile'), + }; + } else { + return { + left: [], + right: [{ + name: 'calendar', + id: 'a', place: 'right', data: {} + }, { + name: 'trends', + id: 'c', place: 'right', data: {} + }], + mobile: [], + }; + } }, menu(): string[] {