mirror of
https://github.com/twisterarmy/cloud-server.git
synced 2025-03-12 21:41:09 +00:00
init feed actions block
This commit is contained in:
parent
05aa1f102f
commit
0b3d0d65bc
@ -8,7 +8,8 @@
|
||||
color: #1c1d1e;
|
||||
background: rgb(238, 238, 238);
|
||||
border-radius: 3px;
|
||||
min-height: 84px;
|
||||
cursor: pointer;
|
||||
/*min-height: 84px;*/
|
||||
}
|
||||
|
||||
.moduleFeed .item a,
|
||||
@ -65,6 +66,25 @@
|
||||
color: #1c1d1e;
|
||||
}
|
||||
|
||||
.moduleFeed .item .actions {
|
||||
opacity: 0;
|
||||
text-align: right;
|
||||
margin-top: 8px
|
||||
}
|
||||
.moduleFeed .item:hover .actions {
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
.moduleFeed .item .actions span {
|
||||
cursor: pointer;
|
||||
margin-left: 8px;
|
||||
color: #5b646f
|
||||
}
|
||||
|
||||
.moduleFeed .item .actions span:hover {
|
||||
color: #1c1d1e
|
||||
}
|
||||
|
||||
.moduleFeed .loadMore {
|
||||
width: 100%;
|
||||
margin: 8px 0;
|
||||
|
@ -29,7 +29,8 @@ var ModuleFeed = {
|
||||
$(feed).append(
|
||||
$('<div/>', {
|
||||
'class': 'item',
|
||||
'data-username': item.userName,
|
||||
'data-user-name': item.userName,
|
||||
'data-meta': item.meta
|
||||
}).append(
|
||||
$('<div/>', {
|
||||
'class': 'avatar'
|
||||
@ -65,6 +66,22 @@ var ModuleFeed = {
|
||||
'class': (item.message != '' ? 'quote' : '')
|
||||
}).append(item.message)
|
||||
)
|
||||
).append(
|
||||
$('<div/>', {
|
||||
'class': 'actions'
|
||||
}).append(
|
||||
$('<span/>', {
|
||||
'class': 'bi bi-reply-fill',
|
||||
'title': 'Reply',
|
||||
'onclick': 'ModuleFeed.reply($(this).closest(\'.item\').data(\'meta\'))'
|
||||
})
|
||||
).append(
|
||||
$('<span/>', {
|
||||
'class': 'bi bi-quote',
|
||||
'title': 'Quote',
|
||||
'onclick': 'ModuleFeed.retwist($(this).closest(\'.item\').data(\'meta\'))'
|
||||
})
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -83,7 +100,7 @@ var ModuleFeed = {
|
||||
if (response.success) {
|
||||
|
||||
if (response.avatar) {
|
||||
$(feed).find('div[data-username="' + userName + '"] .avatar img').attr('src', response.avatar).show();
|
||||
$(feed).find('div[data-user-name="' + userName + '"] .avatar img').attr('src', response.avatar).show();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user