mirror of https://gitlab.com/bashrc2/epicyon
Access keys on profile screen
parent
73860b1d44
commit
b4a26ef2ab
15
daemon.py
15
daemon.py
|
@ -7365,6 +7365,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.allowLocalNetworkAccess,
|
self.server.allowLocalNetworkAccess,
|
||||||
self.server.textModeBanner,
|
self.server.textModeBanner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
|
self.server.accessKeys,
|
||||||
actorJson['roles'],
|
actorJson['roles'],
|
||||||
None, None)
|
None, None)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
|
@ -7454,6 +7455,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
self.server.textModeBanner,
|
self.server.textModeBanner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
|
self.server.accessKeys,
|
||||||
actorJson['skills'],
|
actorJson['skills'],
|
||||||
None, None)
|
None, None)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
|
@ -9271,6 +9273,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.allowLocalNetworkAccess,
|
self.server.allowLocalNetworkAccess,
|
||||||
self.server.textModeBanner,
|
self.server.textModeBanner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
|
self.server.accessKeys,
|
||||||
shares,
|
shares,
|
||||||
pageNumber, sharesPerPage)
|
pageNumber, sharesPerPage)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
|
@ -9371,6 +9374,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.allowLocalNetworkAccess,
|
self.server.allowLocalNetworkAccess,
|
||||||
self.server.textModeBanner,
|
self.server.textModeBanner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
|
self.server.accessKeys,
|
||||||
following,
|
following,
|
||||||
pageNumber,
|
pageNumber,
|
||||||
followsPerPage).encode('utf-8')
|
followsPerPage).encode('utf-8')
|
||||||
|
@ -9470,6 +9474,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.allowLocalNetworkAccess,
|
self.server.allowLocalNetworkAccess,
|
||||||
self.server.textModeBanner,
|
self.server.textModeBanner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
|
self.server.accessKeys,
|
||||||
followers,
|
followers,
|
||||||
pageNumber,
|
pageNumber,
|
||||||
followsPerPage).encode('utf-8')
|
followsPerPage).encode('utf-8')
|
||||||
|
@ -9592,6 +9597,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.allowLocalNetworkAccess,
|
self.server.allowLocalNetworkAccess,
|
||||||
self.server.textModeBanner,
|
self.server.textModeBanner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
|
self.server.accessKeys,
|
||||||
None, None).encode('utf-8')
|
None, None).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -14491,6 +14497,8 @@ def runDaemon(brochMode: bool,
|
||||||
|
|
||||||
# key shortcuts SHIFT + ALT + [key]
|
# key shortcuts SHIFT + ALT + [key]
|
||||||
httpd.accessKeys = {
|
httpd.accessKeys = {
|
||||||
|
'menuTimeline': 't',
|
||||||
|
'menuEdit': 'e',
|
||||||
'menuProfile': 'p',
|
'menuProfile': 'p',
|
||||||
'menuInbox': 'i',
|
'menuInbox': 'i',
|
||||||
'menuSearch': '/',
|
'menuSearch': '/',
|
||||||
|
@ -14504,7 +14512,12 @@ def runDaemon(brochMode: bool,
|
||||||
'menuBlogs': 'b',
|
'menuBlogs': 'b',
|
||||||
'menuNewswire': 'w',
|
'menuNewswire': 'w',
|
||||||
'menuLinks': 'l',
|
'menuLinks': 'l',
|
||||||
'menuModeration': 'm'
|
'menuModeration': 'm',
|
||||||
|
'menuFollowing': 'f',
|
||||||
|
'menuFollowers': 'g',
|
||||||
|
'menuRoles': 'o',
|
||||||
|
'menuSkills': 'a',
|
||||||
|
'menuLogout': 'x'
|
||||||
}
|
}
|
||||||
|
|
||||||
httpd.unitTest = unitTest
|
httpd.unitTest = unitTest
|
||||||
|
|
|
@ -489,7 +489,7 @@ def htmlProfile(rssIconAtTop: bool,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
textModeBanner: str,
|
textModeBanner: str,
|
||||||
debug: bool,
|
debug: bool, accessKeys: {},
|
||||||
extraJson=None, pageNumber=None,
|
extraJson=None, pageNumber=None,
|
||||||
maxItemsPerPage=None) -> str:
|
maxItemsPerPage=None) -> str:
|
||||||
"""Show the profile page as html
|
"""Show the profile page as html
|
||||||
|
@ -755,16 +755,12 @@ def htmlProfile(rssIconAtTop: bool,
|
||||||
menuShares: userPathStr + '/shares#timeline',
|
menuShares: userPathStr + '/shares#timeline',
|
||||||
menuLogout: '/logout'
|
menuLogout: '/logout'
|
||||||
}
|
}
|
||||||
navAccessKeys = {
|
navAccessKeys = {}
|
||||||
menuTimeline: 't',
|
for variableName, key in accessKeys.items():
|
||||||
menuEdit: 'e',
|
if not locals().get(variableName):
|
||||||
menuFollowing: 'f',
|
continue
|
||||||
menuFollowers: 'g',
|
navAccessKeys[locals()[variableName]] = key
|
||||||
menuRoles: 'o',
|
|
||||||
menuSkills: 's',
|
|
||||||
menuShares: 'h',
|
|
||||||
menuLogout: 'x'
|
|
||||||
}
|
|
||||||
profileStr = htmlKeyboardNavigation(textModeBanner,
|
profileStr = htmlKeyboardNavigation(textModeBanner,
|
||||||
navLinks, navAccessKeys)
|
navLinks, navAccessKeys)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue