mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-09-03 01:32:03 +00:00
fix for showing of promoted posts, zh localizaion of notifications, replacement of couldnt_find_any_posts string by common slider
This commit is contained in:
parent
0ca69db0b6
commit
91a2fdec18
@ -1741,7 +1741,7 @@ ol.toptrends-list {
|
|||||||
|
|
||||||
.postboard-loading
|
.postboard-loading
|
||||||
{
|
{
|
||||||
text-align: right;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.postboard-loading div
|
.postboard-loading div
|
||||||
{
|
{
|
||||||
|
@ -496,10 +496,12 @@
|
|||||||
<button class="postboard-news" style="display:none;"></button>
|
<button class="postboard-news" style="display:none;"></button>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<span class="no-posts-found-message" style="display:none;">Couldn't find any posts with this hashtag. Still searching.</span>
|
|
||||||
<ol id="profile-posts" class="postboard-posts">
|
<ol id="profile-posts" class="postboard-posts">
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
<div class="postboard-loading" style="display: none;">
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- ÁREA DE POSTS END -->
|
<!-- ÁREA DE POSTS END -->
|
||||||
</div>
|
</div>
|
||||||
|
@ -896,19 +896,19 @@ if(preferredLanguage == "zh"){
|
|||||||
"Network status": "网络状态",
|
"Network status": "网络状态",
|
||||||
"New direct message...": "新的即时信息...",
|
"New direct message...": "新的即时信息...",
|
||||||
"New Post...": "新推文...",
|
"New Post...": "新推文...",
|
||||||
"You got": "You got",
|
"You got": "你收到",
|
||||||
"in postboard": "在时间线里",
|
"in postboard": "在时间线里",
|
||||||
"in search result": "在搜索结果里",
|
"in search result": "在搜索结果里",
|
||||||
"in top trends": "在热词趋势里",
|
"in top trends": "在热词趋势里",
|
||||||
"new_posts": "%{smart_count} 新推文",
|
"new_posts": "%{smart_count} 新推文",
|
||||||
"new_mentions": "%{smart_count} new mention |||| %{smart_count} new mentions",
|
"new_mentions": "%{smart_count} 新的提及 |||| %{smart_count} 新的提及",
|
||||||
"new_direct_messages": "%{smart_count} new direct message |||| %{smart_count} new direct messages",
|
"new_direct_messages": "%{smart_count} 新私信 |||| %{smart_count} 新私信",
|
||||||
"nobody": "nobody", // used to promote a post without attaching the user
|
"nobody": "nobody", // used to promote a post without attaching the user
|
||||||
"Not available": "用户名不可用", // username is not available
|
"Not available": "用户名不可用", // username is not available
|
||||||
"notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.",
|
"notify_desktop_error": "Twister 无法发出桌面提醒: 发生未知错误.",
|
||||||
"notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.",
|
"notify_desktop_perm_denied": "Twister 无法发出桌面提醒: 权限被拒绝.\n\n如果你想收到提醒, 在你的浏览器设置中允许 %{this_domain} 发出提醒.",
|
||||||
"notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.",
|
"notify_desktop_test": "我们都用 Twister.\n欢迎你加入.",
|
||||||
"notify_desktop_title": "Watch out, it's twister over here!",
|
"notify_desktop_title": "注意, twister 在这!",
|
||||||
"Number of blocks in block chain:": "块链中的块数:",
|
"Number of blocks in block chain:": "块链中的块数:",
|
||||||
"Number of CPUs to use": "使用CPU数目 ",
|
"Number of CPUs to use": "使用CPU数目 ",
|
||||||
"Only alphanumeric and underscore allowed.": "只允许字母和下划线",
|
"Only alphanumeric and underscore allowed.": "只允许字母和下划线",
|
||||||
|
@ -291,7 +291,7 @@ function updateProfileData(profileModalContent, username) {
|
|||||||
profileModalContent.find(".following-count").parent().attr("href", $.MAL.followingUrl(username));
|
profileModalContent.find(".following-count").parent().attr("href", $.MAL.followingUrl(username));
|
||||||
|
|
||||||
var postsView = profileModalContent.find(".postboard-posts");
|
var postsView = profileModalContent.find(".postboard-posts");
|
||||||
|
|
||||||
// try using getposts first. fallback to dht.
|
// try using getposts first. fallback to dht.
|
||||||
twisterRpc("getposts", [1,[{username: username}]],
|
twisterRpc("getposts", [1,[{username: username}]],
|
||||||
function(args, posts) {
|
function(args, posts) {
|
||||||
@ -326,6 +326,7 @@ function clearHashtagProcessed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function requestHashtag(postboard,hashtag,resource, timeoutArgs) {
|
function requestHashtag(postboard,hashtag,resource, timeoutArgs) {
|
||||||
|
postboard.closest("div").find(".postboard-loading").show();
|
||||||
dhtget( hashtag, resource, "m",
|
dhtget( hashtag, resource, "m",
|
||||||
function(args, data) {
|
function(args, data) {
|
||||||
processHashtag(args.postboard, args.hashtag, data);
|
processHashtag(args.postboard, args.hashtag, data);
|
||||||
@ -360,9 +361,6 @@ function processHashtag(postboard, hashtag, data) {
|
|||||||
_hashtagPendingPostsUpdated++;
|
_hashtagPendingPostsUpdated++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!postboard.children().length && !_hashtagPendingPosts.length && hashtag != defaultScreenName)
|
|
||||||
postboard.closest("div").find(".no-posts-found-message").show();
|
|
||||||
|
|
||||||
if( _hashtagPendingPosts.length ) {
|
if( _hashtagPendingPosts.length ) {
|
||||||
if( !postboard.children().length || autoUpdateHashtag ) {
|
if( !postboard.children().length || autoUpdateHashtag ) {
|
||||||
@ -371,8 +369,8 @@ function processHashtag(postboard, hashtag, data) {
|
|||||||
var newTweetsBar = postboard.closest("div").find(".postboard-news");
|
var newTweetsBar = postboard.closest("div").find(".postboard-news");
|
||||||
newTweetsBar.text(polyglot.t("new_posts", _hashtagPendingPosts.length));
|
newTweetsBar.text(polyglot.t("new_posts", _hashtagPendingPosts.length));
|
||||||
newTweetsBar.fadeIn("slow");
|
newTweetsBar.fadeIn("slow");
|
||||||
|
postboard.closest("div").find(".postboard-loading").hide();
|
||||||
}
|
}
|
||||||
postboard.closest("div").find(".no-posts-found-message").hide();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ function showPosts(req, posts)
|
|||||||
var streamItemsParent = $.MAL.getStreamPostsParent();
|
var streamItemsParent = $.MAL.getStreamPostsParent();
|
||||||
|
|
||||||
for( var i = 0; i < posts.length; i++ ) {
|
for( var i = 0; i < posts.length; i++ ) {
|
||||||
if ( req.users.indexOf(posts[i]['userpost']['n']) > -1 ) {
|
if (req.users.indexOf(posts[i]['userpost']['n']) > -1 || req.getspam) { // FIXME maybe it's unecessary check but currently we got unwanted adverting posts which are coming with requested ones from 'getposts' sometimes
|
||||||
var post = posts[i];
|
var post = posts[i];
|
||||||
//console.log(post);
|
//console.log(post);
|
||||||
var streamPost = postToElem(post, "original", req.getspam);
|
var streamPost = postToElem(post, "original", req.getspam);
|
||||||
@ -349,6 +349,10 @@ function willBeHidden(post){
|
|||||||
if (post['userpost']['n'] === defaultScreenName)
|
if (post['userpost']['n'] === defaultScreenName)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// currently we don't need to filter promoted posts anyhow
|
||||||
|
if (typeof(post['userpost']['lastk']) === 'undefined' )
|
||||||
|
return false;
|
||||||
|
|
||||||
if (typeof(post['userpost']['rt']) !== 'undefined') {
|
if (typeof(post['userpost']['rt']) !== 'undefined') {
|
||||||
// hope it is not too egocentric to overcome HideCloseRTsOpt this way
|
// hope it is not too egocentric to overcome HideCloseRTsOpt this way
|
||||||
if (post['userpost']['rt']['n'] === defaultScreenName)
|
if (post['userpost']['rt']['n'] === defaultScreenName)
|
||||||
|
@ -2159,7 +2159,7 @@ textarea.splited-post {
|
|||||||
|
|
||||||
.postboard-loading
|
.postboard-loading
|
||||||
{
|
{
|
||||||
text-align: right;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.postboard-loading div
|
.postboard-loading div
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user