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

46 lines
562 B
JavaScript
Raw Normal View History

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