mirror of https://gitlab.com/bashrc2/epicyon
Show onion address on about screen
parent
c73f4970c5
commit
859fe460b9
|
@ -1344,11 +1344,13 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = \
|
||||
htmlAbout(self.server.baseDir,
|
||||
self.server.httpPrefix,
|
||||
self.server.domainFull).encode()
|
||||
self.server.domainFull,
|
||||
self.server.onionDomain).encode()
|
||||
else:
|
||||
msg = \
|
||||
htmlAbout(self.server.baseDir, 'http',
|
||||
self.server.onionDomain).encode()
|
||||
self.server.onionDomain,
|
||||
None).encode()
|
||||
self._login_headers('text/html', len(msg), callingDomain)
|
||||
self._write(msg)
|
||||
return
|
||||
|
|
|
@ -1437,7 +1437,8 @@ def htmlTermsOfService(baseDir: str, httpPrefix: str, domainFull: str) -> str:
|
|||
return TOSForm
|
||||
|
||||
|
||||
def htmlAbout(baseDir: str, httpPrefix: str, domainFull: str) -> str:
|
||||
def htmlAbout(baseDir: str, httpPrefix: str,
|
||||
domainFull: str, onionDomain: str) -> str:
|
||||
"""Show the about screen
|
||||
"""
|
||||
adminNickname = getConfigParam(baseDir, 'admin')
|
||||
|
@ -1466,6 +1467,9 @@ def htmlAbout(baseDir: str, httpPrefix: str, domainFull: str) -> str:
|
|||
|
||||
aboutForm = htmlHeader(cssFilename, termsCSS)
|
||||
aboutForm += '<div class="container">' + aboutText + '</div>'
|
||||
if onionDomain:
|
||||
aboutForm += \
|
||||
'<div class="container">http://' + onionDomain + '</div>'
|
||||
if adminNickname:
|
||||
adminActor = \
|
||||
httpPrefix + '://' + domainFull + '/users/' + adminNickname
|
||||
|
|
Loading…
Reference in New Issue