From eacf9964f0f554ecf4f3c52671c344ce33198a16 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 12 Nov 2020 23:50:25 +0000 Subject: [PATCH] Remove back button on handgle search screen --- daemon.py | 3 ++- webapp_profile.py | 25 ++++++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/daemon.py b/daemon.py index cb5a2c53..9b86068c 100644 --- a/daemon.py +++ b/daemon.py @@ -2441,7 +2441,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.debug, self.server.projectVersion, self.server.YTReplacementDomain, - self.server.showPublishedDateOnly) + self.server.showPublishedDateOnly, + self.server.defaultTimeline) if profileStr: msg = profileStr.encode('utf-8') self._login_headers('text/html', diff --git a/webapp_profile.py b/webapp_profile.py index 4fd0ad0f..ee0c8144 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -55,7 +55,8 @@ def htmlProfileAfterSearch(cssCache: {}, session, cachedWebfingers: {}, personCache: {}, debug: bool, projectVersion: str, YTReplacementDomain: str, - showPublishedDateOnly: bool) -> str: + showPublishedDateOnly: bool, + defaultTimeline: str) -> str: """Show a profile page after a search for a fediverse address """ if '/users/' in profileHandle or \ @@ -215,7 +216,9 @@ def htmlProfileAfterSearch(cssCache: {}, imageUrl = profileJson['image']['url'] profileStr = \ - getProfileHeaderAfterSearch(baseDir, searchNickname, + getProfileHeaderAfterSearch(baseDir, + nickname, defaultTimeline, + searchNickname, searchDomainFull, translate, displayName, @@ -229,9 +232,9 @@ def htmlProfileAfterSearch(cssCache: {}, profileStr += \ ' \n' - profileStr += \ - ' \n' + # profileStr += \ + # ' \n' profileStr += \ ' \n' @@ -308,7 +311,9 @@ def getProfileHeader(baseDir: str, nickname: str, domain: str, return htmlStr -def getProfileHeaderAfterSearch(baseDir: str, searchNickname: str, +def getProfileHeaderAfterSearch(baseDir: str, + nickname: str, defaultTimeline: str, + searchNickname: str, searchDomainFull: str, translate: {}, displayName: str, @@ -318,13 +323,19 @@ def getProfileHeaderAfterSearch(baseDir: str, searchNickname: str, image and avatar """ htmlStr = '\n\n
\n' + htmlStr += ' \n' htmlStr += ' \n' htmlStr += '
\n' if avatarUrl: + htmlStr += ' \n' htmlStr += \ ' \n' + ' class="title">\n' htmlStr += '

' + displayName + '

\n' htmlStr += \ '

@' + searchNickname + '@' + searchDomainFull + '
\n'