Profile header links to default timeline

main
Bob Mottram 2019-11-28 17:09:57 +00:00
parent 9fdc2e1039
commit 829cdacd90
2 changed files with 16 additions and 9 deletions

View File

@ -2397,7 +2397,8 @@ class PubServer(BaseHTTPRequestHandler):
self.path.replace('/roles',''), \
self.server.baseDir)
if getPerson:
msg=htmlProfile(self.server.recentPostsCache, \
msg=htmlProfile(self.server.defaultTimeline, \
self.server.recentPostsCache, \
self.server.maxRecentPosts, \
self.server.translate, \
self.server.projectVersion, \
@ -2442,7 +2443,8 @@ class PubServer(BaseHTTPRequestHandler):
self.path.replace('/skills',''), \
self.server.baseDir)
if getPerson:
msg=htmlProfile(self.server.recentPostsCache, \
msg=htmlProfile(self.server.defaultTimeline, \
self.server.recentPostsCache, \
self.server.maxRecentPosts, \
self.server.translate, \
self.server.projectVersion, \
@ -3149,7 +3151,8 @@ class PubServer(BaseHTTPRequestHandler):
print('DEBUG: creating new session')
self.server.session= \
createSession(self.server.useTor)
msg=htmlProfile(self.server.recentPostsCache, \
msg=htmlProfile(self.server.defaultTimeline, \
self.server.recentPostsCache, \
self.server.maxRecentPosts, \
self.server.translate, \
self.server.projectVersion, \
@ -3208,7 +3211,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.session= \
createSession(self.server.useTor)
msg=htmlProfile(self.server.recentPostsCache, \
msg=htmlProfile(self.server.defaultTimeline, \
self.server.recentPostsCache, \
self.server.maxRecentPosts, \
self.server.translate, \
self.server.projectVersion, \
@ -3268,7 +3272,8 @@ class PubServer(BaseHTTPRequestHandler):
print('DEBUG: creating new session')
self.server.session= \
createSession(self.server.useTor)
msg=htmlProfile(self.server.recentPostsCache, \
msg=htmlProfile(self.server.defaultTimeline, \
self.server.recentPostsCache, \
self.server.maxRecentPosts, \
self.server.translate, \
self.server.projectVersion, \
@ -3308,7 +3313,8 @@ class PubServer(BaseHTTPRequestHandler):
print('DEBUG: creating new session')
self.server.session= \
createSession(self.server.useTor)
msg=htmlProfile(self.server.recentPostsCache, \
msg=htmlProfile(self.server.defaultTimeline, \
self.server.recentPostsCache, \
self.server.maxRecentPosts, \
self.server.translate, \
self.server.projectVersion, \

View File

@ -1377,7 +1377,8 @@ def htmlSharesTimeline(translate: {},pageNumber: int,itemsPerPage: int, \
return timelineStr
def htmlProfile(recentPostsCache: {},maxRecentPosts: int, \
def htmlProfile(defaultTimeline: str, \
recentPostsCache: {},maxRecentPosts: int, \
translate: {},projectVersion: str, \
baseDir: str,httpPrefix: str,authorized: bool, \
ocapAlways: bool,profileJson: {},selected: str, \
@ -1445,8 +1446,8 @@ def htmlProfile(recentPostsCache: {},maxRecentPosts: int, \
else:
editProfileStr='<a href="'+actor+'/editprofile"><button class="button"><span>'+translate['Edit']+' </span></button></a>'
logoutStr='<a href="/logout"><button class="button"><span>'+translate['Logout']+' </span></button></a>'
linkToTimelineStart='<a href="/users/'+nickname+'/inbox"><label class="transparent">'+translate['Switch to timeline view']+'</label></a>'
linkToTimelineStart+='<a href="/users/'+nickname+'/inbox" title="'+translate['Switch to timeline view']+'" alt="'+translate['Switch to timeline view']+'">'
linkToTimelineStart='<a href="/users/'+nickname+'/'+defaultTimeline+'"><label class="transparent">'+translate['Switch to timeline view']+'</label></a>'
linkToTimelineStart+='<a href="/users/'+nickname+'/'+defaultTimeline+'" title="'+translate['Switch to timeline view']+'" alt="'+translate['Switch to timeline view']+'">'
linkToTimelineEnd='</a>'
# are there any follow requests?
followRequestsFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/followrequests.txt'