summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-18 16:37:22 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-18 16:37:22 +0900
commit33cf76221157522ee62503e7cc7e70abf3d6500b (patch)
tree3067aca60801bdff6639023a2751e5d77d298a45 /src/web/app/common/scripts
parentMerge branch 'master' into no-ls (diff)
downloadsharkey-33cf76221157522ee62503e7cc7e70abf3d6500b.tar.gz
sharkey-33cf76221157522ee62503e7cc7e70abf3d6500b.tar.bz2
sharkey-33cf76221157522ee62503e7cc7e70abf3d6500b.zip
:v:
Diffstat (limited to 'src/web/app/common/scripts')
-rw-r--r--src/web/app/common/scripts/generate-default-userdata.js47
-rw-r--r--src/web/app/common/scripts/generate-default-userdata.ls28
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