From b27fa065b40ac033cba2fcd3068a501b8e1696fd Mon Sep 17 00:00:00 2001 From: Bob Mottram <bob@freedombone.net> Date: Thu, 12 Aug 2021 22:08:55 +0100 Subject: [PATCH] Displaying website Url --- daemon.py | 7 +++++-- webapp_profile.py | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/daemon.py b/daemon.py index 618438a48..e53a8afbc 100644 --- a/daemon.py +++ b/daemon.py @@ -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) diff --git a/webapp_profile.py b/webapp_profile.py index 3980fc4ea..777a52e3d 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -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 = ''