Browse Source

Merge pull request #336 from miguelfreitas/blaster

sync with blaster
master
miguelfreitas 9 years ago
parent
commit
d9f21124c9
  1. 84
      css/style.css
  2. 7
      following.html
  3. 7
      home.html
  4. 230
      js/interface_common.js
  5. 1
      js/interface_home.js
  6. 235
      js/interface_localization.js
  7. 82
      js/mobile_abstract.js
  8. 10
      js/options.js
  9. 37
      js/tmobile.js
  10. 138
      js/twister_actions.js
  11. 134
      js/twister_directmsg.js
  12. 7
      js/twister_following.js
  13. 51
      js/twister_formatpost.js
  14. 4
      js/twister_io.js
  15. 30
      js/twister_network.js
  16. 52
      js/twister_newmsgs.js
  17. 8
      js/twister_timeline.js
  18. 38
      network.html
  19. 87
      theme_calm/css/style.css
  20. 43
      theme_nin/css/style.css
  21. 4
      theme_nin/sass/_responsive.sass
  22. 24
      theme_nin/sass/style.sass

84
css/style.css

@ -379,6 +379,39 @@ button.follow:hover, button.unfollow:hover, .following-list button.private:hover @@ -379,6 +379,39 @@ button.follow:hover, button.unfollow:hover, .following-list button.private:hover
margin: 4px 0 0 10px;
}
#modals-minimized {
background-color: rgba(0, 0, 0, 0);
z-index: 9000;
position: fixed;
bottom: 0;
left: 50%;
width: 900px;
height: 24px;
overflow: auto;
margin-left: -450px;
padding: 0 4%;
}
#modals-minimized.w1200 {
width: 1200px;
margin-left: -600px;
}
#modals-minimized li {
display: inline-block;
opacity: .88;
font-size: 10px;
color: #FFF;
background-color: #B43E34;
margin: 0 2px;
padding: 4px 8px;
}
#modals-minimized li:hover {
opacity: 1;
cursor: pointer;
}
/*******************************************************
****************** CONFIG SUBMENU & SEARCH RESULTS *****
*******************************************************/
@ -411,21 +444,25 @@ button.follow:hover, button.unfollow:hover, .following-list button.private:hover @@ -411,21 +444,25 @@ button.follow:hover, button.unfollow:hover, .following-list button.private:hover
right: auto;
left: 80px;
}
.direct-messages,
.dropdown-menu-item
{
.dropdown-menu-item {
display: block;
padding: 10px;
font-size: 12px;
border-top: solid 1px rgba( 69, 71, 77, .1 );
color: rgba( 0, 0, 0, .7 );
}
.direct-messages:hover,
.dropdown-menu-item, .dropdown-menu-item:hover {
text-decoration: none;
}
.dropdown-menu-item:hover,
.userMenu-search-sugestions a:hover,
.userMenu-search-profiles li:hover a
{
background: #fefedf;
.userMenu-search-profiles li:hover a {
background: #FEFEDF;
}
.userMenu-search-profiles button
{
position: absolute;
@ -1085,12 +1122,13 @@ ol.toptrends-list { @@ -1085,12 +1122,13 @@ ol.toptrends-list {
margin: 2px 16px 4px 60px;
}
.confirm-popup .message a,
.post-text a,
.post-context a,
.mini-screen-name
{
color: #e34f42;
.mini-screen-name {
color: #E34F42;
}
.mini-screen-name
{
font-size: 13px;
@ -1483,7 +1521,7 @@ ol.toptrends-list { @@ -1483,7 +1521,7 @@ ol.toptrends-list {
height: 100%;
}
.modal-close {
.modal-close, .minimize-modal {
position: absolute;
right: 0;
top: 0;
@ -1495,15 +1533,19 @@ ol.toptrends-list { @@ -1495,15 +1533,19 @@ ol.toptrends-list {
transition: all .1s linear;
}
.modal-close:hover {
.modal-close:hover, .minimize-modal:hover {
color: #fff;
background: rgba( 0, 0, 0, .1 );
}
.minimize-modal {
right: 30px;
}
.modal-back,
.mark-all-as-read {
position: absolute;
right: 30px;
right: 60px;
top: 0;
padding: 1px 10px;
cursor: pointer;
@ -1520,6 +1562,14 @@ ol.toptrends-list { @@ -1520,6 +1562,14 @@ ol.toptrends-list {
background: rgba( 0, 0, 0, .1 );
}
.mark-all-as-read {
right: 90px;
}
.mark-all-as-read:before {
content: '\2714';
}
.modal-wrapper.reply .post {
background: #ececed;
padding: 10px 15px;
@ -1627,14 +1677,6 @@ ol.toptrends-list { @@ -1627,14 +1677,6 @@ ol.toptrends-list {
left: auto;
}
.mark-all-as-read {
right: 60px;
}
.mark-all-as-read:before {
content: '\2714';
}
/*************************************
****** GM NEW GROUP SETUP MODAL ******
**************************************/

7
following.html

@ -170,6 +170,8 @@ @@ -170,6 +170,8 @@
<!-- LADO ESQUERDO DE MÓDULOS END -->
</div>
<ul id="modals-minimized"></ul>
<!-- TEMPLATES INIT -->
<div id="templates" style="display:none;">
<div id="search-profile-template">
@ -304,6 +306,7 @@ @@ -304,6 +306,7 @@
<div class="modal-wrapper">
<div class="modal-header">
<h3></h3>
<span class="minimize-modal"><b>_</b></span>
<span id="closeModal" class="modal-close">&times;</span>
<span class="modal-back">&lt;</span>
<span class="mark-all-as-read"></span>
@ -421,7 +424,7 @@ @@ -421,7 +424,7 @@
<button class="invite">Invite peers</button>
<button class="leave">Leave group</button>
<div class="invite-form">
<textarea></textarea><button disabled="disabled">Invite</button>
<textarea placeholder="@peer1 @peer2 …"></textarea><button disabled="disabled">Invite</button>
</div>
</div>
</div>
@ -441,7 +444,7 @@ @@ -441,7 +444,7 @@
<button class="show-secret-key" disabled="disabled">Secret Key</button>
<button class="leave" disabled="disabled">Leave group</button>
<div class="invite-form">
<textarea></textarea><button disabled="disabled">Invite</button>
<textarea placeholder="@peer1 @peer2 …"></textarea><button disabled="disabled">Invite</button>
</div>
<div class="secret-key"></div>
</div>

7
home.html

@ -185,6 +185,8 @@ @@ -185,6 +185,8 @@
<div class="dashboard right"></div>
</div>
<ul id="modals-minimized"></ul>
<!-- TEMPLATES INIT -->
<div id="templates" style="display:none;">
<div id="search-profile-template">
@ -396,6 +398,7 @@ @@ -396,6 +398,7 @@
<div class="modal-wrapper">
<div class="modal-header">
<h3></h3>
<span class="minimize-modal"><b>_</b></span>
<span id="closeModal" class="modal-close">&times;</span>
<span class="modal-back">&lt;</span>
<span class="mark-all-as-read"></span>
@ -513,7 +516,7 @@ @@ -513,7 +516,7 @@
<button class="invite">Invite peers</button>
<button class="leave">Leave group</button>
<div class="invite-form">
<textarea></textarea><button disabled="disabled">Invite</button>
<textarea placeholder="@peer1 @peer2 …"></textarea><button disabled="disabled">Invite</button>
</div>
</div>
</div>
@ -533,7 +536,7 @@ @@ -533,7 +536,7 @@
<button class="show-secret-key" disabled="disabled">Secret Key</button>
<button class="leave" disabled="disabled">Leave group</button>
<div class="invite-form">
<textarea></textarea><button disabled="disabled">Invite</button>
<textarea placeholder="@peer1 @peer2 …"></textarea><button disabled="disabled">Invite</button>
</div>
<div class="secret-key"></div>
</div>

230
js/interface_common.js

@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
// Post actions: submit, count characters
var window_scrollY = 0;
var _watchHashChangeRelaxDontDoIt = window.location.hash === '' ? true : false;
var _minimizedModals = {};
function openModal(modal) {
if (!modal.classBase) {
@ -47,7 +49,10 @@ function openModal(modal) { @@ -47,7 +49,10 @@ function openModal(modal) {
function closeModal() {
closeModalHandler('.modal-wrapper');
window.location.hash = '#';
if (window.location.hash !== '') {
_watchHashChangeRelaxDontDoIt = true;
window.location.hash = '#';
}
window.scroll(window.pageXOffset, window_scrollY);
$('body').css({
'overflow': 'auto',
@ -65,10 +70,128 @@ function closeModalHandler(classBase) { @@ -65,10 +70,128 @@ function closeModalHandler(classBase) {
modalWindows.fadeOut('fast', function() {modalWindows.remove();});
}
function minimizeModal(modal, switchMode) {
function minimize(modal, scroll) {
modal.detach();
btnResume = $('<li>' + modal.find('.modal-header h3').text() + '</li>')
.on('click', {hashString: window.location.hash}, resumeModal)
.appendTo($('#modals-minimized'))
;
_minimizedModals[window.location.hash] = {
self: modal,
scroll: scroll,
btnResume: btnResume
};
}
var scroll; // MUST be setted before modal.detach(), modal.fadeOut() and so on
if (modal.is('.directMessages') || modal.is('.group-messages-new-group')
|| modal.is('.group-messages-join-group')) {
scroll = {
targetSelector: '.modal-content',
top: modal.find('.modal-content').scrollTop()
};
} else if (modal.is('.profile-modal')) {
if (modal.find('.profile-card').attr('data-screen-name')[0] === '*')
scroll = {
targetSelector: '.modal-content .members',
top: modal.find('.modal-content .members').scrollTop()
};
else
scroll = {
targetSelector: '.modal-content .postboard-posts',
top: modal.find('.modal-content .postboard-posts').scrollTop()
};
}
if (switchMode)
minimize(modal, scroll);
else
modal.fadeOut('fast', function () {
minimize(modal, scroll);
_watchHashChangeRelaxDontDoIt = true;
window.location.hash = '#';
window.scroll(window.pageXOffset, window_scrollY);
$('body').css({
'overflow': 'auto',
'margin-right': '0'
});
});
}
function resumeModal(event) {
var elemEvent = $(event.target);
elemEvent.fadeOut('fast', function () {elemEvent.remove();});
var modalActive = $('.modal-wrapper:not(#templates *)');
if (modalActive.length)
minimizeModal(modalActive, true);
else {
window_scrollY = window.pageYOffset;
$('body').css('overflow', 'hidden');
}
var modal = _minimizedModals[event.data.hashString];
if (modal) {
_minimizedModals[event.data.hashString] = undefined;
if (window.location.hash !== event.data.hashString) {
_watchHashChangeRelaxDontDoIt = true;
window.location.hash = event.data.hashString;
}
modal.self.prependTo('body').fadeIn('fast', function () {
// TODO also need reset modal height here maybe and then compute new scroll
if (modal.scroll)
modal.self.find($(modal.scroll.targetSelector).scrollTop(modal.scroll.top));
if (modal.resume && typeof modal.resume.cbFunc === 'function')
modal.resume.cbFunc(modal.resume.cbArg);
});
}
}
function focusModalWithElement(elem, cbFunc, cbArg) {
if (elem.jquery ? elem.is('html *') : $(elem).is('html *')) {
if (typeof cbFunc === 'function')
cbFunc(cbArg);
return true;
}
var hash = getHashOfMinimizedModalWithElem(elem);
if (hash) {
_minimizedModals[hash].resume = {cbFunc: cbFunc, cbArg: cbArg};
_minimizedModals[hash].btnResume.click();
return true;
}
return false;
}
function getHashOfMinimizedModalWithElem(elem) {
for (var i in _minimizedModals)
if (_minimizedModals[i] && _minimizedModals[i].self.find(elem).length)
return i;
return '';
}
function isModalWithElemExists(elem) {
if (elem.jquery ? elem.is('html *') : $(elem).is('html *'))
return true;
else
return getHashOfMinimizedModalWithElem(elem) ? true : false;
}
function confirmPopup(event, req) {
if (event && event.stopPropagation)
if (event && event.stopPropagation) {
event.stopPropagation();
if (!req && event.data)
req = event.data;
}
var modal = openModal({
classBase: '.prompt-wrapper',
classAdd: 'confirm-popup',
@ -77,7 +200,7 @@ function confirmPopup(event, req) { @@ -77,7 +200,7 @@ function confirmPopup(event, req) {
});
if (req.messageTxt)
modal.content.find('.message').text(req.messageTxt);
modal.content.find('.message').html(htmlFormatMsg(req.messageTxt, {markout: 'apply'}).html);
var btn = modal.content.find('.confirm');
if (req.removeConfirm)
@ -137,7 +260,7 @@ function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) { @@ -137,7 +260,7 @@ function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) {
networkUpdate(function(args) {
if (!twisterdConnectedAndUptodate) {
confirmPopup(null, {
messageTxt: polyglot.t('switch_to_network'),
messageTxt: polyglot.t('confirm_switch_to_network', {page: '/network.html'}),
confirmFunc: $.MAL.goNetwork
});
} else {
@ -249,29 +372,37 @@ function openHashtagModalFromSearchHandler(hashtag) { @@ -249,29 +372,37 @@ function openHashtagModalFromSearchHandler(hashtag) {
title: '#' + hashtag
});
clearHashtagProcessed();
updateHashtagModal(modal.content.find('.postboard-posts'), hashtag, 'hashtag');
setupQueryModalUpdating(modal.content.find('.postboard-posts'), hashtag, 'hashtag');
}
function updateHashtagModal(postboard, hashtag, resource, timeoutArgs) {
if (postboard.is('html *')) {
requestHashtag(postboard, hashtag, resource, timeoutArgs);
function setupQueryModalUpdating(postboard, query, resource) {
var req = {
postboard: postboard,
query: query,
resource: resource,
id: query + '@' + resource
};
if (_hashtagPendingPostsUpdated) {
if (resource !== 'mention' && $.Options.showDesktopNotifPostsModal.val === 'enable') {
$.MAL.showDesktopNotif (false, polyglot.t('You got')+' '+polyglot.t('new_posts', _hashtagPendingPostsUpdated)+' '+polyglot.t('in search result')+'.', false,'twister_notification_new_posts_modal', $.Options.showDesktopNotifPostsModalTimer.val, function() {
$('.postboard-news').hide();
displayHashtagPending($('.hashtag-modal .postboard-posts'));
}, false)
}
_hashtagPendingPostsUpdated = 0;
}
postboard.attr('data-request-id', req.id);
requestQuery(req);
// use extended timeout parameters on modal refresh (requires twister_core >= 0.9.14).
// our first query above should be faster (with default timeoutArgs of twisterd),
// then we may possibly collect more posts on our second try by waiting more.
req.timeoutArgs = [10000, 2000, 3];
postboard.attr('data-request-interval', setInterval(updateQueryModal, 5000, req)); // FIXME
}
// use extended timeout parameters on modal refresh (requires twister_core >= 0.9.14).
// our first query above should be faster (with default timeoutArgs of twisterd),
// then we may possibly collect more posts on our second try by waiting more.
setTimeout(updateHashtagModal, 5000, postboard, hashtag, resource, [10000,2000,3]);
function updateQueryModal(req) {
if (!isModalWithElemExists(req.postboard)) {
clearInterval(req.postboard.attr('data-request-interval'));
clearQueryProcessed(req.id);
return;
}
requestQuery(req);
}
function openMentionsModal(e) {
@ -300,12 +431,16 @@ function openMentionsModalHandler(username) { @@ -300,12 +431,16 @@ function openMentionsModalHandler(username) {
title: polyglot.t('users_mentions', {username: username})
});
clearHashtagProcessed();
updateHashtagModal(modal.content.find('.postboard-posts'), username, 'mention');
setupQueryModalUpdating(modal.content.find('.postboard-posts'), username, 'mention');
if (username === defaultScreenName) {
// obtain already cached mention posts from twister_newmsgs.js
processHashtag(modal.content.find('.postboard-posts'), defaultScreenName, getMentionsData());
processQuery({
postboard: modal.content.find('.postboard-posts'),
query: defaultScreenName,
resource: 'mention',
posts: getMentionsData()
});
resetMentionsCount();
}
}
@ -391,14 +526,9 @@ function newConversationModal(username, resource) { @@ -391,14 +526,9 @@ function newConversationModal(username, resource) {
var postLi = postboard.children().first()
.css('display', 'none');
getTopPostOfConversation(postLi, null, postboard);
}, {content:content}
}, {content: content}
);
content.find('.postboard-news').on('click', function () {
$(this).hide();
displayHashtagPending($('.conversation-modal .postboard-posts'));
});
return content;
}
@ -412,7 +542,7 @@ function openConversationClick(e) { @@ -412,7 +542,7 @@ function openConversationClick(e) {
':post' + postData.attr('data-id');
}
function openConversationModal(username,resource) {
function openConversationModal(username, resource) {
openModal({
classAdd: 'conversation-modal',
content: newConversationModal(username, resource),
@ -425,6 +555,7 @@ function watchHashChange(e) { @@ -425,6 +555,7 @@ function watchHashChange(e) {
var prevurlsplit = e.oldURL.split('#');
var prevhashstring = prevurlsplit[1];
// FIXME need to move back button handling to special function and call it in openModal() and resumeModal()
var notFirstModalView = (prevhashstring !== undefined && prevhashstring.length > 0);
var notNavigatedBackToFirstModalView = (window.history.state == null ||
(window.history.state != null && window.history.state.showCloseButton !== false));
@ -432,16 +563,31 @@ function watchHashChange(e) { @@ -432,16 +563,31 @@ function watchHashChange(e) {
if (notFirstModalView && notNavigatedBackToFirstModalView) {
$('.modal-back').css('display', 'inline');
} else {
window.history.pushState({showCloseButton: false}, null, null);
window.history.replaceState({showCloseButton: false}, '', window.location.pathname + window.location.hash);
$('.modal-back').css('display', 'none');
}
}
loadModalFromHash();
if (_watchHashChangeRelaxDontDoIt)
_watchHashChangeRelaxDontDoIt = false;
else
loadModalFromHash();
}
function loadModalFromHash() {
if (_minimizedModals[window.location.hash]) {
// need to remove active modal before btnResume.click() or it will be minimized in resumeModal()
// e.g. for case when you click on profile link in some modal having this profile's modal minimized already
$('.modal-wrapper:not(#templates *)').remove();
_minimizedModals[window.location.hash].btnResume.click();
return;
}
var hashstring = decodeURIComponent(window.location.hash);
if (hashstring === '') {
closeModal();
return;
}
var hashdata = hashstring.split(':');
if (hashdata[0] !== '#web+twister')
@ -1435,9 +1581,8 @@ function postSubmit(e, oldLastPostId) { @@ -1435,9 +1581,8 @@ function postSubmit(e, oldLastPostId) {
$(textArea[0]).remove();
oldLastPostId = lastPostId;
doSubmitPost(postText, postData);
setTimeout(postSubmit, 1000, btnPostSubmit, oldLastPostId);
setTimeout(postSubmit, 1000, btnPostSubmit, lastPostId);
return;
}
@ -1446,9 +1591,7 @@ function postSubmit(e, oldLastPostId) { @@ -1446,9 +1591,7 @@ function postSubmit(e, oldLastPostId) {
closePrompt();
else {
textArea.val('').attr('placeholder', polyglot.t('Your message was sent!'));
var tweetForm = btnPostSubmit.closest('form');
var remainingCount = tweetForm.find('.post-area-remaining');
remainingCount.text(140);
btnPostSubmit.closest('form').find('.post-area-remaining').text('140');
if (btnPostSubmit.closest('.post-area,.post-reply-content')) {
$('.post-area-new').removeClass('open').find('textarea').blur();
@ -1526,11 +1669,13 @@ function replaceDashboards() { @@ -1526,11 +1669,13 @@ function replaceDashboards() {
$('.userMenu').addClass('w1200');
$('.module.who-to-follow').detach().appendTo($('.dashboard.right'));
$('.module.twistday-reminder').detach().appendTo($('.dashboard.right'));
$('#modals-minimized').addClass('w1200');
} else if (width < 1200 && wrapper.hasClass('w1200')) {
wrapper.removeClass('w1200');
$('.userMenu').removeClass('w1200');
$('.module.who-to-follow').detach().insertAfter($('.module.mini-profile'));
$('.module.twistday-reminder').detach().insertAfter($('.module.toptrends'));
$('#modals-minimized').removeClass('w1200');
}
}
@ -1543,6 +1688,10 @@ function initInterfaceCommon() { @@ -1543,6 +1688,10 @@ function initInterfaceCommon() {
closeModal();
});
$('.minimize-modal').on('click', function (event) {
minimizeModal($(event.target).closest('.modal-wrapper'));
});
$('.modal-back').on('click', function() {history.back();});
$('.prompt-close').on('click', closePrompt);
@ -1593,7 +1742,7 @@ function initInterfaceCommon() { @@ -1593,7 +1742,7 @@ function initInterfaceCommon() {
$('#hashtag-modal-template .postboard-news').on('click', function () {
$(this).hide();
displayHashtagPending($('.hashtag-modal .postboard-posts'));
displayQueryPending($('.hashtag-modal .postboard-posts'));
});
replaceDashboards();
@ -1712,6 +1861,7 @@ $(document).ready(function() @@ -1712,6 +1861,7 @@ $(document).ready(function()
var page = path.split("/").pop();
if (page.indexOf("following.html") === 0) {
initInterfaceFollowing();
initHashWatching();
} else if (page.indexOf("login.html") === 0) {
initInterfaceLogin();
} else if (page.indexOf("network.html") === 0) {

1
js/interface_home.js

@ -69,6 +69,7 @@ var InterfaceFunctions = function() { @@ -69,6 +69,7 @@ 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") );
getAvatar(defaultScreenName, $('.userMenu-config .mini-profile-photo img'));
// add avatar in postboard-top
getAvatar( defaultScreenName, $("#postboard-top").find("img") );
getPostsCount( defaultScreenName, $miniProfile.find(".posts-count") );

235
js/interface_localization.js

@ -48,6 +48,11 @@ if(preferredLanguage == "en"){ @@ -48,6 +48,11 @@ if(preferredLanguage == "en"){
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"confirm_switch_to_network":
"Local daemon is not connected to the network or block chain is outdated.\n" +
"If you stay in this page your actions may not work.\n" +
"Do you want to check [Network Status page](%{page}) instead?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Change user": "Change user",
"Checking...": "Checking...", // checking if username is available
"Collapse": "Collapse", // smaller view of a post
@ -157,10 +162,6 @@ if(preferredLanguage == "en"){ @@ -157,10 +162,6 @@ if(preferredLanguage == "en"){
"Sent Direct Message": "Sent Direct Message",
"Sent Post to @": "Sent Post to @",
"Setup account": "Setup account",
"switch_to_network": "Local daemon is not connected to the network or\n" +
"block chain is outdated. If you stay in this page\n" +
"your actions may not work.\n" +
"Do you want to check Network Status page instead?",
"The File APIs are not fully supported in this browser.": "The File APIs are not fully supported in this browser.",
"time_ago": "%{time} ago", // 5 minutes ago
"Time of the last block:": "Time of the last block: ",
@ -314,7 +315,6 @@ if(preferredLanguage == "en"){ @@ -314,7 +315,6 @@ if(preferredLanguage == "en"){
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
"Secret Key": "Secret Key",
"Copy to clipboard": "Copy to clipboard",
@ -369,6 +369,11 @@ if(preferredLanguage == "es"){ @@ -369,6 +369,11 @@ if(preferredLanguage == "es"){
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"confirm_switch_to_network":
"Demonio local no está conectado a la red o la cadena de bloques no está actualizada.\n" +
"Si te quedas en esta página tus acciones pueden no funcionar.\n" +
"¿Quieres comprobar la [página de estado de la red](%{page}) en su lugar?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Change user": "Cambiar de usuario",
"Checking...": "Comprobando ...", // checking if username is available
"Collapse": "Colapsar", // smaller view of a post
@ -478,10 +483,6 @@ if(preferredLanguage == "es"){ @@ -478,10 +483,6 @@ if(preferredLanguage == "es"){
"Sent Direct Message": "Mensaje directo",
"Sent Post to @": "El Post enviado a @",
"Setup account": "Configuración de la cuenta",
"switch_to_network": "Demonio local no está conectado a la red o\n" +
"la cadena de bloques no está actualizada. Si te quedas en esta página\n" +
"tus acciones pueden no funcionar.\n" +
"¿Quieres comprobar la página de estado de la red en su lugar?",
"The File APIs are not fully supported in this browser.": "Las API de archivos no son totalmente compatibles con este navegador.",
"time_ago": "hace %{time}", // 5 minutes ago
"Time of the last block:": "Hora del último bloque: ",
@ -635,7 +636,6 @@ if(preferredLanguage == "es"){ @@ -635,7 +636,6 @@ if(preferredLanguage == "es"){
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "deshacer",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
"Secret Key": "Llave secreta",
"Copy to clipboard": "Copiar al portapapeles",
@ -674,6 +674,11 @@ if(preferredLanguage == "uk"){ @@ -674,6 +674,11 @@ if(preferredLanguage == "uk"){
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"confirm_switch_to_network":
"Локальний сервер не підєднаний до мережі або ланцюг блоків не актуальний.\n" +
"Якщо ви залишитесь на цій сторінці ваші дії можуть не спрацювати.\n" +
"Чи бажаєте ви перевірити [сторінку зі статусом мережі](%{page})?",
"confirm_terminate_daemon": "Ви впевнені, що бажаєте завершити роботу?\nКлієнт Twister буде зупинено допоки ви не запустите його знову.",
"Change user": "Змінити користувача",
"Checking...": "Перевірка...", // checking if username is available
"Collapse": "Згорнути", // smaller view of a post
@ -784,10 +789,6 @@ if(preferredLanguage == "uk"){ @@ -784,10 +789,6 @@ if(preferredLanguage == "uk"){
"Sent Direct Message": "Надіслати особисте повідомлення",
"Sent Post to @": "Надіслати твіст @",
"Setup account": "Обліковий запис",
"switch_to_network": "Локальний сервер не підєднаний до мережі або \n" +
"ланцюг блоків не актуальний. Якщо ви залишитесь на цій сторінці\n" +
"ваші дії можуть не спрацювати.\n" +
"Чи бажаєте ви перевірити сторінку зі статусом мережі?",
"The File APIs are not fully supported in this browser.": "File APIs не повністю підтримується браузером.",
"time_ago": "%{time} тому", // 5 minutes ago
"Time of the last block:": "Час останнього блоку: ",
@ -937,7 +938,6 @@ if(preferredLanguage == "uk"){ @@ -937,7 +938,6 @@ if(preferredLanguage == "uk"){
"post_rt_sign_prep": "ретвіст від",
"post_rt_time_prep": "at",
"undo": "відмінити",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Ви впевнені, що бажаєте завершити роботу? \n\nКлієнт Twister буде зупинено допоки ви не запустите його знову.",
"Daemon exited...": "Twister заверив роботу...",
"Secret Key": "Секретний ключ",
"Copy to clipboard": "Скопіювати до буферу",
@ -967,7 +967,7 @@ if(preferredLanguage == "zh-CN"){ @@ -967,7 +967,7 @@ if(preferredLanguage == "zh-CN"){
"All users publicly followed by": "公开关注的所有用户,被",
"Available": "可用", // username is available
"Appearance": "外观",
"Apply": "Apply",
"Apply": "应用",
"Block chain information": "区块链信息",
"Block chain is up-to-date, twister is ready to use!": "区块链已经更新,Twister 已经可以使用!",
"Block generation": "区块生成器",
@ -978,6 +978,11 @@ if(preferredLanguage == "zh-CN"){ @@ -978,6 +978,11 @@ if(preferredLanguage == "zh-CN"){
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"confirm_switch_to_network":
"本地的后台进程没有连接到网络,或者区块链已经过时。\n" +
"如果你留在此页面你的操作将不会生效。\n" +
"你要跳转到[网络状态页](%{page})吗?",
"confirm_terminate_daemon": "你确定要退出后台进程?\nTwister 客户端将停止工作。",
"Change user": "切换用户",
"Checking...": "检查中...", // checking if username is available
"Collapse": "折叠", // smaller view of a post
@ -1037,7 +1042,7 @@ if(preferredLanguage == "zh-CN"){ @@ -1037,7 +1042,7 @@ if(preferredLanguage == "zh-CN"){
"Join group": "Join group",
"Select group(s)": "Select group(s)",
"Create": "Create",
"Join": "Join",
"Join": "加入",
"Invite": "Invite",
"Invite peers": "Invite peers",
"Leave group": "Leave group",
@ -1087,10 +1092,6 @@ if(preferredLanguage == "zh-CN"){ @@ -1087,10 +1092,6 @@ if(preferredLanguage == "zh-CN"){
"Sent Direct Message": "发送私信",
"Sent Post to @": "发送推文 @",
"Setup account": "设置账号",
"switch_to_network": "本地的后台进程没有连接到网络,或者\n" +
"区块链已经过时。如果你留在此页面\n" +
"你的操作将不会生效\n" +
"你要跳转到网络状态页吗?",
"The File APIs are not fully supported in this browser.": "这个浏览器不能完全支持 File API。",
"time_ago": "%{time} 之前", // 5 minutes ago
"Time of the last block:": "最新区块的时间:",
@ -1133,8 +1134,8 @@ if(preferredLanguage == "zh-CN"){ @@ -1133,8 +1134,8 @@ if(preferredLanguage == "zh-CN"){
"Terminate Daemon:": "终止后台进程:",
"Exit": "退出",
"Save Changes": "保存更改",
"profile_saved": "Profile data has been saved to DHT.",
"profile_not_saved": "Profile data has been not saved.",
"profile_saved": "个人信息已经保存到 DHT。",
"profile_not_saved": "未保存个人信息。",
"Secret key:": "私钥:",
"You have to log in to post messages.": "你必须登录才能发送信息。",
"You have to log in to post replies.": "你必须登录才能发送回复。",
@ -1150,7 +1151,7 @@ if(preferredLanguage == "zh-CN"){ @@ -1150,7 +1151,7 @@ if(preferredLanguage == "zh-CN"){
"Switch to Normal posts": "切换到普通发送",
"Use language": "界面语言",
"Ignore": "忽略",
"Ignore and clear out": "Ignore and clear out",
"Ignore and clear out": "忽略并清除",
"Theme": "主题",
"Keys": "按键",
"Notifications": "通知",
@ -1161,11 +1162,11 @@ if(preferredLanguage == "zh-CN"){ @@ -1161,11 +1162,11 @@ if(preferredLanguage == "zh-CN"){
"Send key": "发送键",
"Posts display": "推文显示",
"Post editor": "信息编辑器",
"Post preview": "Post preview",
"Post preview": "推文预览",
"Inline image preview": "内嵌图像预览",
"Display": "显示",
"Line feeds": "Line feeds",
"Markout": "Markout markup",
"Line feeds": "换行",
"Markout": "Markout 标记语言",
"Supported punctuations:": "支持的标点符号:",
"Supported emotions:": "支持的表情符号:",
"Supported signs:": "支持的标记符号:",
@ -1243,7 +1244,6 @@ if(preferredLanguage == "zh-CN"){ @@ -1243,7 +1244,6 @@ if(preferredLanguage == "zh-CN"){
"post_rt_sign_prep": "转推由",
"post_rt_time_prep": "at",
"undo": "撤销",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "你确定要退出后台进程?\nTwister 客户端将停止工作。",
"Daemon exited...": "后台进程已退出...",
"Secret Key": "私钥",
"Copy to clipboard": "复制到剪贴板",
@ -1299,6 +1299,11 @@ if(preferredLanguage == "nl"){ @@ -1299,6 +1299,11 @@ if(preferredLanguage == "nl"){
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"confirm_switch_to_network":
"Local daemon is not connected to the network or block chain is outdated.\n" +
"If you stay in this page your actions may not work.\n" +
"Do you want to check [Network Status page](%{page}) instead?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Change user": "Gebruiker wijzigen",
"Checking...": "Controleren...", // checking if username is available
"Collapse": "Uitklappen", // smaller view of a post
@ -1408,10 +1413,6 @@ if(preferredLanguage == "nl"){ @@ -1408,10 +1413,6 @@ if(preferredLanguage == "nl"){
"Sent Direct Message": "Verstuur privébericht",
"Sent Post to @": "Verstuur bericht naar @",
"Setup account": "Account instellingen",
"switch_to_network": "Local daemon is not connected to the network or\n" +
"block chain is outdated. If you stay in this page\n" +
"your actions may not work.\n" +
"Do you want to check Network Status page instead?",
"The File APIs are not fully supported in this browser.": "The File APIs are not fully supported in this browser.",
"time_ago": "%{time} geleden", // 5 minutes ago
"Time of the last block:": "Tijd van de laatste block: ",
@ -1565,7 +1566,6 @@ if(preferredLanguage == "nl"){ @@ -1565,7 +1566,6 @@ if(preferredLanguage == "nl"){
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
"Secret Key": "Secret Key",
"Copy to clipboard": "Copy to clipboard",
@ -1604,6 +1604,11 @@ if(preferredLanguage == "it"){ @@ -1604,6 +1604,11 @@ if(preferredLanguage == "it"){
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"confirm_switch_to_network":
"Il servizio locale non è connesso alla rete Twister o la catena di blocchi è vecchia.\n" +
"Se rimani su questa pagina, Twister potrebbe non funzionare.\n" +
"Vuoi controllare lo [stato della rete Twister](%{page}), invece?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Change user": "Cambia utente",
"Checking...": "Controllo in corso...", // checking if username is available
"Collapse": "Chiudi", // smaller view of a post
@ -1713,9 +1718,6 @@ if(preferredLanguage == "it"){ @@ -1713,9 +1718,6 @@ if(preferredLanguage == "it"){
"Sent Direct Message": "Messaggi Diretti inviati",
"Sent Post to @": "Messaggi inviati a @",
"Setup account": "Configurazione Utente",
"switch_to_network": "Il servizio locale non è connesso alla rete Twister o la catena di blocchi è vecchia.\n" +
"Se rimani su questa pagina, Twister potrebbe non funzionare.\n" +
"Vuoi controllare lo stato della rete Twister, invece?",
"The File APIs are not fully supported in this browser.": "Le API File non sono interamente supportate da questo browser.",
"time_ago": "%{time} fa", // 5 minutes ago
"Time of the last block:": "Orario del blocco più recente: ",
@ -1867,7 +1869,6 @@ if(preferredLanguage == "it"){ @@ -1867,7 +1869,6 @@ if(preferredLanguage == "it"){
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
"Secret Key": "Secret Key",
"Copy to clipboard": "Copy to clipboard",
@ -1906,6 +1907,11 @@ if(preferredLanguage == "fr"){ @@ -1906,6 +1907,11 @@ if(preferredLanguage == "fr"){
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"confirm_switch_to_network":
"Le démon local n'est pas connecté au réseau ou la chaîne de blocs n'est pas à jour.\n" +
"Si vous restez dans cette page vos actions peuvent ne pas être prises en compte.\n" +
"Voulez-vous consulter la [page d'état du réseau](%{page}) à la place?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Change user": "Changer d'utilisateur",
"Checking...": "Vérification...", // checking if username is available
"Collapse": "Fermer", // smaller view of a post
@ -2015,10 +2021,6 @@ if(preferredLanguage == "fr"){ @@ -2015,10 +2021,6 @@ if(preferredLanguage == "fr"){
"Sent Direct Message": "Message privé envoyé",
"Sent Post to @": "Envoyer un billet à @",
"Setup account": "Configuration du compte",
"switch_to_network": "Le démon local n'est pas connecté au réseau ou\n" +
"la chaîne de blocs n'est pas à jour. Si vous restez dans cette page\n" +
"vos actions peuvent ne pas être prises en compte.\n" +
"Voulez-vous consulter la page d'état du réseau à la place ?",
"The File APIs are not fully supported in this browser.": "L'API de fichier n'est pas entièrement pris en charge dans votre navigateur.",
"time_ago": "Il y a %{time}", // 5 minutes ago
"Time of the last block:": "Heure du dernier bloc: ",
@ -2172,7 +2174,6 @@ if(preferredLanguage == "fr"){ @@ -2172,7 +2174,6 @@ if(preferredLanguage == "fr"){
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
"Secret Key": "Secret Key",
"Copy to clipboard": "Copy to clipboard",
@ -2213,6 +2214,11 @@ if(preferredLanguage == "ru"){ @@ -2213,6 +2214,11 @@ if(preferredLanguage == "ru"){
"Confirm": "Несомненно",
"сonfirm_group_leaving_header": "Подтверждение ухода из группы",
"сonfirm_group_leaving_body": "Воистину покинуть группу %{alias}?",
"confirm_switch_to_network":
"Локальный демон не подключен к сети или цепочка блоков устарела.\n" +
"Если вы останетесь на этой странице ваши действия могут быть не выполнены.\n" +
"Не хотите перейти на [страницу настройки сети](%{page})?",
"confirm_terminate_daemon": "Вы уверены, что хотите выключить демон?\nTwister клиент перестанет работать.",
"Change user": "Сменить пользователя",
"Checking...": "Проверка...",
"Collapse": "Свернуть",
@ -2322,10 +2328,6 @@ if(preferredLanguage == "ru"){ @@ -2322,10 +2328,6 @@ if(preferredLanguage == "ru"){
"Sent Direct Message": "Отправить личное сообщение",
"Sent Post to @": "Отправить сообщение для @",
"Setup account": "Настроить аккаунт",
"switch_to_network": "Локальный демон не подключен к сети или\n" +
"цепочка блоков устарела. Если вы останетесь на этой странице\n" +
"ваши действия могут быть не выполнены.\n" +
"Не хотите перейти на страницу настройки сети?",
"The File APIs are not fully supported in this browser.": "File APIs не полностью поддерживается этим браузером.",
"time_ago": "%{time} назад", // 5 minutes ago
"Time of the last block:": "Время последнего блока: ",
@ -2479,8 +2481,6 @@ if(preferredLanguage == "ru"){ @@ -2479,8 +2481,6 @@ if(preferredLanguage == "ru"){
"post_rt_sign_prep": "ретвистит",
"post_rt_time_prep": "в",
"undo": "отменить",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Вы уверены, что хотите "+
"выключить демон?\nTwister клиент перестанет работать.",
"Daemon exited...": "Демон twister выключен...",
"Secret Key": "Секретный ключ",
"Copy to clipboard": "Копировать в буфер обмена",
@ -2523,6 +2523,11 @@ if(preferredLanguage == "de"){ @@ -2523,6 +2523,11 @@ if(preferredLanguage == "de"){
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"confirm_switch_to_network":
"Lokaler daemon ist nicht mit dem Netzwerk verbunden oder Block-Chain ist veraltet.\n" +
"Wenn du auf dieser Seite bleibst können deine Handlungen nicht funktionieren.\n" +
"Möchtest du stattdessen den [Netzwerkstatus](%{page}) überprüfen?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Change user": "Benutzer wechseln",
"Checking...": "Überprüfe...", // checking if username is available
"Collapse": "Einklappen", // smaller view of a post
@ -2533,9 +2538,9 @@ if(preferredLanguage == "de"){ @@ -2533,9 +2538,9 @@ if(preferredLanguage == "de"){
"Detailed information": "Detaillierte Informationen",
"DHT network down.": "DHT-Netzwerk nicht verfügbar.",
"Direct Messages": "Direktnachrichten",
"Group Messages": "Group Messages",
"Group Messages — New Group Creation": "Group Messages — New Group Creation",
"Group Messages — Join Group": "Group Messages — Join Group",
"Group Messages": "Gruppennachrichten",
"Group Messages — New Group Creation": "Gruppennachrichten — Neue Gruppe erstellen",
"Group Messages — Join Group": "Gruppennachrichten — Gruppe beitreten",
"direct_messages_with": "Direktnachrichten mit %{username}",
"Disable": "Deaktivieren",
"Display mentions to @": "Zeige Erwähnungen von @", //Ist das richtig? Ich weiß nicht, in welchem Zusammenhang das benutzt wird.
@ -2594,7 +2599,7 @@ if(preferredLanguage == "de"){ @@ -2594,7 +2599,7 @@ if(preferredLanguage == "de"){
"new_posts": "%{smart_count} neuer Post |||| %{smart_count} neue Posts",
"new_mentions": "%{smart_count} neue Erwähnung |||| %{smart_count} neue Erwähnungen",
"new_direct_messages": "%{smart_count} neue Direktnachricht |||| %{smart_count} neue Direktnachrichten",
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"new_group_messages": "%{smart_count} neue Gruppen-Nachricht |||| %{smart_count} neue Gruppen-Nachrichten",
"nobody": "nobody", // used to promote a post without attaching the user
"Not available": "Nicht verfügbar", // username is not available
"notify_desktop_error": "Twister kann keine Desktop-Meldungen anzeigen: ein unbekannter Fehler trat auf.",
@ -2633,10 +2638,6 @@ if(preferredLanguage == "de"){ @@ -2633,10 +2638,6 @@ if(preferredLanguage == "de"){
"Sent Direct Message": "Direktnachricht senden",
"Sent Post to @": "Sende Post an @",
"Setup account": "Accounteinstellungen",
"switch_to_network": "Lokaler daemon ist nicht mit dem Netzwerk verbunden oder\n" +
"Block-Chain ist veraltet. Wenn du auf dieser Seite bleibst\n" +
"können deine Handlungen nicht funktionieren.\n" +
"Möchtest du stattdessen den Netzwerkstatus überprüfen?",
"The File APIs are not fully supported in this browser.": "Die File-API's werden von diesem Browser nicht vollständig unterstützt.",
"time_ago": "vor %{time}", // 5 minutes ago
"Time of the last block:": "Zeit des letzten Blocks: ",
@ -2791,7 +2792,6 @@ if(preferredLanguage == "de"){ @@ -2791,7 +2792,6 @@ if(preferredLanguage == "de"){
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
"Secret Key": "Secret Key",
"Copy to clipboard": "Copy to clipboard",
@ -2830,6 +2830,11 @@ if(preferredLanguage == "ja"){ @@ -2830,6 +2830,11 @@ if(preferredLanguage == "ja"){
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"confirm_switch_to_network":
"ローカルデーモンが切断しているか、ブロックチェーンが最新状態ではない。\n" +
"このページを使用しつづければ、あなたの変更が適用されないおそれがあります。\n" +
"[ネットワーク状態ペー](%{page})ジへ移動して確認しますか?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Change user": "ユーザーを変更",
"Checking...": "チェック...", // checking if username is available
"Collapse": "閉じる", // smaller view of a post
@ -2939,10 +2944,6 @@ if(preferredLanguage == "ja"){ @@ -2939,10 +2944,6 @@ if(preferredLanguage == "ja"){
"Sent Direct Message": "ダイレクトメッセージを送る",
"Sent Post to @": "メンションを投稿する",
"Setup account": "アカウント設定",
"switch_to_network": "ローカルデーモンが切断しているか、\n" +
"ブロックチェーンが最新状態ではない。このページを使用しつづければ、\n" +
"あなたの変更が適用されないおそれがあります。\n" +
"ネットワーク状態ページへ移動して確認しますか?",
"The File APIs are not fully supported in this browser.": "ご使用のブラウザーは完全にファイルAPIに対応していません。",
"time_ago": "%{time}前", // 5 minutes ago
"Time of the last block:": "最新ブロックの生成日時: ",
@ -3093,7 +3094,6 @@ if(preferredLanguage == "ja"){ @@ -3093,7 +3094,6 @@ if(preferredLanguage == "ja"){
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
"Secret Key": "Secret Key",
"Copy to clipboard": "Copy to clipboard",
@ -3133,6 +3133,11 @@ if(preferredLanguage == "pt-BR"){ @@ -3133,6 +3133,11 @@ if(preferredLanguage == "pt-BR"){
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"confirm_switch_to_network":
"O Cliente do Twister não está conectado à rede ou a cadeia de blocos está desatualizada.\n" +
"Se permanecer nesta página suas ações podem não ter efeito.\n" +
"Gostaria de verificar o [Estado da Rede](%{page}) ao invés disso?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Change user": "Trocar usuário",
"Checking...": "Verificando...", // checking if username is available
"Collapse": "Recolher", // smaller view of a post
@ -3243,10 +3248,6 @@ if(preferredLanguage == "pt-BR"){ @@ -3243,10 +3248,6 @@ if(preferredLanguage == "pt-BR"){
"Sent Direct Message": "Mensagens Diretas trocadas",
"Sent Post to @": "Postagens enviadas para @",
"Setup account": "Configurar conta",
"switch_to_network": "O Cliente do Twister não está conectado à rede ou\n" +
"a cadeia de blocos está desatualizada. Se permanecer \n" +
"nesta página suas ações podem não ter efeito.\n" +
"Gostaria de verificar o Estado da Rede ao invés disso?",
"The File APIs are not fully supported in this browser.": "O gerenciamento de arquivos não é completamente suportado neste navegador.",
"time_ago": "%{time} atrás", // 5 minutes ago
"Time of the last block:": "Horário do último bloco: ",
@ -3401,7 +3402,6 @@ if(preferredLanguage == "pt-BR"){ @@ -3401,7 +3402,6 @@ if(preferredLanguage == "pt-BR"){
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
"Secret Key": "Secret Key",
"Copy to clipboard": "Copy to clipboard",
@ -3428,18 +3428,23 @@ if(preferredLanguage == "tr"){ @@ -3428,18 +3428,23 @@ if(preferredLanguage == "tr"){
"ajax_error": "Ajax hatası: %{error}", // JavaScript error
"All users publicly followed by": "Açık olarak takip edilen tüm kullanıcılar",
"Available": "Kullanılabilir", // username is available
"Appearance": "Appearance",
"Apply": "Apply",
"Appearance": "Görünüm",
"Apply": "Uygula",
"Block chain information": "Blok zincir bilgisi",
"Block chain is up-to-date, twister is ready to use!": "Blok zinciri güncel, twister kullanıma hazır!",
"Block generation": "Blok üretimi ",
"busted_oh": "oh noes!",
"busted_avowal": "I\'m busted trying inject this suspicious stuff here",
"btn_ok": "Okay",
"busted_oh": "haydaaa!",
"busted_avowal": "Şüpheli bir şeyler iliştirmeye çalışırken enselendim.",
"btn_ok": "Tamam",
"Cancel": "İptal",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"Confirm": "Onayla",
"сonfirm_group_leaving_header": "Gruptan ayrılmayı onayla",
"сonfirm_group_leaving_body": "%{alias} grubundan ayrılmak istiyor musun?",
"confirm_switch_to_network":
"Yerel servis ağa bağlı değil ya da blok zinciri güncel değil.\n" +
"Eğer bu sayfada kalırsanız eylemlerinizi işlemeyebilir.\n" +
"Bunun yerine [Ağ Durumu sayfasını](%{page}) kontrol etmek ister misiniz?",
"confirm_terminate_daemon": "Hizmeti sonlandırmak istiyor musun?\nTwister istemcisi çalışmayacak.",
"Change user": "Kullanıcı değiştir",
"Checking...": "Denetleniyor...", // checking if username is available
"Collapse": "Kapat", // smaller view of a post
@ -3450,9 +3455,9 @@ if(preferredLanguage == "tr"){ @@ -3450,9 +3455,9 @@ if(preferredLanguage == "tr"){
"Detailed information": "Detaylı bilgi",
"DHT network down.": "DHT ağı çalışmıyor.",
"Direct Messages": "Direk Mesajlar",
"Group Messages": "Group Messages",
"Group Messages — New Group Creation": "Group Messages — New Group Creation",
"Group Messages — Join Group": "Group Messages — Join Group",
"Group Messages": "Grup Mesajları",
"Group Messages — New Group Creation": "Grup Mesajları — Yeni Grup Oluştur",
"Group Messages — Join Group": "Grup Mesajları — Gruba katıl",
"direct_messages_with": "%{username} ile Direk Mesajlar",
"Disable": "Kullanılmaz",
"Display mentions to @": "@ adının geçtiği gönderiler",
@ -3470,8 +3475,8 @@ if(preferredLanguage == "tr"){ @@ -3470,8 +3475,8 @@ if(preferredLanguage == "tr"){
"Favorite": "Favori",
"File APIs not supported in this browser.": "Tarayıcınızda dosya API'si desteklenmiyor.",
"Follow": "Takip et",
"Following config": "Following config",
"Which way do you want to follow": "Which way do you want to follow",
"Following config": "Takip ayarları",
"Which way do you want to follow": "Nasıl takip etmek istiyorsun",
"Followed by": "Takip edenler",
"followed_by": "%{username} tarafından takip edilenler",
"Followers": "Takipçiler",
@ -3493,33 +3498,33 @@ if(preferredLanguage == "tr"){ @@ -3493,33 +3498,33 @@ if(preferredLanguage == "tr"){
"Network status": "Ağ durumu",
"New direct message...": "Yeni direk mesaj...",
"New Post...": "Yeni gönderi...",
"New group": "New group",
"Group description": "Group description",
"Peers to invite": "Peers to invite",
"Join group": "Join group",
"Select group(s)": "Select group(s)",
"Create": "Create",
"Join": "Join",
"Invite": "Invite",
"Invite peers": "Invite peers",
"Leave group": "Leave group",
"You got": "You got",
"in postboard": "in postboard",
"in search result": "in search result",
"in top trends": "in top trends",
"New group": "Yeni grup",
"Group description": "Grup açıklaması",
"Peers to invite": "Davet edilecek eşler",
"Join group": "Gruba katıl",
"Select group(s)": "Grup(ları) seç",
"Create": "Oluştur",
"Join": "Katıl",
"Invite": "Davet et",
"Invite peers": "Eşleri davet et",
"Leave group": "Gruptan ayrıl",
"You got": "Oldu",
"in postboard": "gönederilerde",
"in search result": "arama sonuçlarında",
"in top trends": "gündemde",
"new_posts": "%{smart_count} yeni gönederi |||| %{smart_count} yeni gönderi",
"new_mentions": "%{smart_count} new mention |||| %{smart_count} new mentions",
"new_direct_messages": "%{smart_count} new direct message |||| %{smart_count} new direct messages",
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"new_mentions": "%{smart_count} yeni bahseden |||| %{smart_count} yeni bahseden",
"new_direct_messages": "%{smart_count} yeni direk mesaj |||| %{smart_count} yeni direk mesaj",
"new_group_messages": "%{smart_count} yeni grup mesajı |||| %{smart_count} yeni grup mesajı",
"nobody": "hiçkimse", // used to promote a post without attaching the user
"Not available": "Kullanılamaz", // username is not available
"notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.",
"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_test": "All the twisters gonna twist.\nNow you are welcome too.",
"notify_desktop_title": "Watch out, it's twister over here!",
"post_preview_dummy": 'here is *bold*, ~italic~, -strike-trough- and _underlined_ text.\n'
+ 'same but escaped: `*bold*, ~italic~, -strike-trough- and _underlined_`.\n'
+ 'links to [our awesome logo](%{logo}) and our gorgeous site: %{site}.',
"notify_desktop_error": "Twister masaüstü uyarısını gösterimiyor: bilimeyen bir hata oluştu.",
"notify_desktop_perm_denied": "Twister masaüstü uyarısını gösteremiyor: yetkilendirme hatası.\n\nUyarıları almak istiyorsanız, tarayıcı ayarlarında %{this_domain} alan adı için izin veriniz.",
"notify_desktop_test": "Kasırga her yanı saracak\nBu karnavala hoşgeldin!",
"notify_desktop_title": "İyi bak, twister her yerde!",
"post_preview_dummy": 'işte *kalın*, ~yatık~, -üstü-çizik- ve _alt çizgili_ yazı.\n'
+ 'düz hali: `*kalın*, ~yatık~, -üstü-çizik- ve _alt çizgili_`.\n'
+ '[güzel logomuz](%{logo})\'un ve harika sitemizin: %{site} bağlantıları.',
"Number of blocks in block chain:": "Blok zincirindeki blok sayısı: ",
"Number of CPUs to use": "Kullanılacak CPU sayısı ",
"Only alphanumeric and underscore allowed.": "Sadece harf ve alt çizgi kullanılabilir.",
@ -3540,8 +3545,8 @@ if(preferredLanguage == "tr"){ @@ -3540,8 +3545,8 @@ if(preferredLanguage == "tr"){
"Retransmit": "Tekar ilet",
"Retransmits": "Tekrar iletenler",
"Retransmitted by": "Tekrar ileten",
"Switch to Reply": "Switch to Reply",
"Switch to Retransmit": "Switch to Retransmit",
"Switch to Reply": "'Yanıt' ara yüzü...",
"Switch to Retransmit": "'Yeniden ilet' ara yüzü",
"search": "ara",
"seconds": "%{smart_count} saniye |||| %{smart_count} saniye",
"send": "gönder",
@ -3549,10 +3554,6 @@ if(preferredLanguage == "tr"){ @@ -3549,10 +3554,6 @@ if(preferredLanguage == "tr"){
"Sent Direct Message": "Direk Mesaj Gönder",
"Sent Post to @": "@ Kullanıcıya Gönder",
"Setup account": "Hesap ayarları",
"switch_to_network": "Yerel servis ağa bağlı değil ya da\n" +
"blok zinciri güncel değil. Eğer bu sayfada kalırsanız\n" +
"eylemlerinizi işlemeyebilir.\n" +
"Bunun yerine Ağ Durumu sayfasını kontrol etmek ister misiniz?",
"The File APIs are not fully supported in this browser.": "Dosya API'si tarayıcınızda tam olarak desteklenmiyor.",
"time_ago": "%{time} önce", // 5 minutes ago
"Time of the last block:": "Son blok saati: ",
@ -3603,7 +3604,7 @@ if(preferredLanguage == "tr"){ @@ -3603,7 +3604,7 @@ if(preferredLanguage == "tr"){
"Switch to Normal posts": "Normal Mesajlara Geç",
"Use language": "Dil ayarla",
"Ignore": "Görmezden gel",
"Ignore and clear out": "Ignore and clear out",
"Ignore and clear out": "Görmezden gel ve temizle",
"Theme": "Tema",
"Keys": "Tuşlar",
"Notifications": "Uyarılar",
@ -3680,7 +3681,7 @@ if(preferredLanguage == "tr"){ @@ -3680,7 +3681,7 @@ if(preferredLanguage == "tr"){
"its this, blacklisted": "%{this}, engellendi",
"its this, whitelisted": "%{this}, kabul edildi",
"Most possible language: this": "Muhtemel dil: %{this}",
"Scope of usage": "Scope of usage",
"Scope of usage": "Kullanım alanı",
"Show with every user name": "Tüm kullanıcı adlarının yanında göster",
"Show at profile modal only": "Sadece profilinde göster",
"Show if a user follows me": "Bir kullanıcının beni takip edip etmediğini göster",
@ -3705,7 +3706,6 @@ if(preferredLanguage == "tr"){ @@ -3705,7 +3706,6 @@ if(preferredLanguage == "tr"){
"post_rt_sign_prep": "yeniden ileten",
"post_rt_time_prep": "at",
"undo": "geri al",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Hizmeti sonlandırmak istiyor musun?\nTwister istemcisi çalışmayacak.",
"Daemon exited...": "Hizmet sonlandırıldı...",
"Secret Key": "Gizli Anahtar",
"Copy to clipboard": "Panoya kopyala",
@ -3744,6 +3744,11 @@ if(preferredLanguage == "cs"){ @@ -3744,6 +3744,11 @@ if(preferredLanguage == "cs"){
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
"сonfirm_group_leaving_body": "Are you sure want to leave %{alias} group?",
"confirm_switch_to_network":
"Váš lokální server ještě není připojen k síti, nebo teprve stahuje aktuální blockchain.\n" +
"Pokud zůstanete na této stránce, vaše akce možná nebudou fungovat.\n" +
"Chcete se místo toho podívat na [stav sítě](%{page})?",
"confirm_terminate_daemon": "Skutečně chcete ukončit server?\nTwister tím vypnete.",
"Change user": "Změnit uživatele",
"Checking...": "Ověřuji...", // checking if username is available
"Collapse": "Složit", // smaller view of a post
@ -3854,9 +3859,6 @@ if(preferredLanguage == "cs"){ @@ -3854,9 +3859,6 @@ if(preferredLanguage == "cs"){
"Sent Direct Message": "Poslat přímou zprávu",
"Sent Post to @": "Poslat veřejný příspěvek pro @",
"Setup account": "Upravit profil",
"switch_to_network": "Váš lokální server ještě není připojen k síti, nebo teprve stahuje\n" +
"aktuální blockchain. Pokud zůstanete na této stránce, vaše akce možná\n" +
"nebudou fungovat. Chcete se místo toho podívat na stav sítě?",
"The File APIs are not fully supported in this browser.": "Upozornění: váš webový prohlížeč nepodporuje File API.",
"time_ago": "před %{time}", // 5 minutes ago
"Time of the last block:": "Čas posledního bloku: ",
@ -4008,7 +4010,6 @@ if(preferredLanguage == "cs"){ @@ -4008,7 +4010,6 @@ if(preferredLanguage == "cs"){
"post_rt_sign_prep": "přeposlal(a)",
"post_rt_time_prep": "at",
"undo": "zpět",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Skutečně chcete ukončit server?\nTwister tím vypnete.",
"Daemon exited...": "Server ukončen...",
"Secret Key": "Tajný klíč",
"Copy to clipboard": "Kopírovat do clipboardu",

82
js/mobile_abstract.js

@ -27,7 +27,7 @@ var MAL = function() @@ -27,7 +27,7 @@ var MAL = function()
installPostboardClick();
} else {
$(".postboard-loading").hide();
$(".postboard-loading").hide(); // FIXME need to decide which one we need to hide actually
}
}
@ -104,9 +104,15 @@ var MAL = function() @@ -104,9 +104,15 @@ var MAL = function()
newTweetsBarMenu.addClass("show");
if ($.Options.showDesktopNotifPosts.val === 'enable') {
this.showDesktopNotif(false, polyglot.t('You got')+' '+polyglot.t('new_posts', newPosts)+' '+polyglot.t('in postboard')+'.', false,'twister_notification_new_posts', $.Options.showDesktopNotifPostsTimer.val, (function() {
requestTimelineUpdate('pending',this,followingUsers,promotedPostsOnly);
}).bind(newPosts), false)
this.showDesktopNotification({
body: polyglot.t('You got') + ' ' + polyglot.t('new_posts', newPosts) + ' '
+ polyglot.t('in postboard') + '.',
tag: 'twister_notification_new_posts',
timeout: $.Options.showDesktopNotifPostsTimer.val,
funcClick: (function() {
requestTimelineUpdate('pending', this.postsCount, followingUsers, promotedPostsOnly);
}).bind({postsCount: newPosts})
});
}
} else {
newTweetsBar.hide();
@ -343,6 +349,8 @@ var MAL = function() @@ -343,6 +349,8 @@ var MAL = function()
}
this.showDMchat = function(req) {
if (typeof req !== 'object')
req = {};
if (req.alias) {
if ($.hasOwnProperty('mobile')) {
$.mobile.navigate(this.dmchatUrl(req.alias));
@ -430,44 +438,36 @@ var MAL = function() @@ -430,44 +438,36 @@ var MAL = function()
}
};
this.showDesktopNotif = function(notifyTitle, notifyBody, notifyIcon, notifyTag, notifyTimer, actionOnClick, actionOnPermDenied) {
function doNotification() {
if (!notifyTitle) {
notifyTitle = polyglot.t('notify_desktop_title');
}
if (!notifyIcon) {
notifyIcon = '../img/twister_mini.png';
}
if (!notifyTag) {
notifyTag = 'twister_notification';
}
if (!notifyTimer) {
notifyTimer = 3600 * 24 * 30; // one month
}
var doActionOnClick = false;
if (typeof actionOnClick === 'function') {
doActionOnClick = function() {
actionOnClick();
window.focus();
}
}
var desktopNotification = new Notify(notifyTitle, {
body: notifyBody,
icon: notifyIcon,
tag: notifyTag,
timeout: notifyTimer,
notifyClick: doActionOnClick,
notifyError: function() { alert(polyglot.t('notify_desktop_error')) }
});
desktopNotification.show();
}
this.showDesktopNotification = function(req) {
if (Notify.needsPermission) {
Notify.requestPermission(false, actionOnPermDenied);
} else {
doNotification();
}
Notify.requestPermission(false, req.funcPermDenied);
return;
}
if (!req.title)
req.title = polyglot.t('notify_desktop_title');
if (!req.icon)
req.icon = '../img/twister_mini.png';
if (!req.tag)
req.tag = 'twister_notification';
if (!req.timeout)
req.timeout = 2592000; // 60 * 60 * 24 * 30, one month
if (typeof req.funcClick === 'function')
req.funcClick = (function() {window.focus(); this.funcClick();})
.bind({funcClick: req.funcClick});
else
req.funcClick = function() {window.focus();}
var desktopNotification = new Notify(req.title, {
body: req.body,
icon: req.icon,
tag: req.tag,
timeout: req.timeout,
notifyClick: req.funcClick,
notifyError: function() {alert(polyglot.t('notify_desktop_error'));}
});
desktopNotification.show();
};
this.reqRepAfterCB = function(postLi, postsFromJson) {

10
js/options.js

@ -310,8 +310,14 @@ twisterOptions.prototype.initControls = function () { @@ -310,8 +310,14 @@ twisterOptions.prototype.initControls = function () {
}
}
$('#testDesktopNotif').on('click', function() {
$.MAL.showDesktopNotif(false, polyglot.t('notify_desktop_test'), false,'twister_notification_test', false, false, function() { alert(polyglot.t('notify_desktop_perm_denied', {'this_domain': document.domain})) })
$('#testDesktopNotif').on('click', function () {
$.MAL.showDesktopNotification({
body: polyglot.t('notify_desktop_test'),
tag: 'twister_notification_test',
funcClick: function () {
alert(polyglot.t('notify_desktop_perm_denied', {'this_domain': document.domain}));
}
});
});
tickOptionsPostPreview();

37
js/tmobile.js

@ -538,22 +538,27 @@ function encode_utf8(s) { @@ -538,22 +538,27 @@ function encode_utf8(s) {
return s;
}
var hashtag_elem;
var hashtag_tag;
var hashtag_res;
function setupHashtagOrMention( ulElem, tag, res) {
hashtag_elem = ulElem;
hashtag_tag = tag;
hashtag_res = res;
hashtag_elem.text("");
var tmobileQueryReq = {}; // FIXME need to rework all that searching
function setupHashtagOrMention(postboard, tag, res) {
$.MAL.setPostTemplate( $("#post-template-home") );
$.mobile.showPageLoadingMsg();
clearHashtagProcessed();
if( tag == defaultScreenName && res == "mention" ) {
var reqId = tag + '@' + res;
clearQueryProcessed(reqId);
tmobileQueryReq.postboard = postboard.text('').attr('data-request-id', reqId);
tmobileQueryReq.query = tag;
tmobileQueryReq.resource = res;
if (tag === defaultScreenName && res === 'mention') {
// obtain already cached mention posts from twister_newmsgs.js
processHashtag(hashtag_elem, defaultScreenName, getMentionsData() );
tmobileQueryReq.posts = getMentionsData();
processQuery(tmobileQueryReq);
}
requestHashtag(hashtag_elem,hashtag_tag,hashtag_res);
requestQuery(tmobileQueryReq);
}
// every 2 seconds do something page specific.
@ -575,10 +580,12 @@ function tmobileTick() { @@ -575,10 +580,12 @@ function tmobileTick() {
}
}, {} );
}
if( curPage == "mentions" || curPage == "hashtag" ) {
autoUpdateHashtag = true;
requestHashtag(hashtag_elem,hashtag_tag,hashtag_res);
else if (curPage === 'mentions' || curPage === 'hashtag') {
autoUpdateQuery = true;
requestQuery(tmobileQueryReq);
}
if( curPage == "dmchat" ) {
requestDmConversation($("#dmchat ul.direct-messages-list"),dmChatUser);
}

138
js/twister_actions.js

@ -12,10 +12,9 @@ @@ -12,10 +12,9 @@
var postsPerRefresh = 10;
var maxExpandPost = 8;
var maxExpandPostTop = 4;
var _hashtagProcessedMap = {};
var _hashtagPendingPosts = [];
var _hashtagPendingPostsUpdated = 0;
var autoUpdateHashtag = false;
var _queryProcessedMap = {};
var _queryPendingPosts = {};
var autoUpdateQuery = false;
// ----------------
@ -159,6 +158,12 @@ function requestRTs(postLi) @@ -159,6 +158,12 @@ function requestRTs(postLi)
function appendPostToContainer(postFromJson, containerToAppend)
{
// posts without 'msg' may be used for metadata like 'url'
// and are not meant to be displayed.
if (typeof(postFromJson['userpost']['msg']) === 'undefined' &&
typeof(postFromJson['userpost']['rt']) === 'undefined' )
return;
var newStreamPost = postToElem(postFromJson, "original");
newStreamPost.hide();
containerToAppend.append( newStreamPost );
@ -365,63 +370,98 @@ function updateProfilePosts(postsView, username, useGetposts) { @@ -365,63 +370,98 @@ function updateProfilePosts(postsView, username, useGetposts) {
});
}
function clearHashtagProcessed() {
_hashtagProcessedMap = {};
_hashtagPendingPosts = [];
function clearQueryProcessed(id) {
if (!id) return;
_queryProcessedMap[id] = {};
_queryPendingPosts[id] = [];
}
function requestHashtag(postboard, hashtag, resource, timeoutArgs) {
postboard.closest("div").find(".postboard-loading").show();
dhtget(hashtag, resource, "m",
function(args, data) {processHashtag(args.postboard, args.hashtag, data);},
{postboard:postboard,hashtag:hashtag},
timeoutArgs
function requestQuery(req) {
req.postboard.closest('div').find('.postboard-loading').show();
dhtget(req.query, req.resource, 'm',
function(req, posts) {
req.posts = posts;
processQuery(req);
},
req,
req.timeoutArgs
);
}
function processHashtag(postboard, hashtag, data) {
if( data && window.location.hash.indexOf(encodeURIComponent(hashtag)) != -1 ) {
for( var i = data.length-1; i >= 0; i-- ) {
var userpost = data[i]["userpost"];
var key = userpost["n"] + ";" + userpost["time"];
if( !(key in _hashtagProcessedMap) ) {
_hashtagProcessedMap[key] = true;
if ($.Options.filterLang.val !== 'disable' && $.Options.filterLangForSearching.val) {
if (typeof(userpost['rt']) !== 'undefined') {
var msg = userpost['rt']['msg'];
} else {
var msg = userpost['msg'];
}
langFilterData = filterLang(msg);
if ($.Options.filterLangSimulate.val) {
data[i]['langFilter'] = langFilterData;
} else {
if (!langFilterData['pass'])
continue;
}
}
function processQuery(req) {
if (!isModalWithElemExists(req.postboard) || !req.posts || !req.posts.length)
return;
_hashtagPendingPosts.push(data[i]);
_hashtagPendingPostsUpdated++;
if (!req.id)
req.id = req.query + '@' + req.resource;
if (typeof _queryProcessedMap[req.id] !== 'object')
_queryProcessedMap[req.id] = {};
if (typeof _queryPendingPosts[req.id] !== 'object')
_queryPendingPosts[req.id] = [];
for (var i = req.posts.length - 1; i >= 0; i--) {
var userpost = req.posts[i].userpost;
var key = userpost.n + ';' + userpost.time;
if (!_queryProcessedMap[req.id][key]) {
_queryProcessedMap[req.id][key] = true;
if ($.Options.filterLang.val !== 'disable' && $.Options.filterLangForSearching.val) {
if (typeof userpost.rt !== 'undefined') {
var msg = userpost.rt.msg;
} else {
var msg = userpost.msg;
}
langFilterData = filterLang(msg);
if ($.Options.filterLangSimulate.val) {
req.posts[i].langFilter = langFilterData;
} else {
if (!langFilterData.pass)
continue;
}
}
_queryPendingPosts[req.id].push(req.posts[i]);
}
}
if( _hashtagPendingPosts.length ) {
if( !postboard.children().length || autoUpdateHashtag ) {
displayHashtagPending(postboard);
} else {
var newTweetsBar = postboard.closest("div").find(".postboard-news");
newTweetsBar.text(polyglot.t("new_posts", _hashtagPendingPosts.length));
newTweetsBar.fadeIn("slow");
postboard.closest("div").find(".postboard-loading").hide();
}
if (_queryPendingPosts[req.id].length) {
if (!$.hasOwnProperty('mobile') && $.Options.showDesktopNotifPostsModal.val === 'enable'
&& (req.resource !== 'mention' || req.query !== defaultScreenName)) {
$.MAL.showDesktopNotification({
body: polyglot.t('You got') + ' ' + polyglot.t('new_posts', _queryPendingPosts[req.id].length) + ' '
+ polyglot.t('in search result') + '.',
tag: 'twister_notification_new_posts_modal',
timeout: $.Options.showDesktopNotifPostsModalTimer.val,
funcClick: (function() {
focusModalWithElement(this.postboard,
function (req) {
req.postboard.closest('.postboard').find('.postboard-news').hide();
displayQueryPending(req.postboard);
}, {postboard: this.postboard}
);
}).bind({postboard: req.postboard})
});
}
if (!req.postboard.children().length || autoUpdateQuery) {
displayQueryPending(req.postboard);
} else {
req.postboard.closest('div').find('.postboard-news') // FIXME we'd replace 'div' with '.postboard' but need to dig through tmobile first
.text(polyglot.t('new_posts', _queryPendingPosts[req.id].length))
.fadeIn('slow')
;
req.postboard.closest('div').find('.postboard-loading').hide();
}
}
}
function displayHashtagPending(postboard) {
attachPostsToStream(postboard, _hashtagPendingPosts, false);
function displayQueryPending(postboard) {
var reqId = postboard.attr('data-request-id');
attachPostsToStream(postboard, _queryPendingPosts[reqId], false);
_queryPendingPosts[reqId] = [];
$.MAL.postboardLoaded();
_hashtagPendingPosts = [];
}

134
js/twister_directmsg.js

@ -8,9 +8,9 @@ var _groupMsgInviteToGroupQueue = []; @@ -8,9 +8,9 @@ var _groupMsgInviteToGroupQueue = [];
function requestDMsnippetList(dmThreadList, forGroup) {
var followList = [];
for (var i = 0; i < followingUsers.length; i++)
followList.push({username:followingUsers[i]});
followList.push({username: followingUsers[i]});
for (var i = 0; i < groupChatAliases.length; i++)
followList.push({username:groupChatAliases[i]});
followList.push({username: groupChatAliases[i]});
twisterRpc('getdirectmsgs', [defaultScreenName, 1, followList],
function(req, ret) {processDMsnippet(ret, req.dmThreadList, req.forGroup);},
@ -49,53 +49,95 @@ function processDMsnippet(dmUsers, dmThreadList, forGroup) { @@ -49,53 +49,95 @@ function processDMsnippet(dmUsers, dmThreadList, forGroup) {
$.MAL.dmThreadListLoaded();
}
function requestDmConversationModal(postboard, dm_screenname) {
if (postboard.is('html *')) {
requestDmConversation(postboard, dm_screenname);
setTimeout(requestDmConversationModal, 1000, postboard, dm_screenname);
}
function requestDmConversationModal(postboard, peerAlias) {
if (!isModalWithElemExists(postboard))
return;
requestDmConversation(postboard, peerAlias);
setTimeout(requestDmConversationModal, 1000, postboard, peerAlias);
}
function requestDmConversation(postboard, dm_screenname) {
function requestDmConversation(postboard, peerAlias) {
var since_id = undefined;
var oldItems = postboard.children();
if (oldItems.length)
since_id = parseInt(oldItems.eq(oldItems.length - 1).attr('data-id'));
var userDmReq = [{username: dm_screenname}];
var userDmReq = [{username: peerAlias}];
if (typeof since_id !== 'undefined')
userDmReq[0].since_id = since_id;
var count = 100;
twisterRpc('getdirectmsgs', [defaultScreenName, count, userDmReq],
function(args, ret) {processDmConversation(args.postboard, args.dm_screenname, ret);},
{postboard: postboard, dm_screenname: dm_screenname},
function(arg, ret) {
function(req, ret) {processDmConversation(req.postboard, req.peerAlias, ret);},
{postboard: postboard, peerAlias: peerAlias},
function(req, ret) {
var msg = (ret.message) ? ret.message : ret;
alert(polyglot.t('ajax_error', {error: msg}));
}, null
}
);
}
function processDmConversation(postboard, dm_screenname, dmData) {
var lastId = undefined;
function processDmConversation(stream, peerAlias, posts) {
if (!isModalWithElemExists(stream))
return;
var streamItems = stream.children();
var streamPostsIDs = [];
var newPosts = 0;
if (dmData[dm_screenname]) {
var dmList = dmData[dm_screenname];
if (dmList.length) {
for (var i = 0; i < dmList.length; i++) {
var dmItem = postToElemDM(dmList[i], defaultScreenName, dm_screenname)
.attr('data-id', dmList[i].id)
.appendTo(postboard)
for (var i = 0; i < streamItems.length; i++) {
streamPostsIDs.push(parseInt(streamItems.eq(i).attr('data-id')));
}
if (posts[peerAlias] && posts[peerAlias].length) {
for (var i = 0; i < posts[peerAlias].length; i++) {
if (streamPostsIDs.indexOf(posts[peerAlias][i].id) === -1) {
var lastPostID = posts[peerAlias][i].id;
newPosts++;
postToElemDM(posts[peerAlias][i], defaultScreenName, peerAlias)
.attr('data-id', lastPostID)
.appendTo(stream)
;
lastId = dmList[i].id;
streamPostsIDs.push(lastPostID);
}
$.MAL.dmChatListLoaded(postboard);
}
$.MAL.dmChatListLoaded(stream);
}
if (newPosts) {
resetNewDMsCountForUser(peerAlias, lastPostID);
if (getHashOfMinimizedModalWithElem(stream)) {
$.MAL.soundNotifyDM();
_newDMsPerUser[peerAlias] += newPosts;
if (peerAlias[0] === '*')
$.MAL.updateNewGroupDMsUI(getNewGroupDMsCount());
else
$.MAL.updateNewDMsUI(getNewDMsCount());
if (!$.hasOwnProperty('mobile') && $.Options.showDesktopNotifDMs.val === 'enable')
$.MAL.showDesktopNotification({
body: peerAlias[0] === '*' ?
polyglot.t('You got') + ' ' + polyglot.t('new_group_messages', newPosts) + '.'
: polyglot.t('You got') + ' ' + polyglot.t('new_direct_messages', newPosts) + '.',
tag: 'twister_notification_new_DMs',
timeout: $.Options.showDesktopNotifDMsTimer.val,
funcClick: (function() {
focusModalWithElement(this.postboard,
function (peerAlias) {
_newDMsPerUser[peerAlias] = 0;
if (peerAlias[0] === '*')
$.MAL.updateNewGroupDMsUI(getNewGroupDMsCount());
else
$.MAL.updateNewDMsUI(getNewDMsCount());
}, this.peerAlias);
}).bind({postboard: stream, peerAlias: peerAlias})
});
// TODO here we need to set new DMs counter on minimized modal button
}
}
if (typeof lastId !== 'undefined')
resetNewDMsCountForUser(dm_screenname, lastId);
}
function directMsgSubmit(e) {
@ -111,25 +153,25 @@ function directMsgSubmit(e) { @@ -111,25 +153,25 @@ function directMsgSubmit(e) {
replyText.val('');
}
function newDirectMsg(msg, dm_screenname) {
function newDirectMsg(msg, peerAlias) {
if (typeof lastPostId !== 'undefined') {
var paramsOrig = [defaultScreenName, lastPostId + 1, dm_screenname, msg];
var paramsOrig = [defaultScreenName, lastPostId + 1, peerAlias, msg];
var paramsOpt = paramsOrig;
var copySelf = $.Options.dmCopySelf.val === 'enable';
if (copySelf && dm_screenname[0] !== '*')
if (copySelf && peerAlias[0] !== '*')
paramsOpt = paramsOrig.concat(true)
twisterRpc('newdirectmsg', paramsOpt,
function(arg, ret) {
function(req, ret) {
incLastPostId();
if (arg.copySelf)
if (req.copySelf)
incLastPostId();
}, {copySelf: copySelf},
function(arg, ret) {
function(req, ret) {
// fallback for older twisterd (error: no copy_self parameter)
twisterRpc('newdirectmsg', arg.paramsOrig,
function(arg, ret) {incLastPostId();}, null,
function(arg, ret) {
twisterRpc('newdirectmsg', req.paramsOrig,
function(req, ret) {incLastPostId();}, null,
function(req, ret) {
var msg = (ret.message) ? ret.message : ret;
alert('Ajax error: ' + msg);
}, null
@ -169,7 +211,7 @@ function directMessagesPopup() { @@ -169,7 +211,7 @@ function directMessagesPopup() {
;
}
function openDmWithUserModal(dm_screenname) {
function openDmWithUserModal(peerAlias) {
if (!defaultScreenName) {
alert(polyglot.t('You have to log in to use direct messages.'));
return;
@ -178,17 +220,17 @@ function openDmWithUserModal(dm_screenname) { @@ -178,17 +220,17 @@ function openDmWithUserModal(dm_screenname) {
var modal = openModal({
classAdd: 'directMessages',
content: $('.messages-thread-template').children().clone(true),
title: polyglot.t('direct_messages_with', {username: '<span>' + dm_screenname + '</span>'})
title: polyglot.t('direct_messages_with', {username: '<span>' + peerAlias + '</span>'})
});
modal.self.attr('data-screen-name', dm_screenname);
modal.self.attr('data-screen-name', peerAlias);
if (dm_screenname.length && dm_screenname[0] === '*')
getGroupChatName(dm_screenname, modal.self.find('.modal-header h3 span'));
if (peerAlias.length && peerAlias[0] === '*')
getGroupChatName(peerAlias, modal.self.find('.modal-header h3 span'));
else
getFullname(dm_screenname, modal.self.find('.modal-header h3 span'));
getFullname(peerAlias, modal.self.find('.modal-header h3 span'));
requestDmConversationModal(modal.self.find('.direct-messages-thread').empty(), dm_screenname);
requestDmConversationModal(modal.self.find('.direct-messages-thread').empty(), peerAlias);
$('.dm-form-template').children().clone(true)
.addClass('open').appendTo(modal.content).fadeIn('fast');
@ -350,7 +392,7 @@ function openGroupMessagesJoinGroupModal() { @@ -350,7 +392,7 @@ function openGroupMessagesJoinGroupModal() {
}, {groupAlias: groupAlias},
function(req, ret) {
alert(polyglot.t('Error in \'importprivkey\'', {rpc: ret.message}));
}, null
}
);
});
}
@ -365,7 +407,7 @@ function groupMsgCreateGroup(description, peersToInvite) { @@ -365,7 +407,7 @@ function groupMsgCreateGroup(description, peersToInvite) {
}, peersToInvite,
function(req, ret) {
alert(polyglot.t('error', {error: 'can\'t create group — ' + ret.message}));
}, null
}
);
}
@ -444,9 +486,7 @@ function groupMsgInviteFormInputSetTextcompleteReq() { @@ -444,9 +486,7 @@ function groupMsgInviteFormInputSetTextcompleteReq() {
}));
},
index: 1,
replace: function (mention) {
return '@'+mention+' ';
}
replace: function (mention) {return '@' + mention + ' ';}
}]
}

7
js/twister_following.js

@ -835,12 +835,9 @@ function initInterfaceFollowing() { @@ -835,12 +835,9 @@ function initInterfaceFollowing() {
}
var InterfaceFunctions = function()
{
this.init = function()
{
var InterfaceFunctions = function () {
this.init = function () {
initUser(initFollowing_);
initHashWatching();
};
function initFollowing_(cbFunc, cbArg) {

51
js/twister_formatpost.js

@ -311,9 +311,8 @@ function postToElemDM(dmData, localUser, remoteUser) { @@ -311,9 +311,8 @@ function postToElemDM(dmData, localUser, remoteUser) {
}
// convert message text to html, featuring @users and links formating.
function htmlFormatMsg(msg) {
function htmlFormatMsg(msg, opt) {
// TODO: add options for emotions; msg = $.emotions(msg);
// TODO make markup optionally mutable ?
function getSubStrStart(str, startPoint, stopChars, isStopCharMustExist, stopCharsTrailing) {
for (var i = startPoint; i > -1; i--) {
@ -349,8 +348,8 @@ function htmlFormatMsg(msg) { @@ -349,8 +348,8 @@ function htmlFormatMsg(msg) {
return i;
}
function markout(msg, chr, tag) {
if ($.Options.postsMarkout.val === 'ignore')
function markout(msg, markoutOpt, chr, tag) {
if (markoutOpt === 'ignore')
return msg;
function isWhiteSpacesBetween(i, j) {
@ -516,7 +515,7 @@ function htmlFormatMsg(msg) { @@ -516,7 +515,7 @@ function htmlFormatMsg(msg) {
}
// changing the string
if (chr === '`' && $.Options.postsMarkout.val === 'apply') { // if $.Options.postsMarkout.val === 'clear' then ` does not escapes anythyng so it needs to be handled like other tags
if (chr === '`' && markoutOpt === 'apply') { // if markoutOpt === 'clear' then ` does not escape anythyng so it needs to be handled like other tags
for (i = 0; i < p.length; i++) {
if (p[i].a > -1) {
if (p[i].t === -1 || (p[i].t === 0 && p[i].a > i)) {
@ -540,10 +539,10 @@ function htmlFormatMsg(msg) { @@ -540,10 +539,10 @@ function htmlFormatMsg(msg) {
}
}
} else {
if ($.Options.postsMarkout.val === 'apply') {
if (markoutOpt === 'apply') {
t = '</' + tag + '>';
tag = '<' + tag + '>';
} else { // $.Options.postsMarkout.val === 'clear' so we're clearing markup
} else { // markoutOpt === 'clear' so we're clearing markup
t = '';
tag = '';
}
@ -611,6 +610,11 @@ function htmlFormatMsg(msg) { @@ -611,6 +610,11 @@ function htmlFormatMsg(msg) {
return {html: '', mentions: []};
}
if (opt && opt.markout)
var markoutOpt = opt.markout;
else
var markoutOpt = $.Options.postsMarkout.val;
var mentionsChars = 'abcdefghijklmnopqrstuvwxyz_0123456789';
var stopCharsTrailing = '/\\*~_-`.,:;?!%\'"[](){}^|«»…\u201C\u201D\u2026\u2014\u4E00\u3002\uFF0C\uFF1A\uFF1F\uFF01\u3010\u3011\u2047\u2048\u2049';
var stopCharsTrailingUrl = stopCharsTrailing.slice(1);
@ -626,11 +630,11 @@ function htmlFormatMsg(msg) { @@ -626,11 +630,11 @@ function htmlFormatMsg(msg) {
msg = {str: escapeHtmlEntities(msg), htmlEntities: []};
msg = markout(msg, '`', 'samp'); // <samp> tag is kind of monospace, here sequence of chars inside it will be escaped from markup
msg = markout(msg, markoutOpt, '`', 'samp'); // <samp> tag is kind of monospace, here sequence of chars inside it will be escaped from markup
// handling links
for (i = 0; i < msg.str.length - 7; i++) {
if (msg.str.slice(i, i + 2) === '](' && $.Options.postsMarkout.val !== 'ignore') {
if (msg.str.slice(i, i + 2) === '](' && markoutOpt !== 'ignore') {
// FIXME there can be text with [] inside [] or links with () we need to handle it too
j = getSubStrStart(msg.str, i - 2, '[', true, '');
if (j < i - 1) {
@ -658,31 +662,31 @@ function htmlFormatMsg(msg) { @@ -658,31 +662,31 @@ function htmlFormatMsg(msg) {
} else {
if (getSubStrEnd(msg.str, i + 1, whiteSpacesUrl, false, '') < k) // use only first word as href target, others drop silently
k = getSubStrEnd(msg.str, i + 1, whiteSpacesUrl, false, '');
if ($.Options.postsMarkout.val === 'apply') {
if (markoutOpt === 'apply') {
msg = msgAddHtmlEntity(msg, j - 1, getSubStrEnd(msg.str, k + 1, ')', true, '') + 2,
newHtmlEntityLink(_htmlFormatMsgLinkTemplateExternal,
proxyURL(msg.str.slice(i, k + 1)),
applyHtml( // we're trying markup inside [] of []()
markout(markout(markout(markout(
{str: linkName, htmlEntities: msg.htmlEntities},
'*', 'b'), // bold
'~', 'i'), // italic
'_', 'u'), // underlined
'-', 's') // striketrough
markoutOpt, '*', 'b'), // bold
markoutOpt, '~', 'i'), // italic
markoutOpt, '_', 'u'), // underlined
markoutOpt, '-', 's') // striketrough
)
.replace(/&(?!lt;|gt;)/g, '&amp;')
)
);
} else { // $.Options.postsMarkout.val === 'clear' so we're clearing markup
} else { // markoutOpt === 'clear' so we're clearing markup
str = msg.str.slice(i, k + 1);
msg = msgAddHtmlEntity(msg, j - 1, getSubStrEnd(msg.str, k + 1, ')', true, '') + 2,
applyHtml( // we're trying to clear markup inside [] of []()
markout(markout(markout(markout(
{str: linkName, htmlEntities: msg.htmlEntities},
'*', 'b'), // bold
'~', 'i'), // italic
'_', 'u'), // underlined
'-', 's') // striketrough
markoutOpt, '*', 'b'), // bold
markoutOpt, '~', 'i'), // italic
markoutOpt, '_', 'u'), // underlined
markoutOpt, '-', 's') // striketrough
)
.replace(/&(?!lt;|gt;)/g, '&amp;')
);
@ -778,10 +782,10 @@ function htmlFormatMsg(msg) { @@ -778,10 +782,10 @@ function htmlFormatMsg(msg) {
// handling text style markup
msg = markout(markout(markout(markout(msg,
'*', 'b'), // bold
'~', 'i'), // italic
'_', 'u'), // underlined
'-', 's') // striketrough
markoutOpt, '*', 'b'), // bold
markoutOpt, '~', 'i'), // italic
markoutOpt, '_', 'u'), // underlined
markoutOpt, '-', 's') // striketrough
;
// handling splitted posts numbering and escaping ampersands, qoutes and apostrophes
@ -794,6 +798,7 @@ function htmlFormatMsg(msg) { @@ -794,6 +798,7 @@ function htmlFormatMsg(msg) {
.replace(/&(?!lt;|gt;)/g, '&amp;') // FIXME in many cases there is no need to escape ampersand in HTML 5
.replace(/"/g, '&quot;')
.replace(/'/g, '&apos;')
;
// applying html entities to msg.str and converting msg to string back
msg = applyHtml(msg);

4
js/twister_io.js

@ -335,7 +335,11 @@ function _putResourceIntoStorage(locator, data) { @@ -335,7 +335,11 @@ function _putResourceIntoStorage(locator, data) {
}
// get avatar and set it in img.attr("src")
// TODO rename to getAvatarImgToELem(), move nin theme related stuff to nin's theme_option.js
function getAvatar( username, img ){
if (!img.length)
return;
if (username === 'nobody') {
img.attr('src', ($.Options.theme.val === 'nin') ?
'theme_nin/img/tornado_avatar.png' : 'img/tornado_avatar.png');

30
js/twister_network.js

@ -23,11 +23,11 @@ function formatDecimal(value) { @@ -23,11 +23,11 @@ function formatDecimal(value) {
return Math.round(value * scale) / scale;
}
function formatSize(value) {
if (value<1024) return value + ' b';
if (value<1024*1024) return formatDecimal(value/1024) + ' Kb';
if (value<1024*1024*1024) return formatDecimal(value/(1024*1024)) + ' Mb';
if (value<1024*1024*1024*1024) return formatDecimal(value/(1024*1024*1024)) + ' Gb';
return formatDecimal(value/(1024*1024*1024*1024)) + ' Tb';
if (value<1024) return value + ' B';
if (value<1024*1024) return formatDecimal(value/1024) + ' KB';
if (value<1024*1024*1024) return formatDecimal(value/(1024*1024)) + ' MB';
if (value<1024*1024*1024*1024) return formatDecimal(value/(1024*1024*1024)) + ' GB';
return formatDecimal(value/(1024*1024*1024*1024)) + ' TB';
}
function formatSpeed(total, rate) {
return formatSize(total) + ' @ ' + formatSize(rate) + '/s'
@ -53,6 +53,20 @@ function requestNetInfo(cbFunc, cbArg) { @@ -53,6 +53,20 @@ function requestNetInfo(cbFunc, cbArg) {
$(".userMenu-dhtindicator a").text(twisterDhtNodes);
$(".version").text(twisterDisplayVersion);
if( ret.proxy !== undefined && ret.proxy.length ) {
$(".proxy").text(ret.proxy);
$(".using-proxy").show();
$(".not-using-proxy").hide();
} else {
$(".ext-ip").text(ret.ext_addr_net1);
$(".ext-port1").text(ret.ext_port1);
$(".ext-port2").text(ret.ext_port2);
$(".test-ext-port1").attr("href","http://www.yougetsignal.com/tools/open-ports/?port=" + ret.ext_port1);
$(".test-ext-port2").attr("href","http://www.yougetsignal.com/tools/open-ports/?port=" + ret.ext_port2);
$(".using-proxy").hide();
$(".not-using-proxy").show();
}
$(".dht-torrents").text(ret.dht_torrents);
$(".num-peers").text(ret.num_peers);
$(".peerlist-size").text(ret.peerlist_size);
@ -261,7 +275,6 @@ function setSpamMsg(event) { @@ -261,7 +275,6 @@ function setSpamMsg(event) {
}
function exitDaemon() {
if (confirm(polyglot.t("Are you sure you want to exit the daemon?\nThe Twister client will stop working."))) {
$( ".terminate-daemon").text("Exiting...");
$( ".terminate-daemon").addClass("disabled");
$.MAL.disableButton( $( ".terminate-daemon") );
@ -277,8 +290,6 @@ function exitDaemon() { @@ -277,8 +290,6 @@ function exitDaemon() {
function(args, ret) {
console.log("error while exiting daemon");
}, {});
}
}
// handlers common to both desktop and mobile
@ -292,7 +303,8 @@ function interfaceNetworkHandlers() { @@ -292,7 +303,8 @@ function interfaceNetworkHandlers() {
$('.network .post-area-new').off('click').on('click',
function (e) {e.stopPropagation(); $(this).addClass('open'); usePostSpliting = false;});
$('.post-submit.update-spam-msg').off('click').on('click', setSpamMsg);
$( ".terminate-daemon").bind( "click", exitDaemon )
$('.terminate-daemon').on('click',
{messageTxt: polyglot.t('confirm_terminate_daemon'), confirmFunc: exitDaemon}, confirmPopup);
}

52
js/twister_newmsgs.js

@ -29,6 +29,11 @@ function processMention(user, mentionTime, data) { @@ -29,6 +29,11 @@ function processMention(user, mentionTime, data) {
_newMentionsUpdated = true;
_lastMentionTime = Math.max(mentionTime, _lastMentionTime);
data.isNew = true;
var reqId = defaultScreenName + '@mention';
if (typeof _queryPendingPosts[reqId] !== 'object')
_queryPendingPosts[reqId] = [];
_queryPendingPosts[reqId].push(data);
}
_knownMentions[key] = {mentionTime: mentionTime, data: data};
purgeOldMentions();
@ -103,8 +108,25 @@ function requestMentionsCount() { @@ -103,8 +108,25 @@ function requestMentionsCount() {
if (_newMentions) {
$.MAL.soundNotifyMentions();
if ($.Options.showDesktopNotifMentions.val === 'enable')
$.MAL.showDesktopNotif(false, polyglot.t('You got')+' '+polyglot.t('new_mentions', _newMentions)+'.', false,'twister_notification_new_mentions', $.Options.showDesktopNotifMentionsTimer.val, function(){$.MAL.showMentions(defaultScreenName)}, false)
if (!$.hasOwnProperty('mobile') && $.Options.showDesktopNotifMentions.val === 'enable')
$.MAL.showDesktopNotification({
body: polyglot.t('You got') + ' ' + polyglot.t('new_mentions', _newMentions) + '.',
tag: 'twister_notification_new_mentions',
timeout: $.Options.showDesktopNotifMentionsTimer.val,
funcClick: function () {
var postboardSelector =
'.postboard-posts[data-request-id="' + defaultScreenName + '@mention"]';
if (!focusModalWithElement(postboardSelector,
function (req) {
var postboard = $(req.postboardSelector);
postboard.closest('.postboard').find('.postboard-news').hide();
displayQueryPending(postboard);
resetMentionsCount();
}, {postboardSelector: postboardSelector}
))
$.MAL.showMentions(defaultScreenName);
}
});
}
}
@ -117,24 +139,26 @@ function requestMentionsCount() { @@ -117,24 +139,26 @@ function requestMentionsCount() {
if (newDMs) {
$.MAL.soundNotifyDM();
if ($.Options.showDesktopNotifDMs.val === 'enable') {
$.MAL.showDesktopNotif(false,
polyglot.t('You got') + ' ' + polyglot.t('new_direct_messages', newDMs) + '.',
false, 'twister_notification_new_DMs', $.Options.showDesktopNotifDMsTimer.val,
function () {$.MAL.showDMchat();}, false
);
if (!$.hasOwnProperty('mobile') && $.Options.showDesktopNotifDMs.val === 'enable') {
$.MAL.showDesktopNotification({
body: polyglot.t('You got') + ' ' + polyglot.t('new_direct_messages', newDMs) + '.',
tag: 'twister_notification_new_DMs',
timeout: $.Options.showDesktopNotifDMsTimer.val,
funcClick: function () {$.MAL.showDMchat();}
});
}
}
var newDMs = getNewGroupDMsCount();
if (newDMs) {
$.MAL.soundNotifyDM();
if ($.Options.showDesktopNotifDMs.val === 'enable') {
$.MAL.showDesktopNotif(false,
polyglot.t('You got') + ' ' + polyglot.t('new_group_messages', newDMs) + '.',
false, 'twister_notification_new_DMs', $.Options.showDesktopNotifDMsTimer.val,
function () {$.MAL.showDMchat({group: true});}, false
);
if (!$.hasOwnProperty('mobile') && $.Options.showDesktopNotifDMs.val === 'enable') {
$.MAL.showDesktopNotification({
body: polyglot.t('You got') + ' ' + polyglot.t('new_group_messages', newDMs) + '.',
tag: 'twister_notification_new_DMs',
timeout: $.Options.showDesktopNotifDMsTimer.val,
funcClick: function () {$.MAL.showDMchat({group: true});}
});
}
}
}

8
js/twister_timeline.js

@ -226,7 +226,7 @@ function attachPostsToStream(stream, posts, isPromoted) { @@ -226,7 +226,7 @@ function attachPostsToStream(stream, posts, isPromoted) {
}
if (!isAttached) {
intrantPost.item.appendTo(stream).show();
streamPosts.unshift(intrantPost);
streamPosts.push(intrantPost);
}
}
}
@ -347,6 +347,12 @@ function timelineChangedUser() @@ -347,6 +347,12 @@ function timelineChangedUser()
}
function willBeHidden(post){
// posts without 'msg' may be used for metadata like 'url'
// and are not meant to be displayed.
if (typeof(post['userpost']['msg']) === 'undefined' &&
typeof(post['userpost']['rt']) === 'undefined' )
return true;
if (post['userpost']['n'] === defaultScreenName)
return false;

38
network.html

@ -90,6 +90,28 @@ @@ -90,6 +90,28 @@
<label>Active DHT nodes: </label>
<span class="dht-nodes">0</span>
</li>
<li class="not-using-proxy" style="display:none;">
<label>External IP: </label>
<span class="ext-ip"></span>
</li>
<li class="not-using-proxy" style="display:none;">
<label>External Port 1 (TCP): </label>
<span class="ext-port1"></span>
<a class="test-ext-port1" target="_blank">
<button>Test open port (external site)</button>
</a>
</li>
<li class="not-using-proxy" style="display:none;">
<label>External Port 2 (TCP+UDP): </label>
<span class="ext-port2"></span>
<a class="test-ext-port2" target="_blank">
<button>Test open port (external site)</button>
</a>
</li>
<li class="using-proxy" style="display:none;">
<label>Proxy: </label>
<span class="proxy"></span>
</li>
<li>
<label>Force connection to peer:</label>
<input class="new-peer-addr" type="textbox" placeholder="peer address" size="20"/>
@ -235,6 +257,22 @@ @@ -235,6 +257,22 @@
<a id="external-page-link-template" rel="nofollow" target="_blank"></a>
<!-- template for user links in message (open profile modal) -->
<a id="hashtag-link-template" class="open-hashtag-modal"></a>
<div class="prompt-wrapper">
<div class="modal-header">
<h3></h3>
<span class="modal-close prompt-close">&times;</span>
</div>
<div class="modal-content"></div>
</div>
<div id="confirm-popup-template">
<div class="message"></div>
<div class="modal-buttons">
<button class="confirm"></button>
<button class="cancel"></button>
</div>
</div>
</div>
<audio id="player"></audio>

87
theme_calm/css/style.css

@ -500,6 +500,39 @@ input.userMenu-search-field:focus::-ms-input-placeholder { @@ -500,6 +500,39 @@ input.userMenu-search-field:focus::-ms-input-placeholder {
margin: 4px 0 0 -5px;
}
#modals-minimized {
background-color: rgba(0, 0, 0, 0);
z-index: 9000;
position: fixed;
bottom: 0;
left: 50%;
width: 900px;
height: 24px;
overflow: auto;
margin-left: -450px;
padding: 0 4%;
}
#modals-minimized.w1200 {
width: 1200px;
margin-left: -600px;
}
#modals-minimized li {
display: inline-block;
opacity: .88;
font-size: 10px;
color: #FFF;
background-color: #7691CE;
margin: 0 2px;
padding: 4px 8px;
}
#modals-minimized li:hover {
opacity: 1;
cursor: pointer;
}
/*******************************************************
****************** CONFIG SUBMENU & SEARCH RESULTS *****
*******************************************************/
@ -531,30 +564,26 @@ input.userMenu-search-field:focus::-ms-input-placeholder { @@ -531,30 +564,26 @@ input.userMenu-search-field:focus::-ms-input-placeholder {
right: auto;
left: 80px;
}
.direct-messages,
.dropdown-menu-item
{
.dropdown-menu-item {
display: block;
padding: 10px;
font-size: 12px;
border-top: solid 1px rgba( 69, 71, 77, .1 );
color: rgba( 0, 0, 0, .7 );
}
.dropdown-menu-item, .dropdown-menu-item:hover {
text-decoration: none;
}
.dropdown-menu-item:hover {
background: #45474d;
color: #fff;
}
.direct-messages:hover,
.dropdown-menu-item:hover,
.userMenu-search-sugestions a:hover,
.userMenu-search-profiles li:hover a
{
background: #45474d;
color: #fff;
.userMenu-search-profiles li:hover a {
background: #45474D;
color: #FFF;
}
.userMenu-search-profiles li:hover span
{
color: #fff;
@ -1313,6 +1342,7 @@ textarea.splited-post { @@ -1313,6 +1342,7 @@ textarea.splited-post {
}
/* external http links */
.confirm-popup .message a,
.post-text a {
font: italic 13px "Open Sans", sans-serif;
text-decoration: none;
@ -1324,11 +1354,13 @@ textarea.splited-post { @@ -1324,11 +1354,13 @@ textarea.splited-post {
transition: all 200ms;
}
.confirm-popup .message a:hover,
.post-text a:hover {
color: #e18881;
opacity: .8;
}
.confirm-popup .message a[href^="http"]:after,
.post-text a[href^="http"]:after {
content: '';
display: inline-block;
@ -1347,10 +1379,12 @@ textarea.splited-post { @@ -1347,10 +1379,12 @@ textarea.splited-post {
transition: all 200ms;
}
.confirm-popup .message a[href^="http"]:hover:after,
.post-text a[href^="http"]:hover:after {
opacity: .8;
}
.confirm-popup .message a[href^="#profile"],
.post-text a[href^="#profile"], .follow-suggestions a[href^="#profile"] {
color: #5e8da4;
text-decoration: none;
@ -1361,6 +1395,7 @@ textarea.splited-post { @@ -1361,6 +1395,7 @@ textarea.splited-post {
transition: all 200ms;
}
.confirm-popup .message a[href^="#profile"]:hover,
.post-text a[href^="#profile"]:hover, .follow-suggestions a[href^="#profile"]:hover {
color: #76b2ce;
}
@ -1369,6 +1404,7 @@ textarea.splited-post { @@ -1369,6 +1404,7 @@ textarea.splited-post {
font-size: 11px;
}
.confirm-popup .message a[href^="#hashtag"],
.toptrends-list a[href^="#hashtag"], .post-text a[href^="#hashtag"] {
color: #5e72a4;
text-decoration: none;
@ -1379,6 +1415,7 @@ textarea.splited-post { @@ -1379,6 +1415,7 @@ textarea.splited-post {
transition: all 200ms;
}
.confirm-popup .message a[href^="#hashtag"]:hover,
.toptrends-list a[href^="#hashtag"]:hover, .post-text a[href^="#hashtag"]:hover {
color: #768fce;
}
@ -1868,7 +1905,7 @@ textarea.splited-post { @@ -1868,7 +1905,7 @@ textarea.splited-post {
height: 100%;
}
.modal-close {
.modal-close, .minimize-modal {
position: absolute;
right: 0;
top: 0;
@ -1880,15 +1917,19 @@ textarea.splited-post { @@ -1880,15 +1917,19 @@ textarea.splited-post {
transition: all .1s linear;
}
.modal-close:hover {
.modal-close:hover, .minimize-modal:hover {
color: #fff;
background: rgba( 0, 0, 0, .1 );
}
.minimize-modal {
right: 30px;
}
.modal-back,
.mark-all-as-read {
position: absolute;
right: 30px;
right: 60px;
top: 0;
padding: 1px 10px;
cursor: pointer;
@ -1905,6 +1946,14 @@ textarea.splited-post { @@ -1905,6 +1946,14 @@ textarea.splited-post {
background: rgba( 0, 0, 0, .1 );
}
.mark-all-as-read {
right: 90px;
}
.mark-all-as-read:before {
content: '\2714';
}
.modal-wrapper.reply .post {
background: #ececed;
padding: 10px 15px;
@ -2020,14 +2069,6 @@ textarea.splited-post { @@ -2020,14 +2069,6 @@ textarea.splited-post {
background: none;
}
.mark-all-as-read {
right: 60px;
}
.mark-all-as-read:before {
content: '\2714';
}
/*************************************
****** GM NEW GROUP SETUP MODAL ******
**************************************/

43
theme_nin/css/style.css

@ -1892,6 +1892,34 @@ button:disabled:hover, button.disabled:hover, .mini-profile-actions span.disable @@ -1892,6 +1892,34 @@ button:disabled:hover, button.disabled:hover, .mini-profile-actions span.disable
margin-left: 880px;
}
#modals-minimized {
background-color: rgba(0, 0, 0, 0);
z-index: 9000;
position: fixed;
bottom: 0;
left: 50%;
width: 1180px;
height: 24px;
overflow: auto;
margin-left: -590px;
padding: 0 4%;
}
#modals-minimized li {
display: inline-block;
opacity: .88;
font-size: 10px;
color: #FFF;
background-color: #66686B;
margin: 0 2px;
padding: 4px 8px;
}
#modals-minimized li:hover {
opacity: 1;
cursor: pointer;
}
/********** CONFIG SUBMENU & SEARCH RESULTS *********** */
/* line 76, ../sass/style.sass */
@ -2706,7 +2734,7 @@ ol.toptrends-list a:hover { @@ -2706,7 +2734,7 @@ ol.toptrends-list a:hover {
}
/* line 629, ../sass/style.sass */
.modal-close {
.modal-close, .minimize-modal {
position: absolute;
right: 10px;
top: 0;
@ -2716,7 +2744,7 @@ ol.toptrends-list a:hover { @@ -2716,7 +2744,7 @@ ol.toptrends-list a:hover {
color: rgba(255, 255, 255, 0.7);
}
/* line 639, ../sass/style.sass */
.modal-close:hover {
.modal-close:hover, .minimize-modal:hover {
color: white;
}
/* line 641, ../sass/style.sass */
@ -2724,6 +2752,10 @@ ol.toptrends-list a:hover { @@ -2724,6 +2752,10 @@ ol.toptrends-list a:hover {
display: none;
}
.minimize-modal {
right: 35px;
}
/* line 644, ../sass/style.sass */
.mark-all-as-read {
float: left;
@ -2744,7 +2776,7 @@ ol.toptrends-list a:hover { @@ -2744,7 +2776,7 @@ ol.toptrends-list a:hover {
/* line 662, ../sass/style.sass */
.modal-back {
position: absolute;
right: 35px;
right: 70px;
top: 0;
font-size: 14px;
line-height: 40px;
@ -3489,6 +3521,11 @@ ul.dropdown-menu .active, ul.dropdown-menu .active a { @@ -3489,6 +3521,11 @@ ul.dropdown-menu .active, ul.dropdown-menu .active a {
float: left;
font-size: 80%;
}
#modals-minimized {
width: 900px;
margin-left: -450px;
}
}
@media (max-width: 900px) {
/* line 21, ../sass/_responsive.sass */

4
theme_nin/sass/_responsive.sass

@ -15,6 +15,10 @@ @@ -15,6 +15,10 @@
float: left
font-size: 80%
#modals-minimized
width: 900px
margin-left: -450px
@media (max-width: 900px)
.profile-modal .modal-wrapper
margin-left: 0

24
theme_nin/sass/style.sass

@ -65,6 +65,30 @@ @@ -65,6 +65,30 @@
margin-left: 880px;
@extend .clear-fix
#modals-minimized
background-color: rgba(0, 0, 0, 0)
z-index: 9000
position: fixed
bottom: 0
left: 50%
width: $site-width
height: 24px
overflow: auto
margin-left: $site-width/2
padding: 0 4%
li
display: inline-block
opacity: .88
font-size: 10px
color: #FFF
background-color: #66686B
margin: 0 2px
padding: 4px 8px
&:hover
opacity: 1
cursor: pointer
/********** CONFIG SUBMENU & SEARCH RESULTS ************/

Loading…
Cancel
Save