Displaying website Url

merge-requests/30/head
Bob Mottram 2021-08-12 22:08:55 +01:00
parent 5a68eece77
commit b27fa065b4
2 changed files with 11 additions and 4 deletions

View File

@ -4837,10 +4837,13 @@ class PubServer(BaseHTTPRequestHandler):
actorChanged = True
# change website
currentWebsite = getWebsite(actorJson,
self.server.translate)
currentWebsite = \
getWebsite(actorJson, self.server.translate)
print('websiteUrl: 0')
if fields.get('websiteUrl'):
print('websiteUrl: 1 ' + fields['websiteUrl'])
if fields['websiteUrl'] != currentWebsite:
print('websiteUrl: 2 ' + fields['websiteUrl'])
setWebsite(actorJson,
fields['websiteUrl'],
self.server.translate)

View File

@ -559,7 +559,7 @@ def htmlProfile(rssIconAtTop: bool,
briarAddress = getBriarAddress(profileJson)
jamiAddress = getJamiAddress(profileJson)
cwtchAddress = getCwtchAddress(profileJson)
if donateUrl or xmppAddress or matrixAddress or \
if donateUrl or websiteUrl or xmppAddress or matrixAddress or \
ssbAddress or toxAddress or briarAddress or \
jamiAddress or cwtchAddress or PGPpubKey or \
PGPfingerprint or emailAddress:
@ -570,6 +570,10 @@ def htmlProfile(rssIconAtTop: bool,
' <p><a href="' + donateUrl + \
'"><button class="donateButton">' + translate['Donate'] + \
'</button></a></p>\n'
if websiteUrl:
donateSection += \
'<p>' + translate['Website'] + ': <a href="' + \
websiteUrl + '">' + websiteUrl + '</a></p>\n'
if emailAddress:
donateSection += \
'<p>' + translate['Email'] + ': <a href="mailto:' + \
@ -1854,7 +1858,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
isBot = isGroup = followDMs = removeTwitter = ''
notifyLikes = hideLikeButton = mediaInstanceStr = ''
blogsInstanceStr = newsInstanceStr = movedTo = ''
bioStr = donateUrl = emailAddress = PGPpubKey = ''
bioStr = donateUrl = websiteUrl = emailAddress = PGPpubKey = ''
PGPfingerprint = xmppAddress = matrixAddress = ''
ssbAddress = blogAddress = toxAddress = jamiAddress = ''
cwtchAddress = briarAddress = manuallyApprovesFollowers = ''