mirror of https://gitlab.com/bashrc2/epicyon
Key shortcuts on edit newswire screen
parent
5c25e262a8
commit
775255125b
11
daemon.py
11
daemon.py
|
@ -10469,6 +10469,14 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
"""Show the newswire from the right column
|
||||
"""
|
||||
if '/users/' in path and path.endswith('/editnewswire'):
|
||||
nickname = path.split('/users/')[1]
|
||||
if '/' in nickname:
|
||||
nickname = nickname.split('/')[0]
|
||||
|
||||
accessKeys = self.server.accessKeys
|
||||
if self.server.keyShortcuts.get(nickname):
|
||||
accessKeys = self.server.keyShortcuts[nickname]
|
||||
|
||||
msg = htmlEditNewswire(self.server.cssCache,
|
||||
translate,
|
||||
baseDir,
|
||||
|
@ -10476,7 +10484,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
port,
|
||||
httpPrefix,
|
||||
self.server.defaultTimeline,
|
||||
self.server.themeName).encode('utf-8')
|
||||
self.server.themeName,
|
||||
accessKeys).encode('utf-8')
|
||||
if msg:
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
|
|
@ -516,7 +516,8 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
|
|||
|
||||
def htmlEditNewswire(cssCache: {}, translate: {}, baseDir: str, path: str,
|
||||
domain: str, port: int, httpPrefix: str,
|
||||
defaultTimeline: str, theme: str) -> str:
|
||||
defaultTimeline: str, theme: str,
|
||||
accessKeys: {}) -> str:
|
||||
"""Shows the edit newswire screen
|
||||
"""
|
||||
if '/users/' not in path:
|
||||
|
@ -549,7 +550,8 @@ def htmlEditNewswire(cssCache: {}, translate: {}, baseDir: str, path: str,
|
|||
'<header>' + \
|
||||
'<a href="/users/' + nickname + '/' + defaultTimeline + '" title="' + \
|
||||
translate['Switch to timeline view'] + '" alt="' + \
|
||||
translate['Switch to timeline view'] + '">\n'
|
||||
translate['Switch to timeline view'] + '" ' + \
|
||||
'accesskey="' + accessKeys['menuTimeline'] + '">\n'
|
||||
editNewswireForm += '<img loading="lazy" class="timeline-banner" src="' + \
|
||||
'/users/' + nickname + '/' + bannerFile + '" ' + \
|
||||
'alt="" /></a>\n</header>'
|
||||
|
@ -565,7 +567,8 @@ def htmlEditNewswire(cssCache: {}, translate: {}, baseDir: str, path: str,
|
|||
' <div class="containerSubmitNewPost">\n'
|
||||
editNewswireForm += \
|
||||
' <input type="submit" name="submitNewswire" value="' + \
|
||||
translate['Submit'] + '">\n'
|
||||
translate['Submit'] + '" ' + \
|
||||
'accesskey="' + accessKeys['submitButton'] + '">\n'
|
||||
editNewswireForm += \
|
||||
' </div>\n'
|
||||
|
||||
|
|
Loading…
Reference in New Issue