From 5da436a285b37af7a7bd34a5230f1e5e579f8a46 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Jan 2017 21:08:40 +0900 Subject: なんかもうめっちゃ変えた MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/web/app/boot.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/web/app/boot.js') diff --git a/src/web/app/boot.js b/src/web/app/boot.js index 5f4dc79af8..14cec68704 100644 --- a/src/web/app/boot.js +++ b/src/web/app/boot.js @@ -67,6 +67,11 @@ module.exports = callback => { if (me != null) { riot.observable(me); + me.update = data => { + if (data) Object.assign(me, data); + me.trigger('updated'); + }; + if (me.data.cache) { localStorage.setItem('me', JSON.stringify(me)); -- cgit v1.3.1-freya