mirror of https://gitlab.com/bashrc2/epicyon
Key shortcut to key shortcuts
parent
0f778b5d58
commit
04b7ba0065
|
@ -11781,6 +11781,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self._404()
|
self._404()
|
||||||
self.server.GETbusy = False
|
self.server.GETbusy = False
|
||||||
return
|
return
|
||||||
|
accessKeys = self.server.accessKeys
|
||||||
|
if self.server.keyShortcuts.get(nickname):
|
||||||
|
accessKeys = self.server.keyShortcuts[nickname]
|
||||||
timelinePath = \
|
timelinePath = \
|
||||||
'/users/' + nickname + '/' + self.server.defaultTimeline
|
'/users/' + nickname + '/' + self.server.defaultTimeline
|
||||||
iconsAsButtons = self.server.iconsAsButtons
|
iconsAsButtons = self.server.iconsAsButtons
|
||||||
|
@ -11795,7 +11798,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
iconsAsButtons,
|
iconsAsButtons,
|
||||||
defaultTimeline,
|
defaultTimeline,
|
||||||
self.server.themeName).encode('utf-8')
|
self.server.themeName,
|
||||||
|
accessKeys).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen, cookie, callingDomain)
|
self._set_headers('text/html', msglen, cookie, callingDomain)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
|
|
|
@ -68,7 +68,8 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
editor: bool,
|
editor: bool,
|
||||||
showBackButton: bool, timelinePath: str,
|
showBackButton: bool, timelinePath: str,
|
||||||
rssIconAtTop: bool, showHeaderImage: bool,
|
rssIconAtTop: bool, showHeaderImage: bool,
|
||||||
frontPage: bool, theme: str) -> str:
|
frontPage: bool, theme: str,
|
||||||
|
accessKeys: {}) -> str:
|
||||||
"""Returns html content for the left column
|
"""Returns html content for the left column
|
||||||
"""
|
"""
|
||||||
htmlStr = ''
|
htmlStr = ''
|
||||||
|
@ -256,7 +257,8 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
htmlStr += separatorStr
|
htmlStr += separatorStr
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
'<p class="login-text"><a href="/users/' + \
|
'<p class="login-text"><a href="/users/' + \
|
||||||
nickname + '/accesskeys">' + \
|
nickname + '/accesskeys" accesskeys="' + \
|
||||||
|
accessKeys['menuKeys'] + '">' + \
|
||||||
translate['Key Shortcuts'] + '</a></p>'
|
translate['Key Shortcuts'] + '</a></p>'
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
'<p class="login-text"><a href="/about">' + \
|
'<p class="login-text"><a href="/about">' + \
|
||||||
|
@ -278,7 +280,7 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
defaultTimeline: str,
|
defaultTimeline: str,
|
||||||
theme: str) -> str:
|
theme: str, accessKeys: {}) -> str:
|
||||||
"""Show the left column links within mobile view
|
"""Show the left column links within mobile view
|
||||||
"""
|
"""
|
||||||
htmlStr = ''
|
htmlStr = ''
|
||||||
|
@ -321,7 +323,7 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
|
||||||
editor,
|
editor,
|
||||||
False, timelinePath,
|
False, timelinePath,
|
||||||
rssIconAtTop, False, False,
|
rssIconAtTop, False, False,
|
||||||
theme)
|
theme, accessKeys)
|
||||||
else:
|
else:
|
||||||
if editor:
|
if editor:
|
||||||
htmlStr += '<br><br><br>\n'
|
htmlStr += '<br><br><br>\n'
|
||||||
|
|
|
@ -96,6 +96,7 @@ def htmlFrontScreen(rssIconAtTop: bool,
|
||||||
newswire: {}, theme: str,
|
newswire: {}, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
|
accessKeys: {},
|
||||||
extraJson=None,
|
extraJson=None,
|
||||||
pageNumber=None, maxItemsPerPage=None) -> str:
|
pageNumber=None, maxItemsPerPage=None) -> str:
|
||||||
"""Show the news instance front screen
|
"""Show the news instance front screen
|
||||||
|
@ -138,7 +139,7 @@ def htmlFrontScreen(rssIconAtTop: bool,
|
||||||
getLeftColumnContent(baseDir, 'news', domainFull,
|
getLeftColumnContent(baseDir, 'news', domainFull,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
False, False, None, rssIconAtTop, True,
|
False, False, None, rssIconAtTop, True,
|
||||||
True, theme)
|
True, theme, accessKeys)
|
||||||
profileHeaderStr += ' </td>\n'
|
profileHeaderStr += ' </td>\n'
|
||||||
profileHeaderStr += ' <td valign="top" class="col-center">\n'
|
profileHeaderStr += ' <td valign="top" class="col-center">\n'
|
||||||
|
|
||||||
|
|
|
@ -516,7 +516,7 @@ def htmlProfile(rssIconAtTop: bool,
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
newswire, theme, extraJson,
|
newswire, theme, extraJson,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess, accessKeys,
|
||||||
pageNumber, maxItemsPerPage)
|
pageNumber, maxItemsPerPage)
|
||||||
|
|
||||||
domain, port = getDomainFromActor(profileJson['id'])
|
domain, port = getDomainFromActor(profileJson['id'])
|
||||||
|
|
|
@ -535,7 +535,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
getLeftColumnContent(baseDir, nickname, domainFull,
|
getLeftColumnContent(baseDir, nickname, domainFull,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
editor, False, None, rssIconAtTop,
|
editor, False, None, rssIconAtTop,
|
||||||
True, False, theme)
|
True, False, theme, accessKeys)
|
||||||
tlStr += ' <td valign="top" class="col-left" ' + \
|
tlStr += ' <td valign="top" class="col-left" ' + \
|
||||||
'id="links" tabindex="-1">' + \
|
'id="links" tabindex="-1">' + \
|
||||||
leftColumnStr + ' </td>\n'
|
leftColumnStr + ' </td>\n'
|
||||||
|
|
Loading…
Reference in New Issue