From e6d293af575b62aa31f7d95f677f45da7f8baab5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 19 Mar 2017 00:24:43 +0900 Subject: [PATCH] =?UTF-8?q?[Client]=20=E3=83=9B=E3=83=BC=E3=83=A0=E3=82=AB?= =?UTF-8?q?=E3=82=B9=E3=82=BF=E3=83=9E=E3=82=A4=E3=82=BA=E6=A9=9F=E6=A7=8B?= =?UTF-8?q?=E3=81=8C=E3=81=A7=E3=81=8D=E3=82=8B=E3=81=BE=E3=81=A7=E3=81=AF?= =?UTF-8?q?=E3=83=9B=E3=83=BC=E3=83=A0=E3=81=AE=E9=85=8D=E7=BD=AE=E3=82=92?= =?UTF-8?q?=E5=BC=B7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scripts/generate-default-userdata.js | 3 +- src/web/app/desktop/tags/home.tag | 32 ++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/web/app/common/scripts/generate-default-userdata.js b/src/web/app/common/scripts/generate-default-userdata.js index c19228dd49..1f3a04e649 100644 --- a/src/web/app/common/scripts/generate-default-userdata.js +++ b/src/web/app/common/scripts/generate-default-userdata.js @@ -5,7 +5,8 @@ const home = { 'profile', 'calendar', 'rss-reader', - 'photo-stream' + 'photo-stream', + 'version' ], right: [ 'broadcast', diff --git a/src/web/app/desktop/tags/home.tag b/src/web/app/desktop/tags/home.tag index 7a148d123c..6c218d93c3 100644 --- a/src/web/app/desktop/tags/home.tag +++ b/src/web/app/desktop/tags/home.tag @@ -64,13 +64,31 @@ // https://github.com/riot/riot/issues/2080 if (this.mode == '') this.mode = 'timeline'; + const _home = { + left: [ + 'profile', + 'calendar', + 'rss-reader', + 'photo-stream', + 'version' + ], + right: [ + 'broadcast', + 'notifications', + 'user-recommendation', + 'donation', + 'nav', + 'tips' + ] + }; + this.home = []; this.on('mount', () => { this.refs.tl.on('loaded', () => { this.trigger('loaded'); }); - +/* this.I.data.home.forEach(widget => { try { const el = document.createElement(`mk-${widget.name}-home-widget`); @@ -86,6 +104,18 @@ // noop } }); +*/ + _home.left.forEach(widget => { + const el = document.createElement(`mk-${widget}-home-widget`); + this.refs.left.appendChild(el); + this.home.push(riot.mount(el)[0]); + }); + + _home.right.forEach(widget => { + const el = document.createElement(`mk-${widget}-home-widget`); + this.refs.right.appendChild(el); + this.home.push(riot.mount(el)[0]); + }); }); this.on('unmount', () => {