mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-25 08:26:43 -06:00
✌️
This commit is contained in:
parent
1feebc6a0b
commit
33cf762211
3 changed files with 49 additions and 30 deletions
|
@ -5,8 +5,8 @@
|
|||
const riot = require('riot');
|
||||
require('velocity-animate');
|
||||
const api = require('./common/scripts/api');
|
||||
const signout = require('./common/scripts/signout.ls');
|
||||
const generateDefaultUserdata = require('./common/scripts/generate-default-userdata.ls');
|
||||
const signout = require('./common/scripts/signout');
|
||||
const generateDefaultUserdata = require('./common/scripts/generate-default-userdata');
|
||||
const mixins = require('./common/mixins.ls');
|
||||
const checkForUpdate = require('./common/scripts/check-for-update.ls');
|
||||
require('./common/tags');
|
||||
|
|
47
src/web/app/common/scripts/generate-default-userdata.js
Normal file
47
src/web/app/common/scripts/generate-default-userdata.js
Normal file
|
@ -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;
|
||||
};
|
|
@ -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
|
Loading…
Reference in a new issue