Offline indicator within timeline

main
Bob Mottram 2023-09-16 14:55:02 +01:00
parent 8f7f4e4224
commit 33498affc5
29 changed files with 107 additions and 46 deletions

View File

@ -12455,7 +12455,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.content_license_url, self.server.content_license_url,
timezone, bold_reading, timezone, bold_reading,
self.server.buy_sites, None, self.server.buy_sites, None,
self.server.max_shares_on_profile) self.server.max_shares_on_profile,
self.server.sites_unavailable)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._set_headers('text/html', msglen, self._set_headers('text/html', msglen,
@ -12586,7 +12587,8 @@ class PubServer(BaseHTTPRequestHandler):
timezone, bold_reading, timezone, bold_reading,
self.server.buy_sites, self.server.buy_sites,
None, None,
max_shares_on_profile) max_shares_on_profile,
self.server.sites_unavailable)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._set_headers('text/html', msglen, self._set_headers('text/html', msglen,
@ -15236,7 +15238,8 @@ class PubServer(BaseHTTPRequestHandler):
timezone, bold_reading, timezone, bold_reading,
self.server.buy_sites, self.server.buy_sites,
None, None,
self.server.max_shares_on_profile) self.server.max_shares_on_profile,
self.server.sites_unavailable)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._set_headers('text/html', msglen, self._set_headers('text/html', msglen,
@ -15345,6 +15348,8 @@ class PubServer(BaseHTTPRequestHandler):
bold_reading = True bold_reading = True
max_shares_on_profile = \ max_shares_on_profile = \
self.server.max_shares_on_profile self.server.max_shares_on_profile
sites_unavailable = \
self.server.sites_unavailable
msg = \ msg = \
html_profile(self.server.signing_priv_key_pem, html_profile(self.server.signing_priv_key_pem,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
@ -15383,7 +15388,8 @@ class PubServer(BaseHTTPRequestHandler):
timezone, bold_reading, timezone, bold_reading,
self.server.buy_sites, self.server.buy_sites,
None, None,
max_shares_on_profile).encode('utf-8') max_shares_on_profile,
sites_unavailable).encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._set_headers('text/html', self._set_headers('text/html',
msglen, cookie, calling_domain, False) msglen, cookie, calling_domain, False)
@ -15486,6 +15492,8 @@ class PubServer(BaseHTTPRequestHandler):
bold_reading = True bold_reading = True
max_shares_on_profile = \ max_shares_on_profile = \
self.server.max_shares_on_profile self.server.max_shares_on_profile
sites_unavailable = \
self.server.sites_unavailable
msg = \ msg = \
html_profile(self.server.signing_priv_key_pem, html_profile(self.server.signing_priv_key_pem,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
@ -15524,7 +15532,8 @@ class PubServer(BaseHTTPRequestHandler):
timezone, bold_reading, timezone, bold_reading,
self.server.buy_sites, self.server.buy_sites,
None, None,
max_shares_on_profile).encode('utf-8') max_shares_on_profile,
sites_unavailable).encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._set_headers('text/html', self._set_headers('text/html',
msglen, cookie, calling_domain, False) msglen, cookie, calling_domain, False)
@ -15633,6 +15642,8 @@ class PubServer(BaseHTTPRequestHandler):
bold_reading = True bold_reading = True
max_shares_on_profile = \ max_shares_on_profile = \
self.server.max_shares_on_profile self.server.max_shares_on_profile
sites_unavailable = \
self.server.sites_unavailable
msg = \ msg = \
html_profile(self.server.signing_priv_key_pem, html_profile(self.server.signing_priv_key_pem,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
@ -15671,7 +15682,8 @@ class PubServer(BaseHTTPRequestHandler):
timezone, bold_reading, timezone, bold_reading,
self.server.buy_sites, self.server.buy_sites,
None, None,
max_shares_on_profile).encode('utf-8') max_shares_on_profile,
sites_unavailable).encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._set_headers('text/html', self._set_headers('text/html',
msglen, cookie, calling_domain, False) msglen, cookie, calling_domain, False)
@ -15778,6 +15790,8 @@ class PubServer(BaseHTTPRequestHandler):
bold_reading = True bold_reading = True
max_shares_on_profile = \ max_shares_on_profile = \
self.server.max_shares_on_profile self.server.max_shares_on_profile
sites_unavailable = \
self.server.sites_unavailable
msg = \ msg = \
html_profile(self.server.signing_priv_key_pem, html_profile(self.server.signing_priv_key_pem,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
@ -15817,7 +15831,8 @@ class PubServer(BaseHTTPRequestHandler):
timezone, bold_reading, timezone, bold_reading,
self.server.buy_sites, self.server.buy_sites,
None, None,
max_shares_on_profile).encode('utf-8') max_shares_on_profile,
sites_unavailable).encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._set_headers('text/html', msglen, self._set_headers('text/html', msglen,
cookie, calling_domain, False) cookie, calling_domain, False)
@ -15954,6 +15969,8 @@ class PubServer(BaseHTTPRequestHandler):
bold_reading = True bold_reading = True
max_shares_on_profile = \ max_shares_on_profile = \
self.server.max_shares_on_profile self.server.max_shares_on_profile
sites_unavailable = \
self.server.sites_unavailable
msg = \ msg = \
html_profile(self.server.signing_priv_key_pem, html_profile(self.server.signing_priv_key_pem,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
@ -15988,7 +16005,8 @@ class PubServer(BaseHTTPRequestHandler):
timezone, bold_reading, timezone, bold_reading,
self.server.buy_sites, self.server.buy_sites,
None, None,
max_shares_on_profile).encode('utf-8') max_shares_on_profile,
sites_unavailable).encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._set_headers('text/html', msglen, self._set_headers('text/html', msglen,
cookie, calling_domain, False) cookie, calling_domain, False)

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "تحذير: قد يكون هذا الحساب قد قام بحظرك", "FollowAccountWarning": "تحذير: قد يكون هذا الحساب قد قام بحظرك",
"Nicknames of memorial accounts (one per line)": "ألقاب الحسابات التذكارية (واحد في كل سطر)", "Nicknames of memorial accounts (one per line)": "ألقاب الحسابات التذكارية (واحد في كل سطر)",
"Memorials": "النصب التذكارية", "Memorials": "النصب التذكارية",
"places": "أماكن" "places": "أماكن",
"offline": "غير متصل على الانترنت"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "সতর্কতা: এই অ্যাকাউন্টটি আপনাকে ব্লক করতে পারে", "FollowAccountWarning": "সতর্কতা: এই অ্যাকাউন্টটি আপনাকে ব্লক করতে পারে",
"Nicknames of memorial accounts (one per line)": "স্মারক অ্যাকাউন্টের ডাকনাম (প্রতি লাইনে একটি)", "Nicknames of memorial accounts (one per line)": "স্মারক অ্যাকাউন্টের ডাকনাম (প্রতি লাইনে একটি)",
"Memorials": "স্মারক", "Memorials": "স্মারক",
"places": "জায়গা" "places": "জায়গা",
"offline": "অফলাইন"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "ADVERTIMENT: és possible que aquest compte us estigui bloquejant", "FollowAccountWarning": "ADVERTIMENT: és possible que aquest compte us estigui bloquejant",
"Nicknames of memorial accounts (one per line)": "Sobrenoms dels comptes commemoratius (un per línia)", "Nicknames of memorial accounts (one per line)": "Sobrenoms dels comptes commemoratius (un per línia)",
"Memorials": "Memorials", "Memorials": "Memorials",
"places": "llocs" "places": "llocs",
"offline": "fora de línia"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "RHYBUDD: efallai bod y cyfrif hwn yn eich rhwystro", "FollowAccountWarning": "RHYBUDD: efallai bod y cyfrif hwn yn eich rhwystro",
"Nicknames of memorial accounts (one per line)": "Llysenwau cyfrifon coffa (un fesul llinell)", "Nicknames of memorial accounts (one per line)": "Llysenwau cyfrifon coffa (un fesul llinell)",
"Memorials": "Cofebau", "Memorials": "Cofebau",
"places": "lleoedd" "places": "lleoedd",
"offline": "all-lein"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "ACHTUNG: Dieses Konto blockiert Sie möglicherweise", "FollowAccountWarning": "ACHTUNG: Dieses Konto blockiert Sie möglicherweise",
"Nicknames of memorial accounts (one per line)": "Spitznamen der Gedenkkonten (einer pro Zeile)", "Nicknames of memorial accounts (one per line)": "Spitznamen der Gedenkkonten (einer pro Zeile)",
"Memorials": "Denkmäler", "Memorials": "Denkmäler",
"places": "setzt" "places": "setzt",
"offline": "offline"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: αυτός ο λογαριασμός μπορεί να σας αποκλείει", "FollowAccountWarning": "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: αυτός ο λογαριασμός μπορεί να σας αποκλείει",
"Nicknames of memorial accounts (one per line)": "Ψευδώνυμα λογαριασμών μνήμης (ένα ανά γραμμή)", "Nicknames of memorial accounts (one per line)": "Ψευδώνυμα λογαριασμών μνήμης (ένα ανά γραμμή)",
"Memorials": "Μνημείων", "Memorials": "Μνημείων",
"places": "μέρη" "places": "μέρη",
"offline": "εκτός σύνδεσης"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "WARNING: this account may be blocking you", "FollowAccountWarning": "WARNING: this account may be blocking you",
"Nicknames of memorial accounts (one per line)": "Nicknames of memorial accounts (one per line)", "Nicknames of memorial accounts (one per line)": "Nicknames of memorial accounts (one per line)",
"Memorials": "Memorials", "Memorials": "Memorials",
"places": "places" "places": "places",
"offline": "offline"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "ADVERTENCIA: esta cuenta puede estar bloqueándote", "FollowAccountWarning": "ADVERTENCIA: esta cuenta puede estar bloqueándote",
"Nicknames of memorial accounts (one per line)": "Apodos de cuentas conmemorativas (uno por línea)", "Nicknames of memorial accounts (one per line)": "Apodos de cuentas conmemorativas (uno por línea)",
"Memorials": "Memoriales", "Memorials": "Memoriales",
"places": "lugares" "places": "lugares",
"offline": "desconectada"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "هشدار: این حساب ممکن است شما را مسدود کند", "FollowAccountWarning": "هشدار: این حساب ممکن است شما را مسدود کند",
"Nicknames of memorial accounts (one per line)": "نام مستعار حساب های یادبود (یکی در هر خط)", "Nicknames of memorial accounts (one per line)": "نام مستعار حساب های یادبود (یکی در هر خط)",
"Memorials": "یادبودها", "Memorials": "یادبودها",
"places": "مکان ها" "places": "مکان ها",
"offline": "آفلاین"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "ATTENTION : ce compte peut vous bloquer", "FollowAccountWarning": "ATTENTION : ce compte peut vous bloquer",
"Nicknames of memorial accounts (one per line)": "Surnoms des comptes commémoratifs (un par ligne)", "Nicknames of memorial accounts (one per line)": "Surnoms des comptes commémoratifs (un par ligne)",
"Memorials": "Mémoriaux", "Memorials": "Mémoriaux",
"places": "lieux" "places": "lieux",
"offline": "hors ligne"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "RABHADH: seans go bhfuil an cuntas seo ag cur bac ort", "FollowAccountWarning": "RABHADH: seans go bhfuil an cuntas seo ag cur bac ort",
"Nicknames of memorial accounts (one per line)": "Leasainmneacha na gcuntas cuimhneacháin (ceann in aghaidh na líne)", "Nicknames of memorial accounts (one per line)": "Leasainmneacha na gcuntas cuimhneacháin (ceann in aghaidh na líne)",
"Memorials": "Cuimhneacháin", "Memorials": "Cuimhneacháin",
"places": "áiteanna" "places": "áiteanna",
"offline": "as líne"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "אזהרה: ייתכן שחשבון זה חוסם אותך", "FollowAccountWarning": "אזהרה: ייתכן שחשבון זה חוסם אותך",
"Nicknames of memorial accounts (one per line)": "כינויים של חשבונות זיכרון (אחד בכל שורה)", "Nicknames of memorial accounts (one per line)": "כינויים של חשבונות זיכרון (אחד בכל שורה)",
"Memorials": "אנדרטאות", "Memorials": "אנדרטאות",
"places": "מקומות" "places": "מקומות",
"offline": "במצב לא מקוון"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "चेतावनी: यह खाता आपको ब्लॉक कर सकता है", "FollowAccountWarning": "चेतावनी: यह खाता आपको ब्लॉक कर सकता है",
"Nicknames of memorial accounts (one per line)": "स्मारक खातों के उपनाम (प्रति पंक्ति एक)", "Nicknames of memorial accounts (one per line)": "स्मारक खातों के उपनाम (प्रति पंक्ति एक)",
"Memorials": "इतिवृत्त", "Memorials": "इतिवृत्त",
"places": "स्थानों" "places": "स्थानों",
"offline": "ऑफलाइन"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "ATTENZIONE: questo account potrebbe bloccarti", "FollowAccountWarning": "ATTENZIONE: questo account potrebbe bloccarti",
"Nicknames of memorial accounts (one per line)": "Soprannomi degli account commemorativi (uno per riga)", "Nicknames of memorial accounts (one per line)": "Soprannomi degli account commemorativi (uno per riga)",
"Memorials": "Memoriali", "Memorials": "Memoriali",
"places": "luoghi" "places": "luoghi",
"offline": "disconnessa"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "警告: このアカウントはあなたをブロックしている可能性があります", "FollowAccountWarning": "警告: このアカウントはあなたをブロックしている可能性があります",
"Nicknames of memorial accounts (one per line)": "追悼アカウントのニックネーム1行に1つ", "Nicknames of memorial accounts (one per line)": "追悼アカウントのニックネーム1行に1つ",
"Memorials": "記念碑", "Memorials": "記念碑",
"places": "場所" "places": "場所",
"offline": "オフライン"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "경고: 이 계정이 귀하를 차단하고 있을 수 있습니다.", "FollowAccountWarning": "경고: 이 계정이 귀하를 차단하고 있을 수 있습니다.",
"Nicknames of memorial accounts (one per line)": "추모 계정의 닉네임(한 줄에 하나씩)", "Nicknames of memorial accounts (one per line)": "추모 계정의 닉네임(한 줄에 하나씩)",
"Memorials": "기록", "Memorials": "기록",
"places": "장소" "places": "장소",
"offline": "오프라인"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "HIŞYARÎ: Dibe ku ev hesab we asteng bike", "FollowAccountWarning": "HIŞYARÎ: Dibe ku ev hesab we asteng bike",
"Nicknames of memorial accounts (one per line)": "Nasnavên hesabên bîranînê (yek ji rêzê)", "Nicknames of memorial accounts (one per line)": "Nasnavên hesabên bîranînê (yek ji rêzê)",
"Memorials": "Memorials", "Memorials": "Memorials",
"places": "cihên" "places": "cihên",
"offline": "offline"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "WAARSCHUWING: dit account blokkeert u mogelijk", "FollowAccountWarning": "WAARSCHUWING: dit account blokkeert u mogelijk",
"Nicknames of memorial accounts (one per line)": "Bijnamen van herdenkingsverslagen (één per regel)", "Nicknames of memorial accounts (one per line)": "Bijnamen van herdenkingsverslagen (één per regel)",
"Memorials": "Gedenktekens", "Memorials": "Gedenktekens",
"places": "plaatsen" "places": "plaatsen",
"offline": "offline"
} }

View File

@ -633,5 +633,6 @@
"FollowAccountWarning": "WARNING: this account may be blocking you", "FollowAccountWarning": "WARNING: this account may be blocking you",
"Nicknames of memorial accounts (one per line)": "Nicknames of memorial accounts (one per line)", "Nicknames of memorial accounts (one per line)": "Nicknames of memorial accounts (one per line)",
"Memorials": "Memorials", "Memorials": "Memorials",
"places": "places" "places": "places",
"offline": "offline"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "OSTRZEŻENIE: to konto może Cię blokować", "FollowAccountWarning": "OSTRZEŻENIE: to konto może Cię blokować",
"Nicknames of memorial accounts (one per line)": "Pseudonimy kont pamięci (po jednym w wierszu)", "Nicknames of memorial accounts (one per line)": "Pseudonimy kont pamięci (po jednym w wierszu)",
"Memorials": "Pamiętnik", "Memorials": "Pamiętnik",
"places": "miejsca" "places": "miejsca",
"offline": "nieaktywny"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "AVISO: esta conta pode estar bloqueando você", "FollowAccountWarning": "AVISO: esta conta pode estar bloqueando você",
"Nicknames of memorial accounts (one per line)": "Apelidos de contas memoriais (um por linha)", "Nicknames of memorial accounts (one per line)": "Apelidos de contas memoriais (um por linha)",
"Memorials": "Memoriais", "Memorials": "Memoriais",
"places": "lugares" "places": "lugares",
"offline": "desligada"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "ВНИМАНИЕ: этот аккаунт может вас заблокировать", "FollowAccountWarning": "ВНИМАНИЕ: этот аккаунт может вас заблокировать",
"Nicknames of memorial accounts (one per line)": "Никнеймы мемориальных аккаунтов (по одному в строке)", "Nicknames of memorial accounts (one per line)": "Никнеймы мемориальных аккаунтов (по одному в строке)",
"Memorials": "Мемориалы", "Memorials": "Мемориалы",
"places": "места" "places": "места",
"offline": "не в сети"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "ONYO: akaunti hii inaweza kuwa inakuzuia", "FollowAccountWarning": "ONYO: akaunti hii inaweza kuwa inakuzuia",
"Nicknames of memorial accounts (one per line)": "Majina ya utani ya akaunti za ukumbusho (moja kwa kila mstari)", "Nicknames of memorial accounts (one per line)": "Majina ya utani ya akaunti za ukumbusho (moja kwa kila mstari)",
"Memorials": "Makumbusho", "Memorials": "Makumbusho",
"places": "maeneo" "places": "maeneo",
"offline": "nje ya mtandao"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "DİKKAT: Bu hesap sizi engelliyor olabilir", "FollowAccountWarning": "DİKKAT: Bu hesap sizi engelliyor olabilir",
"Nicknames of memorial accounts (one per line)": "Anma hesaplarının takma adları (her satıra bir tane)", "Nicknames of memorial accounts (one per line)": "Anma hesaplarının takma adları (her satıra bir tane)",
"Memorials": "Anıtlar", "Memorials": "Anıtlar",
"places": "yer" "places": "yer",
"offline": "çevrimdışı"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "УВАГА: цей обліковий запис може блокувати вас", "FollowAccountWarning": "УВАГА: цей обліковий запис може блокувати вас",
"Nicknames of memorial accounts (one per line)": "Ніки меморіалів (по одному в рядку)", "Nicknames of memorial accounts (one per line)": "Ніки меморіалів (по одному в рядку)",
"Memorials": "Меморіали", "Memorials": "Меморіали",
"places": "місць" "places": "місць",
"offline": "офлайн"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "ווארענונג: דער חשבון קען בלאַקינג איר", "FollowAccountWarning": "ווארענונג: דער חשבון קען בלאַקינג איר",
"Nicknames of memorial accounts (one per line)": "ניקניימז פון דענקמאָל אַקאַונץ (איינער פּער שורה)", "Nicknames of memorial accounts (one per line)": "ניקניימז פון דענקמאָל אַקאַונץ (איינער פּער שורה)",
"Memorials": "מעמאָריאַלן", "Memorials": "מעמאָריאַלן",
"places": "ערטער" "places": "ערטער",
"offline": "אָפפלינע"
} }

View File

@ -637,5 +637,6 @@
"FollowAccountWarning": "警告:此帐户可能会阻止您", "FollowAccountWarning": "警告:此帐户可能会阻止您",
"Nicknames of memorial accounts (one per line)": "纪念帐户昵称(每行一个)", "Nicknames of memorial accounts (one per line)": "纪念帐户昵称(每行一个)",
"Memorials": "纪念馆", "Memorials": "纪念馆",
"places": "地方" "places": "地方",
"offline": "离线"
} }

View File

@ -844,7 +844,8 @@ def html_profile(signing_priv_key_pem: str,
timezone: str, bold_reading: bool, timezone: str, bold_reading: bool,
buy_sites: {}, buy_sites: {},
actor_proxied: str, actor_proxied: str,
max_shares_on_profile: int) -> str: max_shares_on_profile: int,
sites_unavailable: []) -> str:
"""Show the profile page as html """Show the profile page as html
""" """
show_moved_accounts = False show_moved_accounts = False
@ -1394,7 +1395,8 @@ def html_profile(signing_priv_key_pem: str,
users_path, page_number, users_path, page_number,
max_items_per_page, max_items_per_page,
dormant_months, debug, dormant_months, debug,
signing_priv_key_pem) signing_priv_key_pem,
sites_unavailable)
if show_moved_accounts and selected == 'moved': if show_moved_accounts and selected == 'moved':
profile_str += \ profile_str += \
_html_profile_following(translate, base_dir, http_prefix, _html_profile_following(translate, base_dir, http_prefix,
@ -1407,7 +1409,8 @@ def html_profile(signing_priv_key_pem: str,
users_path, page_number, users_path, page_number,
max_items_per_page, max_items_per_page,
dormant_months, debug, dormant_months, debug,
signing_priv_key_pem) signing_priv_key_pem,
sites_unavailable)
if selected == 'followers': if selected == 'followers':
profile_str += \ profile_str += \
_html_profile_following(translate, base_dir, http_prefix, _html_profile_following(translate, base_dir, http_prefix,
@ -1418,7 +1421,7 @@ def html_profile(signing_priv_key_pem: str,
project_version, ["block"], project_version, ["block"],
selected, users_path, page_number, selected, users_path, page_number,
max_items_per_page, dormant_months, debug, max_items_per_page, dormant_months, debug,
signing_priv_key_pem) signing_priv_key_pem, sites_unavailable)
if authorized and selected == 'inactive': if authorized and selected == 'inactive':
profile_str += \ profile_str += \
_html_profile_following(translate, base_dir, http_prefix, _html_profile_following(translate, base_dir, http_prefix,
@ -1429,7 +1432,7 @@ def html_profile(signing_priv_key_pem: str,
project_version, ["block"], project_version, ["block"],
selected, users_path, page_number, selected, users_path, page_number,
max_items_per_page, dormant_months, debug, max_items_per_page, dormant_months, debug,
signing_priv_key_pem) signing_priv_key_pem, sites_unavailable)
if not is_group: if not is_group:
if selected == 'roles': if selected == 'roles':
profile_str += \ profile_str += \
@ -1560,7 +1563,8 @@ def _html_profile_following(translate: {}, base_dir: str, http_prefix: str,
page_number: int, page_number: int,
max_items_per_page: int, max_items_per_page: int,
dormant_months: int, debug: bool, dormant_months: int, debug: bool,
signing_priv_key_pem: str) -> str: signing_priv_key_pem: str,
sites_unavailable: []) -> str:
"""Shows following on the profile screen """Shows following on the profile screen
""" """
profile_str = '' profile_str = ''
@ -1582,10 +1586,18 @@ def _html_profile_following(translate: {}, base_dir: str, http_prefix: str,
for following_actor in following_json['orderedItems']: for following_actor in following_json['orderedItems']:
# is this a dormant followed account? # is this a dormant followed account?
dormant = False dormant = False
if authorized and feed_name == 'following': offline = False
dormant = \
is_dormant(base_dir, nickname, domain, following_actor, following_domain, _ = get_domain_from_actor(following_actor)
dormant_months) if authorized:
if following_domain in sites_unavailable:
dormant = True
offline = True
else:
if feed_name == 'following':
dormant = \
is_dormant(base_dir, nickname, domain,
following_actor, dormant_months)
profile_str += \ profile_str += \
_individual_follow_as_html(signing_priv_key_pem, _individual_follow_as_html(signing_priv_key_pem,
@ -1593,7 +1605,8 @@ def _html_profile_following(translate: {}, base_dir: str, http_prefix: str,
cached_webfingers, person_cache, cached_webfingers, person_cache,
domain, following_actor, domain, following_actor,
authorized, nickname, authorized, nickname,
http_prefix, project_version, dormant, http_prefix, project_version,
dormant, offline,
debug, buttons) debug, buttons)
if authorized and max_items_per_page and page_number: if authorized and max_items_per_page and page_number:
@ -3104,6 +3117,7 @@ def _individual_follow_as_html(signing_priv_key_pem: str,
http_prefix: str, http_prefix: str,
project_version: str, project_version: str,
dormant: bool, dormant: bool,
offline: bool,
debug: bool, debug: bool,
buttons=[]) -> str: buttons=[]) -> str:
"""An individual follow entry on the profile screen """An individual follow entry on the profile screen
@ -3156,6 +3170,8 @@ def _individual_follow_as_html(signing_priv_key_pem: str,
if dormant: if dormant:
title_str += ' 💤' title_str += ' 💤'
if offline:
title_str += ' <b>[' + translate['offline'].upper() + ']</b>'
buttons_str = '' buttons_str = ''
if authorized: if authorized: