From c734aaddcd0fb04fb11957ad8491b940dc6029eb Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 27 Oct 2020 18:37:58 +0000 Subject: [PATCH] Show newswire and links buttons on login screen --- daemon.py | 22 ++++++++++++++++------ webinterface.py | 46 +++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 57 insertions(+), 11 deletions(-) diff --git a/daemon.py b/daemon.py index 24205b162..3c3084309 100644 --- a/daemon.py +++ b/daemon.py @@ -6048,8 +6048,11 @@ class PubServer(BaseHTTPRequestHandler): self.server.cachedWebfingers YTReplacementDomain = \ self.server.YTReplacementDomain + iconsAsButtons = \ + self.server.iconsAsButtons msg = \ - htmlProfile(defaultTimeline, + htmlProfile(iconsAsButtons, + defaultTimeline, recentPostsCache, self.server.maxRecentPosts, self.server.translate, @@ -6122,8 +6125,11 @@ class PubServer(BaseHTTPRequestHandler): self.server.YTReplacementDomain showPublishedDateOnly = \ self.server.showPublishedDateOnly + iconsAsButtons = \ + self.server.iconsAsButtons msg = \ - htmlProfile(defaultTimeline, + htmlProfile(iconsAsButtons, + defaultTimeline, recentPostsCache, self.server.maxRecentPosts, self.server.translate, @@ -7660,7 +7666,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.GETbusy = False return True msg = \ - htmlProfile(self.server.defaultTimeline, + htmlProfile(self.server.iconsAsButtons, + self.server.defaultTimeline, self.server.recentPostsCache, self.server.maxRecentPosts, self.server.translate, @@ -7748,7 +7755,8 @@ class PubServer(BaseHTTPRequestHandler): return True msg = \ - htmlProfile(self.server.defaultTimeline, + htmlProfile(self.server.iconsAsButtons, + self.server.defaultTimeline, self.server.recentPostsCache, self.server.maxRecentPosts, self.server.translate, @@ -7835,7 +7843,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.GETbusy = False return True msg = \ - htmlProfile(self.server.defaultTimeline, + htmlProfile(self.server.iconsAsButtons, + self.server.defaultTimeline, self.server.recentPostsCache, self.server.maxRecentPosts, self.server.translate, @@ -7898,7 +7907,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.GETbusy = False return True msg = \ - htmlProfile(self.server.defaultTimeline, + htmlProfile(self.server.iconsAsButtons, + self.server.defaultTimeline, self.server.recentPostsCache, self.server.maxRecentPosts, self.server.translate, diff --git a/webinterface.py b/webinterface.py index 39b8bb505..e6bfb9d5a 100644 --- a/webinterface.py +++ b/webinterface.py @@ -3273,7 +3273,7 @@ def htmlSharesTimeline(translate: {}, pageNumber: int, itemsPerPage: int, return timelineStr -def htmlProfile(defaultTimeline: str, +def htmlProfile(iconsAsButtons: bool, defaultTimeline: str, recentPostsCache: {}, maxRecentPosts: int, translate: {}, projectVersion: str, baseDir: str, httpPrefix: str, authorized: bool, @@ -3379,12 +3379,48 @@ def htmlProfile(defaultTimeline: str, donateSection += ' \n' donateSection += '\n' + iconsDir = getIconsDir(baseDir) if not authorized: - loginButton = \ - '
' + loginButton = '
' + # the links button to show left column links + if not iconsAsButtons: + loginButton += \ + ' ' + \ + '| ' + translate['News'] + \
+                '\n' + loginButton += \ + ' ' + \ + '| ' + translate['Edit Links'] + \
+                '\n' + loginButton += \ + '' + else: + loginButton += \ + ' \n' + loginButton += \ + ' \n' + loginButton += \ + ' \n' else: - iconsDir = getIconsDir(baseDir) editProfileStr = \ '' + \ '