mirror of https://gitlab.com/bashrc2/epicyon
Show follows you status on person options
parent
a9fcabd366
commit
03044b9819
10
follow.py
10
follow.py
|
@ -175,8 +175,8 @@ def followerOfPerson(baseDir: str, nickname: str, domain: str,
|
|||
federationList, debug, 'followers.txt')
|
||||
|
||||
|
||||
def _isFollowerOfPerson(baseDir: str, nickname: str, domain: str,
|
||||
followerNickname: str, followerDomain: str) -> bool:
|
||||
def isFollowerOfPerson(baseDir: str, nickname: str, domain: str,
|
||||
followerNickname: str, followerDomain: str) -> bool:
|
||||
"""is the given nickname a follower of followerNickname?
|
||||
"""
|
||||
if ':' in domain:
|
||||
|
@ -663,9 +663,9 @@ def receiveFollowRequest(session, baseDir: str, httpPrefix: str,
|
|||
baseDir + '/accounts/' + handleToFollow)
|
||||
return True
|
||||
|
||||
if _isFollowerOfPerson(baseDir,
|
||||
nicknameToFollow, domainToFollowFull,
|
||||
nickname, domainFull):
|
||||
if isFollowerOfPerson(baseDir,
|
||||
nicknameToFollow, domainToFollowFull,
|
||||
nickname, domainFull):
|
||||
if debug:
|
||||
print('DEBUG: ' + nickname + '@' + domain +
|
||||
' is already a follower of ' +
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "الكلمات غير المصفاة",
|
||||
"Show Accounts": "إظهار الحسابات",
|
||||
"Peertube Instances": "مثيلات Peertube",
|
||||
"Show video previews for the following Peertube sites.": "إظهار معاينات الفيديو لمواقع Peertube التالية."
|
||||
"Show video previews for the following Peertube sites.": "إظهار معاينات الفيديو لمواقع Peertube التالية.",
|
||||
"Follows you": "يتبعك"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "Paraules sense filtre",
|
||||
"Show Accounts": "Mostra comptes",
|
||||
"Peertube Instances": "Instàncies de Peertube",
|
||||
"Show video previews for the following Peertube sites.": "Mostra les previsualitzacions de vídeo dels següents llocs de Peertube."
|
||||
"Show video previews for the following Peertube sites.": "Mostra les previsualitzacions de vídeo dels següents llocs de Peertube.",
|
||||
"Follows you": "Et segueix"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "Geiriau di-hid",
|
||||
"Show Accounts": "Dangos Cyfrifon",
|
||||
"Peertube Instances": "Camau Peertube",
|
||||
"Show video previews for the following Peertube sites.": "Dangos rhagolygon fideo ar gyfer y safleoedd Peertube canlynol."
|
||||
"Show video previews for the following Peertube sites.": "Dangos rhagolygon fideo ar gyfer y safleoedd Peertube canlynol.",
|
||||
"Follows you": "Yn eich dilyn chi"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "Wörter herausfiltern",
|
||||
"Show Accounts": "Konten anzeigen",
|
||||
"Peertube Instances": "Peertube-Instanzen",
|
||||
"Show video previews for the following Peertube sites.": "Zeigen Sie eine Videovorschau für die folgenden Peertube-Websites an."
|
||||
"Show video previews for the following Peertube sites.": "Zeigen Sie eine Videovorschau für die folgenden Peertube-Websites an.",
|
||||
"Follows you": "Folgt dir"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "Unfilter words",
|
||||
"Show Accounts": "Show Accounts",
|
||||
"Peertube Instances": "Peertube Instances",
|
||||
"Show video previews for the following Peertube sites.": "Show video previews for the following Peertube sites."
|
||||
"Show video previews for the following Peertube sites.": "Show video previews for the following Peertube sites.",
|
||||
"Follows you": "Follows you"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "Palabras sin filtrar",
|
||||
"Show Accounts": "Mostrar cuentas",
|
||||
"Peertube Instances": "Instancias de Peertube",
|
||||
"Show video previews for the following Peertube sites.": "Muestre vistas previas de video para los siguientes sitios de Peertube."
|
||||
"Show video previews for the following Peertube sites.": "Muestre vistas previas de video para los siguientes sitios de Peertube.",
|
||||
"Follows you": "Te sigue"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "Mots non filtrés",
|
||||
"Show Accounts": "Afficher les comptes",
|
||||
"Peertube Instances": "Instances Peertube",
|
||||
"Show video previews for the following Peertube sites.": "Afficher des aperçus vidéo pour les sites Peertube suivants."
|
||||
"Show video previews for the following Peertube sites.": "Afficher des aperçus vidéo pour les sites Peertube suivants.",
|
||||
"Follows you": "Vous suit"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "Focail neamhleithleacha",
|
||||
"Show Accounts": "Taispeáin Cuntais",
|
||||
"Peertube Instances": "Imeachtaí Peertube",
|
||||
"Show video previews for the following Peertube sites.": "Taispeáin réamhamharcanna físe do na suíomhanna Peertube seo a leanas."
|
||||
"Show video previews for the following Peertube sites.": "Taispeáin réamhamharcanna físe do na suíomhanna Peertube seo a leanas.",
|
||||
"Follows you": "Leanann tú"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "अनफ़िल्टर शब्द",
|
||||
"Show Accounts": "खाते दिखाएं",
|
||||
"Peertube Instances": "Peertube उदाहरण",
|
||||
"Show video previews for the following Peertube sites.": "निम्नलिखित Peertube साइटों के लिए वीडियो पूर्वावलोकन दिखाएं।"
|
||||
"Show video previews for the following Peertube sites.": "निम्नलिखित Peertube साइटों के लिए वीडियो पूर्वावलोकन दिखाएं।",
|
||||
"Follows you": "आपका पीछा करता है"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "Parole non filtrate",
|
||||
"Show Accounts": "Mostra account",
|
||||
"Peertube Instances": "Istanze di Peertube",
|
||||
"Show video previews for the following Peertube sites.": "Mostra le anteprime dei video per i seguenti siti Peertube."
|
||||
"Show video previews for the following Peertube sites.": "Mostra le anteprime dei video per i seguenti siti Peertube.",
|
||||
"Follows you": "Ti segue"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "単語のフィルタリングを解除する",
|
||||
"Show Accounts": "アカウントを表示する",
|
||||
"Peertube Instances": "Peertubeインスタンス",
|
||||
"Show video previews for the following Peertube sites.": "次のPeertubeサイトのビデオプレビューを表示します。"
|
||||
"Show video previews for the following Peertube sites.": "次のPeertubeサイトのビデオプレビューを表示します。",
|
||||
"Follows you": "あなたについていきます"
|
||||
}
|
||||
|
|
|
@ -345,5 +345,6 @@
|
|||
"Unfilter words": "Unfilter words",
|
||||
"Show Accounts": "Show Accounts",
|
||||
"Peertube Instances": "Peertube Instances",
|
||||
"Show video previews for the following Peertube sites.": "Show video previews for the following Peertube sites."
|
||||
"Show video previews for the following Peertube sites.": "Show video previews for the following Peertube sites.",
|
||||
"Follows you": "Follows you"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "Palavras sem filtro",
|
||||
"Show Accounts": "Mostrar contas",
|
||||
"Peertube Instances": "Instâncias Peertube",
|
||||
"Show video previews for the following Peertube sites.": "Mostrar visualizações de vídeo para os seguintes sites Peertube."
|
||||
"Show video previews for the following Peertube sites.": "Mostrar visualizações de vídeo para os seguintes sites Peertube.",
|
||||
"Follows you": "Segue você"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "Не фильтровать слова",
|
||||
"Show Accounts": "Показать счета",
|
||||
"Peertube Instances": "Экземпляры Peertube",
|
||||
"Show video previews for the following Peertube sites.": "Показать превью видео для следующих сайтов Peertube."
|
||||
"Show video previews for the following Peertube sites.": "Показать превью видео для следующих сайтов Peertube.",
|
||||
"Follows you": "Следует за вами"
|
||||
}
|
||||
|
|
|
@ -349,5 +349,6 @@
|
|||
"Unfilter words": "未过滤字词",
|
||||
"Show Accounts": "显示帐户",
|
||||
"Peertube Instances": "Peertube实例",
|
||||
"Show video previews for the following Peertube sites.": "显示以下Peertube网站的视频预览。"
|
||||
"Show video previews for the following Peertube sites.": "显示以下Peertube网站的视频预览。",
|
||||
"Follows you": "跟着你"
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ from utils import removeHtml
|
|||
from utils import getDomainFromActor
|
||||
from utils import getNicknameFromActor
|
||||
from blocking import isBlocked
|
||||
from follow import isFollowerOfPerson
|
||||
from follow import isFollowingActor
|
||||
from followingCalendar import receivingCalendarEvents
|
||||
from webapp_utils import htmlHeaderWithExternalStyle
|
||||
|
@ -62,6 +63,7 @@ def htmlPersonOptions(defaultTimeline: str,
|
|||
blockStr = 'Block'
|
||||
nickname = None
|
||||
optionsNickname = None
|
||||
followsYou = False
|
||||
if originPathStr.startswith('/users/'):
|
||||
nickname = originPathStr.split('/users/')[1]
|
||||
if '/' in nickname:
|
||||
|
@ -77,6 +79,10 @@ def htmlPersonOptions(defaultTimeline: str,
|
|||
|
||||
optionsNickname = getNicknameFromActor(optionsActor)
|
||||
optionsDomainFull = getFullDomain(optionsDomain, optionsPort)
|
||||
followsYou = \
|
||||
isFollowerOfPerson(baseDir,
|
||||
nickname, domain,
|
||||
optionsNickname, optionsDomainFull)
|
||||
if isBlocked(baseDir, nickname, domain,
|
||||
optionsNickname, optionsDomainFull):
|
||||
blockStr = 'Block'
|
||||
|
@ -120,6 +126,9 @@ def htmlPersonOptions(defaultTimeline: str,
|
|||
optionsStr += \
|
||||
' <p class="optionsText">' + translate['Options for'] + \
|
||||
' @' + handleShown + '</p>\n'
|
||||
if followsYou:
|
||||
optionsStr += \
|
||||
' <p class="optionsText">' + translate['Follows you'] + '</p>\n'
|
||||
if emailAddress:
|
||||
optionsStr += \
|
||||
'<p class="imText">' + translate['Email'] + \
|
||||
|
|
Loading…
Reference in New Issue