add copy protocol (eg ATProto) handles to user pages

pull/962/head
Ryan Barrett 2024-04-11 20:02:53 -07:00
rodzic 0ed24c19b3
commit f67cecd8f9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -23,6 +23,7 @@ from oauth_dropins.webutil.flask_util import (
import common
from common import DOMAIN_RE
from flask_app import app, cache
import ids
from models import fetch_objects, fetch_page, Follower, Object, PAGE_SIZE, PROTOCOLS
from protocol import Protocol
@ -38,6 +39,7 @@ TEMPLATE_VARS = {
'as1': as1,
'as2': as2,
'g': g,
'ids': ids,
'isinstance': isinstance,
'logs': logs,
'PROTOCOLS': PROTOCOLS,

Wyświetl plik

@ -57,9 +57,11 @@
</nobr>
</span>
{% set copies = user.copies|map(attribute='protocol')|list %}
{% for proto in set(PROTOCOLS.values()) %}
{% if proto and not isinstance(user, proto)
and proto.LABEL not in ('atproto', 'ui', 'web') %}
{% if proto and not isinstance(user, proto)
and proto.LABEL not in ('ui', 'web')
and (proto.LABEL not in ids.COPIES_PROTOCOLS or proto.LABEL in copies) %}
&middot;
<nobr title="{{ proto.__name__ }} (bridged)">
<span class="logo">{{ proto.LOGO_HTML|safe }}</span>