mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-14 11:05:47 +05:00
removed comments and check.
This commit is contained in:
parent
1acc8d5b7a
commit
d80ff0733e
@ -67,22 +67,5 @@ module.exports = {
|
||||
return m(Layout, {
|
||||
pathInfo: vnode.attrs,
|
||||
});
|
||||
// if (Object.prototype.hasOwnProperty.call(vnode.attrs, 'mMsgId')) {
|
||||
// return m(Layout, {
|
||||
// check: 0, // for channel description
|
||||
// channelId: vnode.attrs.mGroupId,
|
||||
// msgId: vnode.attrs.mMsgId,
|
||||
// });
|
||||
// } else if (Object.prototype.hasOwnProperty.call(vnode.attrs, 'mGroupId')) {
|
||||
// return m(Layout, {
|
||||
// check: 1, // for channel description
|
||||
// id: vnode.attrs.mGroupId,
|
||||
// });
|
||||
// }
|
||||
// return m(Layout, {
|
||||
// check: 2,
|
||||
// tab: vnode.attrs.tab,
|
||||
// });
|
||||
// this check is implemented for Layout and helps to send in updated list each time.
|
||||
},
|
||||
};
|
||||
|
||||
@ -166,33 +166,6 @@ const ChannelView = () => {
|
||||
style: 'display:' + (csubscribed ? 'block' : 'none'),
|
||||
},
|
||||
m('h3', 'Posts'),
|
||||
// plist.map((post) => [
|
||||
// Object.keys(plist).map((key, index) => [
|
||||
// m(
|
||||
// 'div',
|
||||
// {
|
||||
// class: 'card',
|
||||
// onclick: () => {
|
||||
// m.route.set('/channels/:tab/:mGroupId/:mMsgId', {
|
||||
// tab: m.route.param().tab,
|
||||
// mGroupId: v.attrs.id,
|
||||
// mMsgId: key,
|
||||
// });
|
||||
// },
|
||||
// },
|
||||
// [
|
||||
// m('img', {
|
||||
// class: 'card-img',
|
||||
// src: 'data:image/png;base64,' + plist[key].mThumbnail.mData.base64,
|
||||
|
||||
// alt: 'header',
|
||||
// }),
|
||||
// m('div', { class: 'card-info' }, [
|
||||
// m('h4', { class: 'card-title' }, plist[key].mMeta.mMsgName),
|
||||
// ]),
|
||||
// ]
|
||||
// ),
|
||||
// ])
|
||||
),
|
||||
]
|
||||
),
|
||||
|
||||
@ -24,7 +24,6 @@ const sections = {
|
||||
};
|
||||
|
||||
const Layout = {
|
||||
// oninit : getForums.load,
|
||||
onupdate: getForums.load,
|
||||
view: (vnode) =>
|
||||
m('.tab-page', [
|
||||
@ -38,12 +37,12 @@ const Layout = {
|
||||
m(
|
||||
'.forum-node-panel',
|
||||
|
||||
vnode.attrs.check
|
||||
Object.prototype.hasOwnProperty.call(vnode.attrs.pathInfo, 'mGroupId')
|
||||
? m(util.MessageView, {
|
||||
id: vnode.attrs.id,
|
||||
id: vnode.attrs.pathInfo.mGroupId,
|
||||
})
|
||||
: m(sections[vnode.attrs.tab], {
|
||||
list: getForums[vnode.attrs.tab],
|
||||
: m(sections[vnode.attrs.pathInfo.tab], {
|
||||
list: getForums[vnode.attrs.pathInfo.tab],
|
||||
})
|
||||
),
|
||||
]),
|
||||
@ -51,16 +50,8 @@ const Layout = {
|
||||
|
||||
module.exports = {
|
||||
view: (vnode) => {
|
||||
if (Object.prototype.hasOwnProperty.call(vnode.attrs, 'mGroupId')) {
|
||||
return m(Layout, {
|
||||
check: true, // for forum description
|
||||
id: vnode.attrs.mGroupId,
|
||||
});
|
||||
}
|
||||
return m(Layout, {
|
||||
check: false,
|
||||
tab: vnode.attrs.tab,
|
||||
pathInfo: vnode.attrs,
|
||||
});
|
||||
// this check is implemented for Layout and helps to send in updated list each time.
|
||||
},
|
||||
};
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
const m = require('mithril');
|
||||
|
||||
const Layout = () => {
|
||||
return{
|
||||
view: () => [
|
||||
m('.widget', [m('h2', 'My Forums'), m('hr'), ])
|
||||
]
|
||||
};
|
||||
return {
|
||||
view: () => [m('.widget', [m('h2', 'My Forums'), m('hr')])],
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = Layout();
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
const m = require('mithril');
|
||||
|
||||
const Layout = () => {
|
||||
return{
|
||||
view: () => [
|
||||
m('.widget', [m('h2', 'Other Forums'), m('hr'), ])
|
||||
]
|
||||
};
|
||||
return {
|
||||
view: () => [m('.widget', [m('h2', 'Other Forums'), m('hr')])],
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = Layout();
|
||||
|
||||
@ -9,22 +9,20 @@ const Layout = () => {
|
||||
m('hr'),
|
||||
m(
|
||||
util.Table,
|
||||
m(
|
||||
'tbody',
|
||||
[v.attrs.list.map((forum) =>
|
||||
m('tbody', [
|
||||
v.attrs.list.map((forum) =>
|
||||
m(util.ForumSummary, {
|
||||
details: forum,
|
||||
category: 'PopularForums',
|
||||
}),
|
||||
})
|
||||
),
|
||||
v.attrs.list.map((forum) =>
|
||||
m(util.DisplayForumsFromList, {
|
||||
id: forum.mGroupId,
|
||||
category: 'PopularForums',
|
||||
}),
|
||||
})
|
||||
),
|
||||
]
|
||||
)
|
||||
])
|
||||
),
|
||||
]),
|
||||
],
|
||||
@ -32,4 +30,3 @@ const Layout = () => {
|
||||
};
|
||||
|
||||
module.exports = Layout;
|
||||
|
||||
|
||||
@ -9,22 +9,20 @@ const Layout = () => {
|
||||
m('hr'),
|
||||
m(
|
||||
util.Table,
|
||||
m(
|
||||
'tbody',
|
||||
[v.attrs.list.map((forum) =>
|
||||
m('tbody', [
|
||||
v.attrs.list.map((forum) =>
|
||||
m(util.ForumSummary, {
|
||||
details: forum,
|
||||
category: 'SubscribedForums',
|
||||
}),
|
||||
})
|
||||
),
|
||||
v.attrs.list.map((forum) =>
|
||||
m(util.DisplayForumsFromList, {
|
||||
id: forum.mGroupId,
|
||||
category: 'SubscribedForums',
|
||||
}),
|
||||
})
|
||||
),
|
||||
]
|
||||
)
|
||||
])
|
||||
),
|
||||
]),
|
||||
],
|
||||
@ -32,4 +30,3 @@ const Layout = () => {
|
||||
};
|
||||
|
||||
module.exports = Layout;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user