mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-14 11:05:47 +05:00
comment structure
This commit is contained in:
parent
df8946432c
commit
226d60a026
@ -100,10 +100,10 @@ table.comments tr{
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
#options{
|
||||
/* #options{
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
font-size: medium;
|
||||
margin-left: 20px;
|
||||
height: 40px;
|
||||
}
|
||||
} */
|
||||
@ -357,49 +357,72 @@ function DisplayComment() {
|
||||
)
|
||||
: m('td', ''),
|
||||
|
||||
m('td', { style: isReply ? 'position:relative;left:20px' : '' }, comment.mComment),
|
||||
m(
|
||||
'select[id=options]',
|
||||
{
|
||||
onchange: (e) => {
|
||||
if (e.target.selectedIndex === 1) {
|
||||
// reply
|
||||
util.popupMessage(
|
||||
m(AddComment, {
|
||||
parent_comment: comment.mComment,
|
||||
channelId: comment.mMeta.mGroupId,
|
||||
authorId: identity,
|
||||
threadId: comment.mMeta.mThreadId,
|
||||
parentId: comment.mMeta.mMsgId,
|
||||
})
|
||||
);
|
||||
} else if (e.target.selectedIndex === 2) {
|
||||
// voteUP
|
||||
AddVote(
|
||||
util.GXS_VOTE_UP,
|
||||
comment.mMeta.mGroupId,
|
||||
comment.mMeta.mThreadId,
|
||||
identity,
|
||||
comment.mMeta.mMsgId
|
||||
);
|
||||
} else if (e.target.selectedIndex === 3) {
|
||||
AddVote(
|
||||
util.GXS_VOTE_DOWN,
|
||||
comment.mMeta.mGroupId,
|
||||
comment.mMeta.mThreadId,
|
||||
identity,
|
||||
comment.mMeta.mMsgId
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
[
|
||||
m('option[hidden][selected]', 'Options'),
|
||||
util.optionSelect.opts.map((option) =>
|
||||
m('option', { value: option }, option.toLocaleString())
|
||||
m('td', { style: isReply ? 'position:relative;left:20px' : '' }, [
|
||||
comment.mComment,
|
||||
m('options', { style: 'display:block' }, [
|
||||
m(
|
||||
'button',
|
||||
{
|
||||
style: 'font-size:15px',
|
||||
onclick: () =>
|
||||
util.popupMessage(
|
||||
m(AddComment, {
|
||||
parent_comment: comment.mComment,
|
||||
channelId: comment.mMeta.mGroupId,
|
||||
authorId: identity,
|
||||
threadId: comment.mMeta.mThreadId,
|
||||
parentId: comment.mMeta.mMsgId,
|
||||
})
|
||||
),
|
||||
},
|
||||
'Reply'
|
||||
),
|
||||
]
|
||||
),
|
||||
m('button', { style: 'font-size:15px' }, m('i.fas.fa-thumbs-up')),
|
||||
m('button', { style: 'font-size:15px' }, m('i.fas.fa-thumbs-down')),
|
||||
]),
|
||||
]),
|
||||
// m(
|
||||
// 'select[id=options]',
|
||||
// {
|
||||
// onchange: (e) => {
|
||||
// if (e.target.selectedIndex === 1) {
|
||||
// // reply
|
||||
// util.popupMessage(
|
||||
// m(AddComment, {
|
||||
// parent_comment: comment.mComment,
|
||||
// channelId: comment.mMeta.mGroupId,
|
||||
// authorId: identity,
|
||||
// threadId: comment.mMeta.mThreadId,
|
||||
// parentId: comment.mMeta.mMsgId,
|
||||
// })
|
||||
// );
|
||||
// } else if (e.target.selectedIndex === 2) {
|
||||
// // voteUP
|
||||
// AddVote(
|
||||
// util.GXS_VOTE_UP,
|
||||
// comment.mMeta.mGroupId,
|
||||
// comment.mMeta.mThreadId,
|
||||
// identity,
|
||||
// comment.mMeta.mMsgId
|
||||
// );
|
||||
// } else if (e.target.selectedIndex === 3) {
|
||||
// AddVote(
|
||||
// util.GXS_VOTE_DOWN,
|
||||
// comment.mMeta.mGroupId,
|
||||
// comment.mMeta.mThreadId,
|
||||
// identity,
|
||||
// comment.mMeta.mMsgId
|
||||
// );
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
// [
|
||||
// m('option[hidden][selected]', 'Options'),
|
||||
// util.optionSelect.opts.map((option) =>
|
||||
// m('option', { value: option }, option.toLocaleString())
|
||||
// ),
|
||||
// ]
|
||||
// ),
|
||||
m('td', rs.userList.userMap[comment.mMeta.mAuthorId]),
|
||||
m(
|
||||
'td',
|
||||
@ -498,12 +521,13 @@ const PostView = () => {
|
||||
: ['Download', m('i.fas.fa-download')]
|
||||
: 'Please Wait...'
|
||||
),
|
||||
fileDown.list[file.mHash] && m(fileUtil.File, {
|
||||
info: fileDown.list[file.mHash],
|
||||
direction: 'down',
|
||||
transferred: fileDown.list[file.mHash].transfered.xint64,
|
||||
parts: [],
|
||||
})
|
||||
fileDown.list[file.mHash] &&
|
||||
m(fileUtil.File, {
|
||||
info: fileDown.list[file.mHash],
|
||||
direction: 'down',
|
||||
transferred: fileDown.list[file.mHash].transfered.xint64,
|
||||
parts: [],
|
||||
}),
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
@ -140,7 +140,6 @@ const CommentsTable = () => {
|
||||
m('tr', [
|
||||
m('th', ''),
|
||||
m('th', 'Comment'),
|
||||
m('th', ''),
|
||||
m('th', 'Author'),
|
||||
m('th', 'Date'),
|
||||
m('th', 'Score'),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user