mirror of https://gitlab.com/bashrc2/epicyon
Show moved address in person options
parent
8115fd8953
commit
4da112e672
|
@ -5264,11 +5264,14 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
ssbAddress = None
|
||||
emailAddress = None
|
||||
lockedAccount = False
|
||||
movedTo = ''
|
||||
actorJson = getPersonFromCache(baseDir,
|
||||
optionsActor,
|
||||
self.server.personCache,
|
||||
True)
|
||||
if actorJson:
|
||||
if actorJson.get('movedTo'):
|
||||
movedTo = actorJson['movedTo']
|
||||
lockedAccount = getLockedAccount(actorJson)
|
||||
donateUrl = getDonationUrl(actorJson)
|
||||
xmppAddress = getXmppAddress(actorJson)
|
||||
|
@ -5299,7 +5302,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
emailAddress,
|
||||
self.server.dormantMonths,
|
||||
backToPath,
|
||||
lockedAccount).encode('utf-8')
|
||||
lockedAccount,
|
||||
movedTo).encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
cookie, callingDomain)
|
||||
|
|
2
posts.py
2
posts.py
|
@ -286,7 +286,7 @@ def getPersonBox(baseDir: str, session, wfRequest: {},
|
|||
displayName = removeHtml(personJson['name'])
|
||||
# have they moved?
|
||||
if personJson.get('movedTo'):
|
||||
displayname += ' ⌂'
|
||||
displayName += ' ⌂'
|
||||
|
||||
storePersonInCache(baseDir, personUrl, personJson, personCache, True)
|
||||
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "المتابعة المحظورة",
|
||||
"Receives posts from the following accounts": "يتلقى المشاركات من الحسابات التالية",
|
||||
"Sends out posts to the following accounts": "يرسل المنشورات إلى الحسابات التالية",
|
||||
"Word frequencies": "ترددات الكلمات"
|
||||
"Word frequencies": "ترددات الكلمات",
|
||||
"New account": "حساب جديد"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "Seguiment bloquejat",
|
||||
"Receives posts from the following accounts": "Rep publicacions dels comptes següents",
|
||||
"Sends out posts to the following accounts": "Envia publicacions als comptes següents",
|
||||
"Word frequencies": "Freqüències de paraules"
|
||||
"Word frequencies": "Freqüències de paraules",
|
||||
"New account": "Compte nou"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "Wedi'i rwystro yn dilyn",
|
||||
"Receives posts from the following accounts": "Yn derbyn swyddi o'r cyfrifon canlynol",
|
||||
"Sends out posts to the following accounts": "Yn anfon postiadau i'r cyfrifon canlynol",
|
||||
"Word frequencies": "Amleddau geiriau"
|
||||
"Word frequencies": "Amleddau geiriau",
|
||||
"New account": "Cyfrif newydd"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "Folgendes blockiert",
|
||||
"Receives posts from the following accounts": "Erhält Beiträge von folgenden Konten",
|
||||
"Sends out posts to the following accounts": "Sendet Beiträge an die folgenden Konten",
|
||||
"Word frequencies": "Worthäufigkeiten"
|
||||
"Word frequencies": "Worthäufigkeiten",
|
||||
"New account": "Neues Konto"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "Blocked following",
|
||||
"Receives posts from the following accounts": "Receives posts from the following accounts",
|
||||
"Sends out posts to the following accounts": "Sends out posts to the following accounts",
|
||||
"Word frequencies": "Word frequencies"
|
||||
"Word frequencies": "Word frequencies",
|
||||
"New account": "New account"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "Seguimiento bloqueado",
|
||||
"Receives posts from the following accounts": "Recibe publicaciones de las siguientes cuentas",
|
||||
"Sends out posts to the following accounts": "Envía publicaciones a las siguientes cuentas",
|
||||
"Word frequencies": "Frecuencias de palabras"
|
||||
"Word frequencies": "Frecuencias de palabras",
|
||||
"New account": "Nueva cuenta"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "Bloqué suite",
|
||||
"Receives posts from the following accounts": "Reçoit les publications des comptes suivants",
|
||||
"Sends out posts to the following accounts": "Envoie des messages aux comptes suivants",
|
||||
"Word frequencies": "Fréquences des mots"
|
||||
"Word frequencies": "Fréquences des mots",
|
||||
"New account": "Nouveau compte"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "Blocáilte ina dhiaidh",
|
||||
"Receives posts from the following accounts": "Faigheann sé poist ó na cuntais seo a leanas",
|
||||
"Sends out posts to the following accounts": "Seoltar poist chuig na cuntais seo a leanas",
|
||||
"Word frequencies": "Minicíochtaí focal"
|
||||
"Word frequencies": "Minicíochtaí focal",
|
||||
"New account": "Cuntas nua"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "बाद में ब्लॉक किया गया",
|
||||
"Receives posts from the following accounts": "निम्नलिखित खातों से पोस्ट प्राप्त करता है",
|
||||
"Sends out posts to the following accounts": "निम्नलिखित खातों में पोस्ट भेजता है",
|
||||
"Word frequencies": "शब्द आवृत्तियों"
|
||||
"Word frequencies": "शब्द आवृत्तियों",
|
||||
"New account": "नया खाता"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "Seguito bloccato",
|
||||
"Receives posts from the following accounts": "Riceve post dai seguenti account",
|
||||
"Sends out posts to the following accounts": "Invia messaggi ai seguenti account",
|
||||
"Word frequencies": "Frequenze di parole"
|
||||
"Word frequencies": "Frequenze di parole",
|
||||
"New account": "Nuovo account"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "次のブロック",
|
||||
"Receives posts from the following accounts": "以下のアカウントから投稿を受け取ります",
|
||||
"Sends out posts to the following accounts": "以下のアカウントに投稿を送信します",
|
||||
"Word frequencies": "単語の頻度"
|
||||
"Word frequencies": "単語の頻度",
|
||||
"New account": "新しいアカウント"
|
||||
}
|
||||
|
|
|
@ -352,5 +352,6 @@
|
|||
"Blocked following": "Blocked following",
|
||||
"Receives posts from the following accounts": "Receives posts from the following accounts",
|
||||
"Sends out posts to the following accounts": "Sends out posts to the following accounts",
|
||||
"Word frequencies": "Word frequencies"
|
||||
"Word frequencies": "Word frequencies",
|
||||
"New account": "New account"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "Seguindo bloqueado",
|
||||
"Receives posts from the following accounts": "Recebe postagens das seguintes contas",
|
||||
"Sends out posts to the following accounts": "Envia postagens para as seguintes contas",
|
||||
"Word frequencies": "Frequências de palavras"
|
||||
"Word frequencies": "Frequências de palavras",
|
||||
"New account": "Nova conta"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "Заблокировано подписок",
|
||||
"Receives posts from the following accounts": "Получает сообщения от следующих аккаунтов",
|
||||
"Sends out posts to the following accounts": "Отправляет сообщения на следующие аккаунты",
|
||||
"Word frequencies": "Частоты слов"
|
||||
"Word frequencies": "Частоты слов",
|
||||
"New account": "Новый аккаунт"
|
||||
}
|
||||
|
|
|
@ -356,5 +356,6 @@
|
|||
"Blocked following": "被阻止",
|
||||
"Receives posts from the following accounts": "从以下帐户接收帖子",
|
||||
"Sends out posts to the following accounts": "将帖子发送到以下帐户",
|
||||
"Word frequencies": "词频"
|
||||
"Word frequencies": "词频",
|
||||
"New account": "新账户"
|
||||
}
|
||||
|
|
|
@ -47,7 +47,8 @@ def htmlPersonOptions(defaultTimeline: str,
|
|||
emailAddress: str,
|
||||
dormantMonths: int,
|
||||
backToPath: str,
|
||||
lockedAccount: bool) -> str:
|
||||
lockedAccount: bool,
|
||||
movedTo: str) -> str:
|
||||
"""Show options for a person: view/follow/block/report
|
||||
"""
|
||||
optionsDomain, optionsPort = getDomainFromActor(optionsActor)
|
||||
|
@ -123,6 +124,8 @@ def htmlPersonOptions(defaultTimeline: str,
|
|||
handleShown = handle
|
||||
if lockedAccount:
|
||||
handleShown += '🔒'
|
||||
if movedTo:
|
||||
handleShown += ' ⌂'
|
||||
if dormant:
|
||||
handleShown += ' 💤'
|
||||
optionsStr += \
|
||||
|
@ -131,6 +134,15 @@ def htmlPersonOptions(defaultTimeline: str,
|
|||
if followsYou:
|
||||
optionsStr += \
|
||||
' <p class="optionsText">' + translate['Follows you'] + '</p>\n'
|
||||
if movedTo:
|
||||
newNickname = getNicknameFromActor(movedTo)
|
||||
newDomain, newPort = getDomainFromActor(movedTo)
|
||||
if newNickname and newDomain:
|
||||
newHandle = newNickname + '@' + newDomain
|
||||
optionsStr += \
|
||||
' <p class="optionsText">' + \
|
||||
translate['New account'] + \
|
||||
': <a href="' + movedTo + '">' + newHandle + '</a></p>\n'
|
||||
if emailAddress:
|
||||
optionsStr += \
|
||||
'<p class="imText">' + translate['Email'] + \
|
||||
|
|
Loading…
Reference in New Issue