mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-27 15:14:40 +00:00
users' last activity (status) time in 'who to follow' lists
This commit is contained in:
parent
9987bff431
commit
27a018a23e
@ -890,12 +890,15 @@ textarea.splited-post {
|
|||||||
color: #e34f42;
|
color: #e34f42;
|
||||||
}
|
}
|
||||||
|
|
||||||
.followers
|
.followers,
|
||||||
|
.last-activity
|
||||||
{
|
{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: rgba( 0, 0, 0, .6 );
|
color: rgba( 0, 0, 0, .6 );
|
||||||
|
margin-left: 58px;
|
||||||
}
|
}
|
||||||
.followed-by
|
.followed-by,
|
||||||
|
.user-status-time
|
||||||
{
|
{
|
||||||
color: #e34f42;
|
color: #e34f42;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
@ -302,6 +302,10 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<a class="twister-user-remove">×</a>
|
<a class="twister-user-remove">×</a>
|
||||||
|
<div class="last-activity">
|
||||||
|
<span class="label">Last activity</span>
|
||||||
|
<span class="user-status-time" data-time="0" data-screen-name="" data-id=""></span>
|
||||||
|
</div>
|
||||||
<button class="follow">Follow</button>
|
<button class="follow">Follow</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -389,6 +389,7 @@ function checkNetworkStatusAndAskRedirect(cbFunc, cbReq) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function timeGmtToText(t) {
|
function timeGmtToText(t) {
|
||||||
|
if (t == 0) return '-';
|
||||||
var d = new Date(0);
|
var d = new Date(0);
|
||||||
d.setUTCSeconds(t);
|
d.setUTCSeconds(t);
|
||||||
return d.toString().replace(/GMT.*/g, '');
|
return d.toString().replace(/GMT.*/g, '');
|
||||||
@ -750,6 +751,7 @@ function fillWhoToFollowModal(list, hlist, start) {
|
|||||||
getFullname(utf, item.find('.twister-user-full'));
|
getFullname(utf, item.find('.twister-user-full'));
|
||||||
getBioToElem(utf, item.find('.bio'));
|
getBioToElem(utf, item.find('.bio'));
|
||||||
getFullname(followingUsers[i], item.find('.followed-by').text(followingUsers[i]));
|
getFullname(followingUsers[i], item.find('.followed-by').text(followingUsers[i]));
|
||||||
|
getStatusTime(utf,item.find('.user-status-time'));
|
||||||
|
|
||||||
item.find('.twister-user-remove').remove();
|
item.find('.twister-user-remove').remove();
|
||||||
|
|
||||||
@ -2620,6 +2622,8 @@ function initInterfaceCommon() {
|
|||||||
displayQueryPending($('.hashtag-modal .postboard-posts'));
|
displayQueryPending($('.hashtag-modal .postboard-posts'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.user-status-time').on('mouseup', {feeder: '.user-status-time'}, handleClickOpenConversation);
|
||||||
|
|
||||||
replaceDashboards();
|
replaceDashboards();
|
||||||
$(window).resize(replaceDashboards);
|
$(window).resize(replaceDashboards);
|
||||||
|
|
||||||
|
@ -366,7 +366,8 @@ if(preferredLanguage == "en"){
|
|||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
"fav_this": "Is it for you only?"
|
"fav_this": "Is it for you only?",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if(preferredLanguage == "es"){
|
if(preferredLanguage == "es"){
|
||||||
@ -705,7 +706,8 @@ if(preferredLanguage == "es"){
|
|||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
"fav_this": "Is it for you only?"
|
"fav_this": "Is it for you only?",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1043,7 +1045,8 @@ if(preferredLanguage == "uk"){
|
|||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
"fav_this": "Is it for you only?"
|
"fav_this": "Is it for you only?",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1386,7 +1389,8 @@ if(preferredLanguage == "zh-CN"){
|
|||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
"fav_this": "Is it for you only?"
|
"fav_this": "Is it for you only?",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1726,7 +1730,8 @@ if(preferredLanguage == "nl"){
|
|||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
"fav_this": "Is it for you only?"
|
"fav_this": "Is it for you only?",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2064,7 +2069,8 @@ if(preferredLanguage == "it"){
|
|||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
"fav_this": "Is it for you only?"
|
"fav_this": "Is it for you only?",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2403,8 +2409,8 @@ if(preferredLanguage == "fr"){
|
|||||||
"No favs here because you are not logged in." : "No favs here because you are not logged in.",
|
"No favs here because you are not logged in." : "No favs here because you are not logged in.",
|
||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages."
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2750,7 +2756,8 @@ if(preferredLanguage == "ru"){
|
|||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
"fav_this": "Is it for you only?"
|
"fav_this": "Is it for you only?",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3092,7 +3099,8 @@ if(preferredLanguage == "de"){
|
|||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
"fav_this": "Is it for you only?"
|
"fav_this": "Is it for you only?",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3429,7 +3437,8 @@ if(preferredLanguage == "ja"){
|
|||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
"fav_this": "Is it for you only?"
|
"fav_this": "Is it for you only?",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3772,7 +3781,8 @@ if(preferredLanguage == "pt-BR"){
|
|||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
"fav_this": "Is it for you only?"
|
"fav_this": "Is it for you only?",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4111,7 +4121,8 @@ if(preferredLanguage == "tr"){
|
|||||||
"users_favs": "@%{username} kullanıcısının favorileri",
|
"users_favs": "@%{username} kullanıcısının favorileri",
|
||||||
"Favorites": "Favoriler",
|
"Favorites": "Favoriler",
|
||||||
"You have to log in to favorite messages.": "İletileri favorine eklemek için giriş yapmalısın.",
|
"You have to log in to favorite messages.": "İletileri favorine eklemek için giriş yapmalısın.",
|
||||||
"fav_this": "Sana özel mi?"
|
"fav_this": "Sana özel mi?",
|
||||||
|
"Last activity": "Son etkinlik"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4453,7 +4464,8 @@ if(preferredLanguage == "cs"){
|
|||||||
"users_favs": "Favorites of @%{username}",
|
"users_favs": "Favorites of @%{username}",
|
||||||
"Favorites": "Favorites",
|
"Favorites": "Favorites",
|
||||||
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
"You have to log in to favorite messages.": "You have to log in to favorite messages.",
|
||||||
"fav_this": "Is it for you only?"
|
"fav_this": "Is it for you only?",
|
||||||
|
"Last activity": "Last activity"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,6 +515,7 @@ function processWhoToFollowSuggestion(suggestion, followedBy) {
|
|||||||
|
|
||||||
getAvatar(suggestion, item.find('.twister-user-photo'));
|
getAvatar(suggestion, item.find('.twister-user-photo'));
|
||||||
getFullname(followedBy, item.find('.followed-by').text(followedBy));
|
getFullname(followedBy, item.find('.followed-by').text(followedBy));
|
||||||
|
getStatusTime(suggestion,item.find('.user-status-time'));
|
||||||
|
|
||||||
item.find('.twister-user-remove').on('click', function() {
|
item.find('.twister-user-remove').on('click', function() {
|
||||||
item.remove();
|
item.remove();
|
||||||
|
@ -522,6 +522,25 @@ function getPostsCount(peerAlias, elem) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getStatusTime(peerAlias, elem) {
|
||||||
|
dhtget(peerAlias, 'status', 's',
|
||||||
|
function(req, v) {
|
||||||
|
var time = 0;
|
||||||
|
var k = -1;
|
||||||
|
if (v && v.userpost) {
|
||||||
|
time = v.userpost.time;
|
||||||
|
k = v.userpost.k;
|
||||||
|
}
|
||||||
|
elem.text(timeGmtToText(time));
|
||||||
|
elem.attr('data-time', time);
|
||||||
|
if (k > -1) {
|
||||||
|
elem.attr('data-screen-name', peerAlias);
|
||||||
|
elem.attr('data-id', k);
|
||||||
|
}
|
||||||
|
}, {peerAlias: peerAlias, elem: elem}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function getPostMaxAvailability(peerAlias, k, cbFunc, cbReq) {
|
function getPostMaxAvailability(peerAlias, k, cbFunc, cbReq) {
|
||||||
twisterRpc('getpiecemaxseen', [peerAlias, k],
|
twisterRpc('getpiecemaxseen', [peerAlias, k],
|
||||||
function(req, ret) {
|
function(req, ret) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user