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 = \
|
msg = \
|
||||||
htmlAbout(self.server.baseDir,
|
htmlAbout(self.server.baseDir,
|
||||||
self.server.httpPrefix,
|
self.server.httpPrefix,
|
||||||
self.server.domainFull).encode()
|
self.server.domainFull,
|
||||||
|
self.server.onionDomain).encode()
|
||||||
else:
|
else:
|
||||||
msg = \
|
msg = \
|
||||||
htmlAbout(self.server.baseDir, 'http',
|
htmlAbout(self.server.baseDir, 'http',
|
||||||
self.server.onionDomain).encode()
|
self.server.onionDomain,
|
||||||
|
None).encode()
|
||||||
self._login_headers('text/html', len(msg), callingDomain)
|
self._login_headers('text/html', len(msg), callingDomain)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
return
|
return
|
||||||
|
|
|
@ -1437,7 +1437,8 @@ def htmlTermsOfService(baseDir: str, httpPrefix: str, domainFull: str) -> str:
|
||||||
return TOSForm
|
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
|
"""Show the about screen
|
||||||
"""
|
"""
|
||||||
adminNickname = getConfigParam(baseDir, 'admin')
|
adminNickname = getConfigParam(baseDir, 'admin')
|
||||||
|
@ -1466,6 +1467,9 @@ def htmlAbout(baseDir: str, httpPrefix: str, domainFull: str) -> str:
|
||||||
|
|
||||||
aboutForm = htmlHeader(cssFilename, termsCSS)
|
aboutForm = htmlHeader(cssFilename, termsCSS)
|
||||||
aboutForm += '<div class="container">' + aboutText + '</div>'
|
aboutForm += '<div class="container">' + aboutText + '</div>'
|
||||||
|
if onionDomain:
|
||||||
|
aboutForm += \
|
||||||
|
'<div class="container">http://' + onionDomain + '</div>'
|
||||||
if adminNickname:
|
if adminNickname:
|
||||||
adminActor = \
|
adminActor = \
|
||||||
httpPrefix + '://' + domainFull + '/users/' + adminNickname
|
httpPrefix + '://' + domainFull + '/users/' + adminNickname
|
||||||
|
|
Loading…
Reference in New Issue