mirror of https://gitlab.com/bashrc2/epicyon
Key shortcuts for newswire
parent
5e4bd5dfcb
commit
78fb223bd4
|
@ -11778,6 +11778,9 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
rssIconAtTop = self.server.rssIconAtTop
|
||||
iconsAsButtons = self.server.iconsAsButtons
|
||||
defaultTimeline = self.server.defaultTimeline
|
||||
accessKeys = self.server.accessKeys
|
||||
if self.server.keyShortcuts.get(nickname):
|
||||
accessKeys = self.server.keyShortcuts[nickname]
|
||||
msg = htmlNewswireMobile(self.server.cssCache,
|
||||
self.server.baseDir,
|
||||
nickname,
|
||||
|
@ -11793,7 +11796,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
rssIconAtTop,
|
||||
iconsAsButtons,
|
||||
defaultTimeline,
|
||||
self.server.themeName).encode('utf-8')
|
||||
self.server.themeName,
|
||||
accessKeys).encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
cookie, callingDomain)
|
||||
|
|
|
@ -51,7 +51,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
|||
authorized: bool,
|
||||
showHeaderImage: bool,
|
||||
theme: str,
|
||||
defaultTimeline: str) -> str:
|
||||
defaultTimeline: str,
|
||||
accessKeys: {}) -> str:
|
||||
"""Returns html content for the right column
|
||||
"""
|
||||
htmlStr = ''
|
||||
|
@ -69,7 +70,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
|||
publishButtonStr = \
|
||||
' <a href="' + \
|
||||
'/users/' + nickname + '/newblog?nodropdown" ' + \
|
||||
'title="' + titleStr + '">' + \
|
||||
'title="' + titleStr + '" ' + \
|
||||
'accesskey="' + accessKeys['menuNewPost'] + '">' + \
|
||||
'<button class="publishbtn">' + \
|
||||
translate['Publish'] + '</button></a>\n'
|
||||
else:
|
||||
|
@ -124,7 +126,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
|||
# show the edit icon highlighted
|
||||
htmlStr += \
|
||||
' <a href="' + \
|
||||
'/users/' + nickname + '/editnewswire">' + \
|
||||
'/users/' + nickname + '/editnewswire" ' + \
|
||||
'accesskey="' + accessKeys['menuEdit'] + '">' + \
|
||||
'<img class="' + editImageClass + \
|
||||
'" loading="lazy" alt="' + \
|
||||
translate['Edit newswire'] + ' | " title="' + \
|
||||
|
@ -134,7 +137,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
|||
# show the edit icon
|
||||
htmlStr += \
|
||||
' <a href="' + \
|
||||
'/users/' + nickname + '/editnewswire">' + \
|
||||
'/users/' + nickname + '/editnewswire" ' + \
|
||||
'accesskey="' + accessKeys['menuEdit'] + '">' + \
|
||||
'<img class="' + editImageClass + \
|
||||
'" loading="lazy" alt="' + \
|
||||
translate['Edit newswire'] + ' | " title="' + \
|
||||
|
@ -444,7 +448,8 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
|
|||
rssIconAtTop: bool,
|
||||
iconsAsButtons: bool,
|
||||
defaultTimeline: str,
|
||||
theme: str) -> str:
|
||||
theme: str,
|
||||
accessKeys: {}) -> str:
|
||||
"""Shows the mobile version of the newswire right column
|
||||
"""
|
||||
htmlStr = ''
|
||||
|
@ -473,7 +478,8 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
|
|||
bannerFile, bannerFilename = \
|
||||
getBannerFile(baseDir, nickname, domain, theme)
|
||||
htmlStr += \
|
||||
'<a href="/users/' + nickname + '/' + defaultTimeline + '">' + \
|
||||
'<a href="/users/' + nickname + '/' + defaultTimeline + '" ' + \
|
||||
'accesskey="' + accessKeys['menuTimeline'] + '">' + \
|
||||
'<img loading="lazy" class="timeline-banner" ' + \
|
||||
'alt="' + translate['Timeline banner image'] + '" ' + \
|
||||
'src="/users/' + nickname + '/' + bannerFile + '" /></a>\n'
|
||||
|
@ -493,7 +499,7 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
|
|||
False, timelinePath, showPublishButton,
|
||||
showPublishAsIcon, rssIconAtTop, False,
|
||||
authorized, False, theme,
|
||||
defaultTimeline)
|
||||
defaultTimeline, accessKeys)
|
||||
else:
|
||||
if editor:
|
||||
htmlStr += '<br><br><br>\n'
|
||||
|
|
|
@ -174,7 +174,7 @@ def htmlFrontScreen(rssIconAtTop: bool,
|
|||
False, False, newswire, False,
|
||||
False, None, False, False,
|
||||
False, True, authorized, True, theme,
|
||||
defaultTimeline)
|
||||
defaultTimeline, accessKeys)
|
||||
profileFooterStr += ' </td>\n'
|
||||
profileFooterStr += ' </tr>\n'
|
||||
profileFooterStr += ' </tbody>\n'
|
||||
|
|
|
@ -780,7 +780,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
showPublishAsIcon,
|
||||
rssIconAtTop, publishButtonAtTop,
|
||||
authorized, True, theme,
|
||||
defaultTimeline)
|
||||
defaultTimeline, accessKeys)
|
||||
tlStr += ' <td valign="top" class="col-right" ' + \
|
||||
'id="newswire" tabindex="-1">' + \
|
||||
rightColumnStr + ' </td>\n'
|
||||
|
|
Loading…
Reference in New Issue