Change profile for news account

main
Bob Mottram 2020-10-13 11:17:22 +01:00
parent 18e9cd602c
commit b987367bda
1 changed files with 20 additions and 18 deletions

View File

@ -3339,10 +3339,9 @@ def htmlProfile(defaultTimeline: str,
donateSection += '</div>\n' donateSection += '</div>\n'
if not authorized: if not authorized:
if not isSystemAccount(nickname): loginButton = \
loginButton = \ '<br><a href="/login"><button class="loginButton">' + \
'<br><a href="/login"><button class="loginButton">' + \ translate['Login'] + '</button></a>'
translate['Login'] + '</button></a>'
else: else:
editProfileStr = \ editProfileStr = \
'<a href="' + usersPath + \ '<a href="' + usersPath + \
@ -3426,20 +3425,23 @@ def htmlProfile(defaultTimeline: str,
avatarDescription = avatarDescription.replace('</p>', '') avatarDescription = avatarDescription.replace('</p>', '')
profileHeaderStr = '<div class="hero-image">' profileHeaderStr = '<div class="hero-image">'
profileHeaderStr += ' <div class="hero-text">' profileHeaderStr += ' <div class="hero-text">'
profileHeaderStr += \
' <img loading="lazy" src="' + profileJson['icon']['url'] + \ # TODO maybe display an alternate system account banner
'" title="' + avatarDescription + '" alt="' + \ if not isSystemAccount(nickname):
avatarDescription + '" class="title">' profileHeaderStr += \
profileHeaderStr += ' <h1>' + displayName + '</h1>' ' <img loading="lazy" src="' + profileJson['icon']['url'] + \
iconsDir = getIconsDir(baseDir) '" title="' + avatarDescription + '" alt="' + \
profileHeaderStr += \ avatarDescription + '" class="title">'
'<p><b>@' + nickname + '@' + domainFull + '</b><br>' profileHeaderStr += ' <h1>' + displayName + '</h1>'
profileHeaderStr += \ iconsDir = getIconsDir(baseDir)
'<a href="/users/' + nickname + \ profileHeaderStr += \
'/qrcode.png" alt="' + translate['QR Code'] + '" title="' + \ '<p><b>@' + nickname + '@' + domainFull + '</b><br>'
translate['QR Code'] + '">' + \ profileHeaderStr += \
'<img class="qrcode" src="/' + iconsDir + '/qrcode.png" /></a></p>' '<a href="/users/' + nickname + \
profileHeaderStr += ' <p>' + profileDescriptionShort + '</p>' '/qrcode.png" alt="' + translate['QR Code'] + '" title="' + \
translate['QR Code'] + '">' + \
'<img class="qrcode" src="/' + iconsDir + '/qrcode.png" /></a></p>'
profileHeaderStr += ' <p>' + profileDescriptionShort + '</p>'
profileHeaderStr += loginButton profileHeaderStr += loginButton
profileHeaderStr += ' </div>' profileHeaderStr += ' </div>'
profileHeaderStr += '</div>' profileHeaderStr += '</div>'