Text mode banner for person options

merge-requests/30/head
Bob Mottram 2021-02-12 19:29:10 +00:00
parent 8a499bb574
commit 37c0ea8e83
2 changed files with 6 additions and 2 deletions

View File

@ -5469,7 +5469,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.dormantMonths,
backToPath,
lockedAccount,
movedTo, alsoKnownAs).encode('utf-8')
movedTo, alsoKnownAs,
self.server.textModeBanner).encode('utf-8')
msglen = len(msg)
self._set_headers('text/html', msglen,
cookie, callingDomain)

View File

@ -24,6 +24,7 @@ from followingCalendar import receivingCalendarEvents
from webapp_utils import htmlHeaderWithExternalStyle
from webapp_utils import htmlFooter
from webapp_utils import getBrokenLinkSubstitute
from webapp_utils import htmlKeyboardNavigation
def htmlPersonOptions(defaultTimeline: str,
@ -49,7 +50,8 @@ def htmlPersonOptions(defaultTimeline: str,
backToPath: str,
lockedAccount: bool,
movedTo: str,
alsoKnownAs: []) -> str:
alsoKnownAs: [],
textModeBanner: str) -> str:
"""Show options for a person: view/follow/block/report
"""
optionsDomain, optionsPort = getDomainFromActor(optionsActor)
@ -114,6 +116,7 @@ def htmlPersonOptions(defaultTimeline: str,
instanceTitle = \
getConfigParam(baseDir, 'instanceTitle')
optionsStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
optionsStr += htmlKeyboardNavigation(textModeBanner, {})
optionsStr += '<br><br>\n'
optionsStr += '<div class="options">\n'
optionsStr += ' <div class="optionsAvatar">\n'