Return to default timeline

merge-requests/8/head
Bob Mottram 2020-11-02 17:48:35 +00:00
parent f8760a57d4
commit d6ef3b8743
2 changed files with 6 additions and 5 deletions

View File

@ -8522,7 +8522,8 @@ class PubServer(BaseHTTPRequestHandler):
baseDir, baseDir,
path, domain, path, domain,
port, port,
httpPrefix).encode('utf-8') httpPrefix,
self.server.defaultTimeline).encode('utf-8')
if msg: if msg:
self._set_headers('text/html', len(msg), self._set_headers('text/html', len(msg),
cookie, callingDomain) cookie, callingDomain)

View File

@ -1480,11 +1480,11 @@ def htmlEditNewsPost(cssCache: {}, translate: {}, baseDir: str, path: str,
def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
domain: str, port: int, httpPrefix: str) -> str: domain: str, port: int, httpPrefix: str,
defaultTimeline: str) -> str:
"""Shows the edit profile screen """Shows the edit profile screen
""" """
imageFormats = '.png, .jpg, .jpeg, .gif, .webp, .avif' imageFormats = '.png, .jpg, .jpeg, .gif, .webp, .avif'
pathOriginal = path
path = path.replace('/inbox', '').replace('/outbox', '') path = path.replace('/inbox', '').replace('/outbox', '')
path = path.replace('/shares', '') path = path.replace('/shares', '')
nickname = getNicknameFromActor(path) nickname = getNicknameFromActor(path)
@ -1678,7 +1678,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
moderatorsStr = '' moderatorsStr = ''
themesDropdown = '' themesDropdown = ''
instanceStr = ''; instanceStr = ''
adminNickname = getConfigParam(baseDir, 'admin') adminNickname = getConfigParam(baseDir, 'admin')
if adminNickname: if adminNickname:
@ -1799,7 +1799,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
# top banner # top banner
editProfileForm += \ editProfileForm += \
'<a href="/users/' + nickname + '" title="' + \ '<a href="/users/' + nickname + '/' + defaultTimeline + '" title="' + \
translate['Switch to profile view'] + '" alt="' + \ translate['Switch to profile view'] + '" alt="' + \
translate['Switch to profile view'] + '">\n' translate['Switch to profile view'] + '">\n'
editProfileForm += '<img loading="lazy" class="timeline-banner" src="' + \ editProfileForm += '<img loading="lazy" class="timeline-banner" src="' + \