diff --git a/following.html b/following.html index fdd7af8..6f7c88a 100644 --- a/following.html +++ b/following.html @@ -41,8 +41,8 @@ Home - Network - Profile + Network + Profile @@ -105,10 +105,47 @@ + + + + + + + + + + + + + 0Mentions + + + 0Messages + + + Edit profile + + + + + + + View + + + Posts + Following + Followers * + + + + + + - Following + Following @@ -360,10 +397,10 @@ - + TOX - + BM @@ -385,7 +422,7 @@ - Posts + Posts diff --git a/home.html b/home.html index 89c97aa..9ebd479 100644 --- a/home.html +++ b/home.html @@ -39,9 +39,12 @@ - Home - Network - Profile + + Home + + + Network + Profile @@ -112,6 +115,19 @@ + + + + 0Mentions + + + 0Messages + + + Edit profile + + + View @@ -163,10 +179,33 @@ - Postboard + Postboard - + + + + Normal posts + Promoted posts + + + + + + + + 140 + undo + post + + + + + + + + + @@ -388,10 +427,10 @@ - + TOX - + BitMessage @@ -433,7 +472,7 @@ - Posts + Posts diff --git a/js/interface_common.js b/js/interface_common.js index cceab36..9f8dea3 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -1246,14 +1246,25 @@ var retweetSubmit = function(e) function changeStyle() { var style, profile, menu; var theme = $.Options.getTheme(); + + if(theme == 'nin') + { + style = 'theme_nin/css/style.css'; + profile = 'theme_nin/css/profile.css'; + $.getScript('theme_nin/js/theme_option.js'); + + } + + if(theme == 'calm') + { + style = 'theme_calm/css/style.css'; + profile = 'theme_calm/css/profile.css'; + } + if(theme == 'original') { style = 'css/style.css'; profile = 'css/profile.css'; - }else - { - style = 'theme_calm/css/style.css'; - profile = 'theme_calm/css/profile.css'; } $('#stylecss').attr('href', style); $('#profilecss').attr('href', profile); diff --git a/js/interface_home.js b/js/interface_home.js index d2cf81a..5c930d6 100644 --- a/js/interface_home.js +++ b/js/interface_home.js @@ -15,13 +15,37 @@ var InterfaceFunctions = function() { $( ".wrapper .postboard-news").click(function() { requestTimelineUpdate("latest",postsPerRefresh,followingUsers,promotedPostsOnly);}); - $( ".promoted-posts-only").click(function() { + + + /*$( ".promoted-posts-only").click(function() { promotedPostsOnly = !promotedPostsOnly; $(this).text( promotedPostsOnly ? "Switch to Normal posts" : "Switch to Promoted posts" ); timelineChangedUser(); $.MAL.getStreamPostsParent().empty(); requestTimelineUpdate("latestFirstTime",postsPerRefresh,followingUsers,promotedPostsOnly); - }); + });*/ + + + // Add refresh posts for home link in menu + $( ".userMenu-home.current a").click(function() { + requestTimelineUpdate("latest",postsPerRefresh,followingUsers,promotedPostsOnly);}); + + // modified the way promoted posts are shown + $( ".promoted-posts-only").click(function() { + promotedPostsOnly = !promotedPostsOnly; + //active promoted posts tab + $(this).children('.promoted-posts').addClass(promotedPostsOnly ? "active" : "disabled"); + $(this).children('.normal-posts').addClass(promotedPostsOnly ? "disabled" : "active"); + $('#postboard-top').removeClass(promotedPostsOnly ? "show" : "hide"); + //active normal posts + $(this).children('.promoted-posts').removeClass(promotedPostsOnly ? "disabled" : "active"); + $(this).children('.normal-posts').removeClass(promotedPostsOnly ? "active" : "disabled"); + $('#postboard-top').addClass(promotedPostsOnly ? "hide" : "show"); + + timelineChangedUser(); + $.MAL.getStreamPostsParent().empty(); + requestTimelineUpdate("latestFirstTime",postsPerRefresh,followingUsers,promotedPostsOnly); + }); initInterfaceCommon(); initUserSearch(); @@ -77,6 +101,8 @@ var InterfaceFunctions = function() $miniProfile.find(".mini-profile-name").text(defaultScreenName); getFullname( defaultScreenName, $miniProfile.find(".mini-profile-name") ); getAvatar( defaultScreenName, $miniProfile.find(".mini-profile-photo").find("img") ); + // add avatar in postboard-top + getAvatar( defaultScreenName, $("#postboard-top").find("img") ); getPostsCount( defaultScreenName, $miniProfile.find(".posts-count") ); getFollowers( defaultScreenName, $miniProfile.find(".followers-count") ); @@ -123,6 +149,10 @@ var InterfaceFunctions = function() if( args.cbFunc ) args.cbFunc(args.cbArg); }, {cbFunc:cbFunc, cbArg:cbArg}); + + + + } } }; @@ -143,5 +173,5 @@ function fixDiv() else $cache.removeClass( "fixed" ); } - $(window).scroll(fixDiv); + diff --git a/js/mobile_abstract.js b/js/mobile_abstract.js index 33ffe10..567d5e5 100644 --- a/js/mobile_abstract.js +++ b/js/mobile_abstract.js @@ -95,12 +95,16 @@ var MAL = function() } } else { var newTweetsBar = $(".wrapper").find(".postboard-news"); + var newTweetsBarMenu = $(".userMenu").find(".menu-news"); // added for home menu entry if( newPosts ) { document.title = "(" + String(newPosts) + ") twister"; newTweetsBar.text(String(newPosts) + " new posts"); newTweetsBar.fadeIn("slow"); + newTweetsBarMenu.text(String(newPosts)); + newTweetsBarMenu.addClass("show"); } else { newTweetsBar.hide(); + newTweetsBarMenu.removeClass("show"); document.title = "twister"; } } diff --git a/js/twister_following.js b/js/twister_following.js index af1d30d..eb19360 100644 --- a/js/twister_following.js +++ b/js/twister_following.js @@ -528,7 +528,7 @@ function showFollowingUsers(){ resItem.find("button").hide(); } - resItem.appendTo($followingList); + resItem.prependTo($followingList); } $.MAL.followingListLoaded(); } @@ -787,3 +787,44 @@ function initInterfaceFollowing() { initDMsCount(); }); } + + +var InterfaceFunctions = function() +{ + this.init = function() + { + initUser(initFollowing_); + }; + + function initFollowing_(cbFunc, cbArg) { + var $miniProfile = $(".left .mini-profile"); + if(!defaultScreenName) + { + + } + else + { + $miniProfile.find("a.mini-profile-name").attr("href",$.MAL.userUrl(defaultScreenName)); + $miniProfile.find("a.open-profile-modal").attr("href",$.MAL.userUrl(defaultScreenName)); + $miniProfile.find(".mini-profile-name").text(defaultScreenName); + getFullname( defaultScreenName, $miniProfile.find(".mini-profile-name") ); + getAvatar( defaultScreenName, $miniProfile.find(".mini-profile-photo").find("img") ); + getPostsCount( defaultScreenName, $miniProfile.find(".posts-count") ); + getFollowers( defaultScreenName, $miniProfile.find(".followers-count") ); + + loadFollowing( function(args) { + $(".left .following-count").text(followingUsers.length-1); + initMentionsCount(); + initDMsCount(); + }, {cbFunc:cbFunc, cbArg:cbArg}); + + } + + } +}; + +//*********************************************** +//******************* INIT ************** +//*********************************************** +var interfaceFunctions = new InterfaceFunctions; +$( document ).ready( interfaceFunctions.init ); diff --git a/js/twister_io.js b/js/twister_io.js index 7b01dec..08ac255 100644 --- a/js/twister_io.js +++ b/js/twister_io.js @@ -255,11 +255,11 @@ function getBio( username, item ){ // get tox address and store it in item.text function getTox( username, item ){ getProfileResource( username, "tox", false, function(item, text){ - item.empty(); + //item.empty(); if(text) { item.attr('href', 'tox:'+text); - item.next().attr('data', text); - item.parent().show().parent().show(); + item.next().attr('data', text).attr('title', 'Copy to clipboard'); + item.parent().css('display','inline-block').parent().show(); } }, item); } @@ -267,11 +267,11 @@ function getTox( username, item ){ // get bitmessage address and store it in item.text function getBitmessage( username, item ){ getProfileResource( username, "bitmessage", false, function(item, text){ - item.empty(); + //item.empty(); if(text) { item.attr('href', 'bitmsg:'+text+'?action=add&label='+username); - item.next().attr('data', text); - item.parent().show().parent().show(); + item.next().attr('data', text).attr('title', 'Copy to clipboard'); + item.parent().css('display','inline-block').parent().show(); } }, item); } @@ -320,8 +320,10 @@ function _putResourceIntoStorage(locator, data) { // get avatar and set it in img.attr("src") function getAvatar( username, img ){ + var theme = $.Options.getTheme(); if( username == "nobody" ) { - img.attr('src', "img/tornado_avatar.png"); + if(theme == 'nin') {img.attr('src', "theme_nin/img/tornado_avatar.png");} + else {img.attr('src', "img/tornado_avatar.png");} return; } diff --git a/network.html b/network.html index d562c33..e013ad2 100644 --- a/network.html +++ b/network.html @@ -38,8 +38,8 @@ Home - Network - Profile + Network + Profile @@ -57,9 +57,6 @@ - - - @@ -67,9 +64,9 @@ - Network status - + Network status + Network status General information @@ -129,9 +126,10 @@ - Configure block generation + Configure block generation + Configure block generation Generate blocks (send promoted messages) diff --git a/options.html b/options.html index edf40ef..8996512 100644 --- a/options.html +++ b/options.html @@ -46,85 +46,106 @@ - + + - + + Language + + Theme + + Sound + + Keys + + Postboard + + Users - - Use language - - - - Auto - Brazilian Portuguese - Chinese - Dutch - English - French - German - Italian - Japanese - Russian - Spanish - Turkish - - + + + + + + Use language + + + + Auto + Brazilian Portuguese + Chinese + Dutch + English + French + German + Italian + Japanese + Russian + Spanish + Turkish + + + + - - - - - Theme - - - - Original - Calm - - - + + + Theme + + + + Original + Calm + Nin + + + For new features check twister-calm repository! - + + + - - - + - - Sound notifications - - - Mentions - - none - beat - pip - vibro - flip - click - - Direct Messages - - none - beat - pip - vibro - flip - click - - 0 - - + + Sound notifications + + + + Mentions + + none + beat + pip + vibro + flip + click + + + + Direct Messages + + none + beat + pip + vibro + flip + click + + + 0 + + + + - - - - - Keys - + + + Keys + Send key @@ -132,55 +153,48 @@ Ctrl/Cmd+Enter + - - - - Postboard displays - - - - Posts that begin with mention - - Show all - Show only if I am in - Show if it's between users I follow - - - - - - - RTs those are close to original twist - - Show all - Show if the original is older than - - - hour(s) + + + Postboard displays + + + Posts that begin with mention + + Show all + Show only if I am in + Show if it's between users I follow + + + + + + RTs those are close to original twist + + Show all + Show if the original is older than + + + hour(s) + + + - - - - - - - - Posts display - - - - Line feeds - - Ignore - Display - - - - - + + Posts display + + + Line feeds + + Ignore + Display + + + + Inline image preview @@ -188,87 +202,84 @@ Display - - - + + - Use external links behind a proxy - - none - ssl-proxy.my-addr.org - anonymouse.org - - Use proxy for image preview only + Use external links behind a proxy + + none + ssl-proxy.my-addr.org + anonymouse.org + + Use proxy for image preview only + - - - - - + + Post editor - - - Automatic unicode conversion options - - Ignore - Convert all - Custom - - - Convert punctuations to unicode - - Supported punctuations: - ‥ … ⁇ ⁈ ⁉ ‼ — ⁓ - - - Convert emotions codes to unicode symbols - - Supported emotions: - 😃 😇 🍺 😈 ❤ 😕 😢 😞 😎 😊 😊 😗 😆 😛 😉 😉 😮 😱 😐 - - - Convert common signs to unicode - - Supported signs: - ℡ ℻ - - - Convert fractions to unicode - - Supported fractions: - ½ ⅓ ⅔ ¼ ¾ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅐ ⅛ ⅜ ⅝ ⅞ ⅑ ⅒ - - - - - - - - Split long posts - - Don't split - Split all - Split only new post - - - - - - - - - - Show if a user follows me - - Show at profile modal only - Show with every user name + + Automatic unicode conversion options + + Ignore + Convert all + Custom - - - + + Convert punctuations to unicode + + Supported punctuations: + ‥ … ⁇ ⁈ ⁉ ‼ — ⁓ + + Convert emotions codes to unicode symbols + + Supported emotions: + 😃 😇 🍺 😈 ❤ 😕 😢 😞 😎 😊 😊 😗 😆 😛 😉 😉 😮 😱 😐 + + Convert common signs to unicode + + Supported signs: + ℡ ℻ + + Convert fractions to unicode + + Supported fractions: + ½ ⅓ ⅔ ¼ ¾ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅐ ⅛ ⅜ ⅝ ⅞ ⅑ ⅒ + + + + - -
Use language
Theme
Sound notifications
Mentions
Direct Messages
Keys
Send key
Postboard displays
Posts that begin with mention
RTs those are close to original twist
Posts display
Line feeds
Inline image preview
Use external links behind a proxy
Post editor
Automatic unicode conversion options
Split long posts
Show if a user follows me