kopia lustrzana https://github.com/snarfed/bridgy-fed
add copy protocol (eg ATProto) handles to user pages
rodzic
0ed24c19b3
commit
f67cecd8f9
2
pages.py
2
pages.py
|
@ -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,
|
||||
|
|
|
@ -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) %}
|
||||
·
|
||||
<nobr title="{{ proto.__name__ }} (bridged)">
|
||||
<span class="logo">{{ proto.LOGO_HTML|safe }}</span>
|
||||
|
|
Ładowanie…
Reference in New Issue