diff --git a/src/client/app/common/define-widget.ts b/src/client/app/common/define-widget.ts index 9f8dcfc7e..7b98c0903 100644 --- a/src/client/app/common/define-widget.ts +++ b/src/client/app/common/define-widget.ts @@ -56,14 +56,14 @@ export default function(data: { id: this.id, data: newProps }).then(() => { - (this as any).os.i.account.clientSettings.mobileHome.find(w => w.id == this.id).data = newProps; + (this as any).os.i.clientSettings.mobileHome.find(w => w.id == this.id).data = newProps; }); } else { (this as any).api('i/update_home', { id: this.id, data: newProps }).then(() => { - (this as any).os.i.account.clientSettings.home.find(w => w.id == this.id).data = newProps; + (this as any).os.i.clientSettings.home.find(w => w.id == this.id).data = newProps; }); } }, { diff --git a/src/client/app/common/mios.ts b/src/client/app/common/mios.ts index 48e830810..fd267bc3f 100644 --- a/src/client/app/common/mios.ts +++ b/src/client/app/common/mios.ts @@ -270,7 +270,7 @@ export default class MiOS extends EventEmitter { // Parse response res.json().then(i => { me = i; - me.account.token = token; + me.token = token; done(); }); }) @@ -294,12 +294,12 @@ export default class MiOS extends EventEmitter { const fetched = me => { if (me) { // デフォルトの設定をマージ - me.account.clientSettings = Object.assign({ + me.clientSettings = Object.assign({ fetchOnScroll: true, showMaps: true, showPostFormOnTopOfTl: false, gradientWindowHeader: false - }, me.account.clientSettings); + }, me.clientSettings); // ローカルストレージにキャッシュ localStorage.setItem('me', JSON.stringify(me)); @@ -329,7 +329,7 @@ export default class MiOS extends EventEmitter { fetched(cachedMe); // 後から新鮮なデータをフェッチ - fetchme(cachedMe.account.token, freshData => { + fetchme(cachedMe.token, freshData => { merge(cachedMe, freshData); }); } else { @@ -437,7 +437,7 @@ export default class MiOS extends EventEmitter { } // Append a credential - if (this.isSignedIn) (data as any).i = this.i.account.token; + if (this.isSignedIn) (data as any).i = this.i.token; // TODO //const viaStream = localStorage.getItem('enableExperimental') == 'true'; diff --git a/src/client/app/common/scripts/streaming/drive.ts b/src/client/app/common/scripts/streaming/drive.ts index f11573685..7ff85b594 100644 --- a/src/client/app/common/scripts/streaming/drive.ts +++ b/src/client/app/common/scripts/streaming/drive.ts @@ -8,7 +8,7 @@ import MiOS from '../../mios'; export class DriveStream extends Stream { constructor(os: MiOS, me) { super(os, 'drive', { - i: me.account.token + i: me.token }); } } diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts index c19861940..e085801e1 100644 --- a/src/client/app/common/scripts/streaming/home.ts +++ b/src/client/app/common/scripts/streaming/home.ts @@ -10,13 +10,13 @@ import MiOS from '../../mios'; export class HomeStream extends Stream { constructor(os: MiOS, me) { super(os, '', { - i: me.account.token + i: me.token }); // 最終利用日時を更新するため定期的にaliveメッセージを送信 setInterval(() => { this.send({ type: 'alive' }); - me.account.lastUsedAt = new Date(); + me.lastUsedAt = new Date(); }, 1000 * 60); // 自分の情報が更新されたとき diff --git a/src/client/app/common/scripts/streaming/messaging-index.ts b/src/client/app/common/scripts/streaming/messaging-index.ts index 24f0ce0c9..84e2174ec 100644 --- a/src/client/app/common/scripts/streaming/messaging-index.ts +++ b/src/client/app/common/scripts/streaming/messaging-index.ts @@ -8,7 +8,7 @@ import MiOS from '../../mios'; export class MessagingIndexStream extends Stream { constructor(os: MiOS, me) { super(os, 'messaging-index', { - i: me.account.token + i: me.token }); } } diff --git a/src/client/app/common/scripts/streaming/messaging.ts b/src/client/app/common/scripts/streaming/messaging.ts index 4c593deb3..c1b5875cf 100644 --- a/src/client/app/common/scripts/streaming/messaging.ts +++ b/src/client/app/common/scripts/streaming/messaging.ts @@ -7,13 +7,13 @@ import MiOS from '../../mios'; export class MessagingStream extends Stream { constructor(os: MiOS, me, otherparty) { super(os, 'messaging', { - i: me.account.token, + i: me.token, otherparty }); (this as any).on('_connected_', () => { this.send({ - i: me.account.token + i: me.token }); }); } diff --git a/src/client/app/common/scripts/streaming/othello-game.ts b/src/client/app/common/scripts/streaming/othello-game.ts index f34ef3514..b85af8f72 100644 --- a/src/client/app/common/scripts/streaming/othello-game.ts +++ b/src/client/app/common/scripts/streaming/othello-game.ts @@ -4,7 +4,7 @@ import MiOS from '../../mios'; export class OthelloGameStream extends Stream { constructor(os: MiOS, me, game) { super(os, 'othello-game', { - i: me ? me.account.token : null, + i: me ? me.token : null, game: game.id }); } diff --git a/src/client/app/common/scripts/streaming/othello.ts b/src/client/app/common/scripts/streaming/othello.ts index 8c6f4b9c3..f5d47431c 100644 --- a/src/client/app/common/scripts/streaming/othello.ts +++ b/src/client/app/common/scripts/streaming/othello.ts @@ -5,7 +5,7 @@ import MiOS from '../../mios'; export class OthelloStream extends Stream { constructor(os: MiOS, me) { super(os, 'othello', { - i: me.account.token + i: me.token }); } } diff --git a/src/client/app/common/views/components/signin.vue b/src/client/app/common/views/components/signin.vue index 17154e6b3..da7472b8c 100644 --- a/src/client/app/common/views/components/signin.vue +++ b/src/client/app/common/views/components/signin.vue @@ -6,7 +6,7 @@ -