Remove back button on handgle search screen

main
Bob Mottram 2020-11-12 23:50:25 +00:00
parent f8885e26b7
commit eacf9964f0
2 changed files with 20 additions and 8 deletions

View File

@ -2441,7 +2441,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.debug, self.server.debug,
self.server.projectVersion, self.server.projectVersion,
self.server.YTReplacementDomain, self.server.YTReplacementDomain,
self.server.showPublishedDateOnly) self.server.showPublishedDateOnly,
self.server.defaultTimeline)
if profileStr: if profileStr:
msg = profileStr.encode('utf-8') msg = profileStr.encode('utf-8')
self._login_headers('text/html', self._login_headers('text/html',

View File

@ -55,7 +55,8 @@ def htmlProfileAfterSearch(cssCache: {},
session, cachedWebfingers: {}, personCache: {}, session, cachedWebfingers: {}, personCache: {},
debug: bool, projectVersion: str, debug: bool, projectVersion: str,
YTReplacementDomain: str, YTReplacementDomain: str,
showPublishedDateOnly: bool) -> str: showPublishedDateOnly: bool,
defaultTimeline: str) -> str:
"""Show a profile page after a search for a fediverse address """Show a profile page after a search for a fediverse address
""" """
if '/users/' in profileHandle or \ if '/users/' in profileHandle or \
@ -215,7 +216,9 @@ def htmlProfileAfterSearch(cssCache: {},
imageUrl = profileJson['image']['url'] imageUrl = profileJson['image']['url']
profileStr = \ profileStr = \
getProfileHeaderAfterSearch(baseDir, searchNickname, getProfileHeaderAfterSearch(baseDir,
nickname, defaultTimeline,
searchNickname,
searchDomainFull, searchDomainFull,
translate, translate,
displayName, displayName,
@ -229,9 +232,9 @@ def htmlProfileAfterSearch(cssCache: {},
profileStr += \ profileStr += \
' <input type="hidden" name="actor" value="' + \ ' <input type="hidden" name="actor" value="' + \
personUrl + '">\n' personUrl + '">\n'
profileStr += \ # profileStr += \
' <a href="' + backUrl + '"><button class="button">' + \ # ' <a href="' + backUrl + '"><button class="button">' + \
translate['Go Back'] + '</button></a>\n' # translate['Go Back'] + '</button></a>\n'
profileStr += \ profileStr += \
' <button type="submit" class="button" name="submitYes">' + \ ' <button type="submit" class="button" name="submitYes">' + \
translate['Follow'] + '</button>\n' translate['Follow'] + '</button>\n'
@ -308,7 +311,9 @@ def getProfileHeader(baseDir: str, nickname: str, domain: str,
return htmlStr return htmlStr
def getProfileHeaderAfterSearch(baseDir: str, searchNickname: str, def getProfileHeaderAfterSearch(baseDir: str,
nickname: str, defaultTimeline: str,
searchNickname: str,
searchDomainFull: str, searchDomainFull: str,
translate: {}, translate: {},
displayName: str, displayName: str,
@ -318,13 +323,19 @@ def getProfileHeaderAfterSearch(baseDir: str, searchNickname: str,
image and avatar image and avatar
""" """
htmlStr = '\n\n <figure class="profileHeader">\n' htmlStr = '\n\n <figure class="profileHeader">\n'
htmlStr += ' <a href="/users/' + \
nickname + '/' + defaultTimeline + '" title="' + \
translate['Switch to timeline view'] + '">\n'
htmlStr += ' <img class="profileBackground" ' + \ htmlStr += ' <img class="profileBackground" ' + \
'src="' + imageUrl + '" /></a>\n' 'src="' + imageUrl + '" /></a>\n'
htmlStr += ' <figcaption>\n' htmlStr += ' <figcaption>\n'
if avatarUrl: if avatarUrl:
htmlStr += ' <a href="/users/' + \
nickname + '/' + defaultTimeline + '" title="' + \
translate['Switch to timeline view'] + '">\n'
htmlStr += \ htmlStr += \
' <img loading="lazy" src="' + avatarUrl + '" ' + \ ' <img loading="lazy" src="' + avatarUrl + '" ' + \
' class="title">\n' ' class="title"></a>\n'
htmlStr += ' <h1>' + displayName + '</h1>\n' htmlStr += ' <h1>' + displayName + '</h1>\n'
htmlStr += \ htmlStr += \
' <p><b>@' + searchNickname + '@' + searchDomainFull + '</b><br>\n' ' <p><b>@' + searchNickname + '@' + searchDomainFull + '</b><br>\n'