From 8abbdeb3c0a6a34754411452ae832d2f19cef7ab Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 2 Feb 2016 16:25:07 +0100 Subject: [PATCH] blocks you tooltip --- QvitterPlugin.php | 10 +++++++--- css/qvitter.css | 9 +++++++++ js/dom-functions.js | 25 ++++++++++++++++--------- locale/ar.json | 3 ++- locale/ast.json | 3 ++- locale/ca.json | 3 ++- locale/de.json | 3 ++- locale/en.json | 3 ++- locale/eo.json | 3 ++- locale/es.json | 3 ++- locale/es_ahorita.json | 3 ++- locale/eu.json | 3 ++- locale/fa.json | 3 ++- locale/fi.json | 3 ++- locale/fr.json | 3 ++- locale/gl.json | 3 ++- locale/he.json | 3 ++- locale/io.json | 3 ++- locale/it.json | 3 ++- locale/ja.json | 3 ++- locale/nl.json | 3 ++- locale/no.json | 3 ++- locale/pt.json | 3 ++- locale/pt_br.json | 3 ++- locale/ru.json | 3 ++- locale/sq.json | 3 ++- locale/sv.json | 3 ++- locale/zh_cn.json | 3 ++- locale/zh_tw.json | 3 ++- 29 files changed, 84 insertions(+), 38 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 114172c..4b4986c 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -773,10 +773,14 @@ class QvitterPlugin extends Plugin { $twitter_user['profile_background_color'] = Profile_prefs::getConfigData($profile, 'theme', 'backgroundcolor'); $twitter_user['profile_banner_url'] = Profile_prefs::getConfigData($profile, 'qvitter', 'cover_photo'); - // follows me? + if ($scoped) { - $twitter_user['follows_you'] = $profile->isSubscribed($scoped); - } + // follows me? + $twitter_user['follows_you'] = $profile->isSubscribed($scoped); + + // blocks me? + $twitter_user['blocks_you'] = $profile->hasBlocked($scoped); + } // local user? $twitter_user['is_local'] = $profile->isLocal(); diff --git a/css/qvitter.css b/css/qvitter.css index 9dc7b1b..3223dc1 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -4335,6 +4335,15 @@ button.shorten:not(.disabled):active { display:none; } +.user-actions .blocks-you::before { + content:"\f05e"; + color: #aaa; + cursor:default; + font-family: FontAwesome; + font-size: 20px; + line-height: 32px; + margin-right: 5px; +} diff --git a/js/dom-functions.js b/js/dom-functions.js index 9c6d8c1..d7f2cbb 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -311,15 +311,22 @@ function buildFollowBlockbutton(obj) { if(typeof window.loggedIn.screen_name != 'undefined' // if logged in && window.loggedIn.id != obj.id) { // not if this is me if(!(obj.statusnet_profile_url.indexOf('/twitter.com/')>-1 && obj.following === false)) { // only unfollow twitter users - var followButton = '
\ - \ -
'; + if(obj.blocks_you) { + var followButton = '
\ +
\ +
'; + } + else { + var followButton = '
\ + \ +
'; + } } } diff --git a/locale/ar.json b/locale/ar.json index 74a39a6..4d17ca9 100644 --- a/locale/ar.json +++ b/locale/ar.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/ast.json b/locale/ast.json index 35fbbe6..453b49f 100644 --- a/locale/ast.json +++ b/locale/ast.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/ca.json b/locale/ca.json index f7eeb2d..f778b37 100644 --- a/locale/ca.json +++ b/locale/ca.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/de.json b/locale/de.json index cca048e..43a9769 100644 --- a/locale/de.json +++ b/locale/de.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/en.json b/locale/en.json index cf0a1fd..9d546fe 100644 --- a/locale/en.json +++ b/locale/en.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/eo.json b/locale/eo.json index 0dcf414..7eb8c5b 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/es.json b/locale/es.json index f2c195e..df61d68 100644 --- a/locale/es.json +++ b/locale/es.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/es_ahorita.json b/locale/es_ahorita.json index 42e3c7b..c83203a 100644 --- a/locale/es_ahorita.json +++ b/locale/es_ahorita.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/eu.json b/locale/eu.json index ed32efa..e269780 100644 --- a/locale/eu.json +++ b/locale/eu.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/fa.json b/locale/fa.json index 05521d7..bbfcff3 100644 --- a/locale/fa.json +++ b/locale/fa.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/fi.json b/locale/fi.json index a808a6a..5f72f35 100644 --- a/locale/fi.json +++ b/locale/fi.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/fr.json b/locale/fr.json index 5d6eb51..f564a4e 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/gl.json b/locale/gl.json index 85458c1..d092e18 100644 --- a/locale/gl.json +++ b/locale/gl.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/he.json b/locale/he.json index 982dc70..cffad42 100644 --- a/locale/he.json +++ b/locale/he.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/io.json b/locale/io.json index f2ef44f..157989a 100644 --- a/locale/io.json +++ b/locale/io.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/it.json b/locale/it.json index 022ffcb..39a0793 100644 --- a/locale/it.json +++ b/locale/it.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/ja.json b/locale/ja.json index 4bc3f17..27c3e72 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/nl.json b/locale/nl.json index 8f2f289..17481ef 100644 --- a/locale/nl.json +++ b/locale/nl.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/no.json b/locale/no.json index 0623b49..de76dae 100644 --- a/locale/no.json +++ b/locale/no.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/pt.json b/locale/pt.json index f6a8955..b801895 100644 --- a/locale/pt.json +++ b/locale/pt.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/pt_br.json b/locale/pt_br.json index 11b4029..58cff8b 100644 --- a/locale/pt_br.json +++ b/locale/pt_br.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/ru.json b/locale/ru.json index 177e739..703c866 100644 --- a/locale/ru.json +++ b/locale/ru.json @@ -167,5 +167,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/sq.json b/locale/sq.json index 3ab185f..a8ccbe1 100644 --- a/locale/sq.json +++ b/locale/sq.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/sv.json b/locale/sv.json index 8699c2f..7496751 100644 --- a/locale/sv.json +++ b/locale/sv.json @@ -169,5 +169,6 @@ "buttonUnblock":"Avblockera", "failedBlockingUser":"Misslyckades med att blockera användaren.", "failedUnblockingUser":"Misslyckades med att avblockera användaren.", - "unblockUser": "Avblockera {username}" + "unblockUser": "Avblockera {username}", + "tooltipBlocksYou":"Du är blockerad från att följa {username}." } diff --git a/locale/zh_cn.json b/locale/zh_cn.json index 96ef7f5..3cc8d2a 100644 --- a/locale/zh_cn.json +++ b/locale/zh_cn.json @@ -168,5 +168,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/zh_tw.json b/locale/zh_tw.json index 4614d58..ee9cde6 100644 --- a/locale/zh_tw.json +++ b/locale/zh_tw.json @@ -168,5 +168,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." }