diff options
Diffstat (limited to 'src/web/app/common/scripts')
| -rw-r--r-- | src/web/app/common/scripts/generate-default-userdata.js | 47 | ||||
| -rw-r--r-- | src/web/app/common/scripts/generate-default-userdata.ls | 28 |
2 files changed, 47 insertions, 28 deletions
diff --git a/src/web/app/common/scripts/generate-default-userdata.js b/src/web/app/common/scripts/generate-default-userdata.js new file mode 100644 index 0000000000..f6c8c2fe58 --- /dev/null +++ b/src/web/app/common/scripts/generate-default-userdata.js @@ -0,0 +1,47 @@ +const uuid = require('./uuid.js'); + +const home = { + left: [ + 'profile', + 'calendar', + 'rss-reader', + 'photo-stream' + ], + right: [ + 'broadcast', + 'notifications', + 'user-recommendation', + 'donation', + 'nav', + 'tips' + ] +}; + +module.exports = () => { + const homeData = []; + + home.left.forEach(widget => { + homeData.push({ + name: widget, + id: uuid(), + place: 'left' + }); + }); + + home.right.forEach(widget => { + homeData.push({ + name: widget, + id: uuid(), + place: 'right' + }); + }); + + const data = { + cache: true, + debug: false, + nya: true, + home: homeData + }; + + return data; +}; diff --git a/src/web/app/common/scripts/generate-default-userdata.ls b/src/web/app/common/scripts/generate-default-userdata.ls deleted file mode 100644 index c13d221bb9..0000000000 --- a/src/web/app/common/scripts/generate-default-userdata.ls +++ /dev/null @@ -1,28 +0,0 @@ -uuid = require './uuid.js' - -home = - left: [ \profile \calendar \rss-reader \photo-stream ] - right: [ \broadcast \notifications \user-recommendation \donation \nav \tips ] - -module.exports = ~> - home-data = [] - - home.left.for-each (widget) ~> - home-data.push do - name: widget - id: uuid! - place: \left - - home.right.for-each (widget) ~> - home-data.push do - name: widget - id: uuid! - place: \right - - data = - cache: true - debug: false - nya: true - home: home-data - - return data |