From c18dd9fb2ba6287f401989d7120d32c9ad74320e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 12 Nov 2020 22:41:41 +0000 Subject: [PATCH] Avatar url --- webapp_profile.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index 10d256e12..6c16f8f2a 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -208,6 +208,7 @@ def htmlProfileAfterSearch(cssCache: {}, avatarDescription = avatarDescription.replace('

', '') if '<' in avatarDescription: avatarDescription = removeHtml(avatarDescription) + profileStr = '
\n' profileStr += '
\n' if avatarUrl: @@ -221,6 +222,7 @@ def htmlProfileAfterSearch(cssCache: {}, profileStr += '

' + profileDescriptionShort + '

\n' profileStr += '
\n' profileStr += '
\n' + profileStr += '
\n' profileStr += '
\n' @@ -274,7 +276,7 @@ def getProfileHeader(baseDir: str, nickname: str, domain: str, displayName: str, avatarDescription: str, profileDescriptionShort: str, - loginButton: str) -> str: + loginButton: str, avatarUrl: str) -> str: """The header of the profile screen, containing background image and avatar """ @@ -285,8 +287,8 @@ def getProfileHeader(baseDir: str, nickname: str, domain: str, htmlStr += ' \n' htmlStr += '
\n' htmlStr += \ - ' ' + \
+        '    <img loading=\n' htmlStr += '

' + displayName + '

\n' htmlStr += \ @@ -533,13 +535,14 @@ def htmlProfile(rssIconAtTop: bool, profileHeaderStr += ' \n' profileHeaderStr += ' \n' else: + avatarUrl = profileJson['icon']['url'] profileHeaderStr = \ getProfileHeader(baseDir, nickname, domain, domainFull, translate, iconsDir, defaultTimeline, displayName, avatarDescription, profileDescriptionShort, - loginButton) + loginButton, avatarUrl) profileStr = \ linkToTimelineStart + profileHeaderStr + \ @@ -1228,12 +1231,11 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, ' \n' - if nickname == adminNickname: - editProfileForm += \ - '
\n' - editProfileForm += ' \n' + editProfileForm += \ + '
\n' + editProfileForm += ' \n' editProfileForm += '
\n'