Sharkey/src/web/app/common/scripts/generate-default-userdata.js

46 lines
576 B
JavaScript
Raw Normal View History

2017-03-18 13:05:11 +02:00
import uuid from './uuid';
2017-02-18 09:37:22 +02:00
const home = {
left: [
'profile',
'calendar',
'rss-reader',
'photo-stream',
'version'
2017-02-18 09:37:22 +02:00
],
right: [
'broadcast',
'notifications',
'user-recommendation',
'donation',
'nav',
'tips'
]
};
2017-03-18 13:05:11 +02:00
export default () => {
2017-02-18 09:37:22 +02:00
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 = {
home: JSON.stringify(homeData)
2017-02-18 09:37:22 +02:00
};
return data;
};