mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
fbdd3f7149
commit
ae65c33553
50
daemon.py
50
daemon.py
|
@ -5014,7 +5014,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
setTheme(base_dir, self.server.themeName, domain,
|
setTheme(base_dir, self.server.themeName, domain,
|
||||||
allow_local_network_access,
|
allow_local_network_access,
|
||||||
system_language)
|
system_language)
|
||||||
self.server.textModeBanner = \
|
self.server.text_mode_banner = \
|
||||||
getTextModeBanner(self.server.base_dir)
|
getTextModeBanner(self.server.base_dir)
|
||||||
self.server.iconsCache = {}
|
self.server.iconsCache = {}
|
||||||
self.server.fontsCache = {}
|
self.server.fontsCache = {}
|
||||||
|
@ -5954,7 +5954,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
setTheme(base_dir, currTheme, domain,
|
setTheme(base_dir, currTheme, domain,
|
||||||
allow_local_network_access,
|
allow_local_network_access,
|
||||||
system_language)
|
system_language)
|
||||||
self.server.textModeBanner = \
|
self.server.text_mode_banner = \
|
||||||
getTextModeBanner(base_dir)
|
getTextModeBanner(base_dir)
|
||||||
self.server.iconsCache = {}
|
self.server.iconsCache = {}
|
||||||
self.server.fontsCache = {}
|
self.server.fontsCache = {}
|
||||||
|
@ -7167,7 +7167,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
backToPath,
|
backToPath,
|
||||||
lockedAccount,
|
lockedAccount,
|
||||||
movedTo, alsoKnownAs,
|
movedTo, alsoKnownAs,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
self.server.news_instance,
|
self.server.news_instance,
|
||||||
authorized,
|
authorized,
|
||||||
accessKeys, isGroup).encode('utf-8')
|
accessKeys, isGroup).encode('utf-8')
|
||||||
|
@ -9713,7 +9713,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.dormant_months,
|
self.server.dormant_months,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
accessKeys, city,
|
accessKeys, city,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
|
@ -9829,7 +9829,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.dormant_months,
|
self.server.dormant_months,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
allow_local_network_access,
|
allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
accessKeys, city,
|
accessKeys, city,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
|
@ -10260,7 +10260,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -10412,7 +10412,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
authorized, self.server.themeName,
|
authorized, self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
allow_local_network_access,
|
allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -10557,7 +10557,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
authorized, self.server.themeName,
|
authorized, self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
allow_local_network_access,
|
allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -10699,7 +10699,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -10841,7 +10841,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -10993,7 +10993,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -11144,7 +11144,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
allow_local_network_access,
|
allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -11252,7 +11252,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
authorized, self.server.themeName,
|
authorized, self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -11337,7 +11337,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
authorized, self.server.themeName,
|
authorized, self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -11462,7 +11462,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
allow_local_network_access,
|
allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -11600,7 +11600,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -11734,7 +11734,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
allow_local_network_access,
|
allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
self.server.max_like_count,
|
self.server.max_like_count,
|
||||||
|
@ -11854,7 +11854,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.dormant_months,
|
self.server.dormant_months,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
accessKeys, city,
|
accessKeys, city,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
|
@ -11975,7 +11975,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.dormant_months,
|
self.server.dormant_months,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
accessKeys, city,
|
accessKeys, city,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
|
@ -12095,7 +12095,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.dormant_months,
|
self.server.dormant_months,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
accessKeys, city,
|
accessKeys, city,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
|
@ -12231,7 +12231,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.dormant_months,
|
self.server.dormant_months,
|
||||||
self.server.peertubeInstances,
|
self.server.peertubeInstances,
|
||||||
self.server.allow_local_network_access,
|
self.server.allow_local_network_access,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
accessKeys, city,
|
accessKeys, city,
|
||||||
self.server.system_language,
|
self.server.system_language,
|
||||||
|
@ -13077,7 +13077,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.defaultTimeline,
|
self.server.defaultTimeline,
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
city,
|
city,
|
||||||
self.server.user_agents_blocked,
|
self.server.user_agents_blocked,
|
||||||
accessKeys,
|
accessKeys,
|
||||||
|
@ -15123,7 +15123,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.domain,
|
self.server.domain,
|
||||||
self.server.defaultTimeline,
|
self.server.defaultTimeline,
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys).encode('utf-8')
|
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,
|
||||||
|
@ -15176,7 +15176,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.base_dir, self.path,
|
self.server.base_dir, self.path,
|
||||||
self.server.http_prefix,
|
self.server.http_prefix,
|
||||||
self.server.domainFull,
|
self.server.domainFull,
|
||||||
self.server.textModeBanner,
|
self.server.text_mode_banner,
|
||||||
accessKeys).encode('utf-8')
|
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,
|
||||||
|
@ -18537,7 +18537,7 @@ def runDaemon(content_license_url: str,
|
||||||
httpd.show_node_info_version = show_node_info_version
|
httpd.show_node_info_version = show_node_info_version
|
||||||
|
|
||||||
# ASCII/ANSI text banner used in shell browsers, such as Lynx
|
# ASCII/ANSI text banner used in shell browsers, such as Lynx
|
||||||
httpd.textModeBanner = getTextModeBanner(base_dir)
|
httpd.text_mode_banner = getTextModeBanner(base_dir)
|
||||||
|
|
||||||
# key shortcuts SHIFT + ALT + [key]
|
# key shortcuts SHIFT + ALT + [key]
|
||||||
httpd.accessKeys = {
|
httpd.accessKeys = {
|
||||||
|
|
14
theme.py
14
theme.py
|
@ -593,9 +593,9 @@ def _setThemeFonts(base_dir: str, themeName: str) -> None:
|
||||||
def getTextModeBanner(base_dir: str) -> str:
|
def getTextModeBanner(base_dir: str) -> str:
|
||||||
"""Returns the banner used for shell browsers, like Lynx
|
"""Returns the banner used for shell browsers, like Lynx
|
||||||
"""
|
"""
|
||||||
textModeBannerFilename = base_dir + '/accounts/banner.txt'
|
text_mode_bannerFilename = base_dir + '/accounts/banner.txt'
|
||||||
if os.path.isfile(textModeBannerFilename):
|
if os.path.isfile(text_mode_bannerFilename):
|
||||||
with open(textModeBannerFilename, 'r') as fp:
|
with open(text_mode_bannerFilename, 'r') as fp:
|
||||||
bannerStr = fp.read()
|
bannerStr = fp.read()
|
||||||
if bannerStr:
|
if bannerStr:
|
||||||
return bannerStr.replace('\n', '<br>')
|
return bannerStr.replace('\n', '<br>')
|
||||||
|
@ -639,7 +639,7 @@ def _setTextModeTheme(base_dir: str, name: str) -> None:
|
||||||
base_dir + '/accounts/logo.txt')
|
base_dir + '/accounts/logo.txt')
|
||||||
|
|
||||||
# set the text mode banner which appears in browsers such as Lynx
|
# set the text mode banner which appears in browsers such as Lynx
|
||||||
textModeBannerFilename = \
|
text_mode_bannerFilename = \
|
||||||
base_dir + '/theme/' + name + '/banner.txt'
|
base_dir + '/theme/' + name + '/banner.txt'
|
||||||
if os.path.isfile(base_dir + '/accounts/banner.txt'):
|
if os.path.isfile(base_dir + '/accounts/banner.txt'):
|
||||||
try:
|
try:
|
||||||
|
@ -647,13 +647,13 @@ def _setTextModeTheme(base_dir: str, name: str) -> None:
|
||||||
except OSError:
|
except OSError:
|
||||||
print('EX: _setTextModeTheme unable to delete ' +
|
print('EX: _setTextModeTheme unable to delete ' +
|
||||||
base_dir + '/accounts/banner.txt')
|
base_dir + '/accounts/banner.txt')
|
||||||
if os.path.isfile(textModeBannerFilename):
|
if os.path.isfile(text_mode_bannerFilename):
|
||||||
try:
|
try:
|
||||||
copyfile(textModeBannerFilename,
|
copyfile(text_mode_bannerFilename,
|
||||||
base_dir + '/accounts/banner.txt')
|
base_dir + '/accounts/banner.txt')
|
||||||
except OSError:
|
except OSError:
|
||||||
print('EX: _setTextModeTheme unable to copy ' +
|
print('EX: _setTextModeTheme unable to copy ' +
|
||||||
textModeBannerFilename + ' ' +
|
text_mode_bannerFilename + ' ' +
|
||||||
base_dir + '/accounts/banner.txt')
|
base_dir + '/accounts/banner.txt')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,7 @@ def _htmlCalendarDay(person_cache: {}, cssCache: {}, translate: {},
|
||||||
def htmlCalendar(person_cache: {}, cssCache: {}, translate: {},
|
def htmlCalendar(person_cache: {}, cssCache: {}, translate: {},
|
||||||
base_dir: str, path: str,
|
base_dir: str, path: str,
|
||||||
http_prefix: str, domainFull: str,
|
http_prefix: str, domainFull: str,
|
||||||
textModeBanner: str, accessKeys: {}) -> str:
|
text_mode_banner: str, accessKeys: {}) -> str:
|
||||||
"""Show the calendar for a person
|
"""Show the calendar for a person
|
||||||
"""
|
"""
|
||||||
domain = removeDomainPort(domainFull)
|
domain = removeDomainPort(domainFull)
|
||||||
|
@ -451,7 +451,7 @@ def htmlCalendar(person_cache: {}, cssCache: {}, translate: {},
|
||||||
navAccessKeys = {
|
navAccessKeys = {
|
||||||
}
|
}
|
||||||
screenReaderCal = \
|
screenReaderCal = \
|
||||||
htmlKeyboardNavigation(textModeBanner, navLinks, navAccessKeys,
|
htmlKeyboardNavigation(text_mode_banner, navLinks, navAccessKeys,
|
||||||
monthName)
|
monthName)
|
||||||
|
|
||||||
newEventStr = \
|
newEventStr = \
|
||||||
|
|
|
@ -49,7 +49,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
||||||
authorized: bool, moderationActionStr: str,
|
authorized: bool, moderationActionStr: str,
|
||||||
theme: str, peertubeInstances: [],
|
theme: str, peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -77,7 +77,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, moderationActionStr, theme,
|
authorized, moderationActionStr, theme,
|
||||||
peertubeInstances, allow_local_network_access,
|
peertubeInstances, allow_local_network_access,
|
||||||
textModeBanner, accessKeys, system_language,
|
text_mode_banner, accessKeys, system_language,
|
||||||
max_like_count, shared_items_federated_domains,
|
max_like_count, shared_items_federated_domains,
|
||||||
signing_priv_key_pem, CWlists, lists_enabled)
|
signing_priv_key_pem, CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ def htmlPersonOptions(defaultTimeline: str,
|
||||||
lockedAccount: bool,
|
lockedAccount: bool,
|
||||||
movedTo: str,
|
movedTo: str,
|
||||||
alsoKnownAs: [],
|
alsoKnownAs: [],
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
news_instance: bool,
|
news_instance: bool,
|
||||||
authorized: bool,
|
authorized: bool,
|
||||||
accessKeys: {},
|
accessKeys: {},
|
||||||
|
@ -131,7 +131,7 @@ def htmlPersonOptions(defaultTimeline: str,
|
||||||
instanceTitle = \
|
instanceTitle = \
|
||||||
getConfigParam(base_dir, 'instanceTitle')
|
getConfigParam(base_dir, 'instanceTitle')
|
||||||
optionsStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle, None)
|
optionsStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle, None)
|
||||||
optionsStr += htmlKeyboardNavigation(textModeBanner, {}, {})
|
optionsStr += htmlKeyboardNavigation(text_mode_banner, {}, {})
|
||||||
optionsStr += '<br><br>\n'
|
optionsStr += '<br><br>\n'
|
||||||
optionsStr += '<div class="options">\n'
|
optionsStr += '<div class="options">\n'
|
||||||
optionsStr += ' <div class="optionsAvatar">\n'
|
optionsStr += ' <div class="optionsAvatar">\n'
|
||||||
|
|
|
@ -556,7 +556,7 @@ def htmlProfile(signing_priv_key_pem: str,
|
||||||
newswire: {}, theme: str, dormant_months: int,
|
newswire: {}, theme: str, dormant_months: int,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
debug: bool, accessKeys: {}, city: str,
|
debug: bool, accessKeys: {}, city: str,
|
||||||
system_language: str, max_like_count: int,
|
system_language: str, max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -897,7 +897,7 @@ def htmlProfile(signing_priv_key_pem: str,
|
||||||
continue
|
continue
|
||||||
navAccessKeys[locals()[variableName]] = key
|
navAccessKeys[locals()[variableName]] = key
|
||||||
|
|
||||||
profileStr = htmlKeyboardNavigation(textModeBanner,
|
profileStr = htmlKeyboardNavigation(text_mode_banner,
|
||||||
navLinks, navAccessKeys)
|
navLinks, navAccessKeys)
|
||||||
|
|
||||||
profileStr += profileHeaderStr + donateSection
|
profileStr += profileHeaderStr + donateSection
|
||||||
|
@ -2092,7 +2092,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, base_dir: str, path: str,
|
||||||
domain: str, port: int, http_prefix: str,
|
domain: str, port: int, http_prefix: str,
|
||||||
defaultTimeline: str, theme: str,
|
defaultTimeline: str, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
textModeBanner: str, city: str,
|
text_mode_banner: str, city: str,
|
||||||
user_agents_blocked: str,
|
user_agents_blocked: str,
|
||||||
accessKeys: {},
|
accessKeys: {},
|
||||||
default_reply_interval_hrs: int,
|
default_reply_interval_hrs: int,
|
||||||
|
@ -2252,7 +2252,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, base_dir: str, path: str,
|
||||||
menuProfile: 'p',
|
menuProfile: 'p',
|
||||||
menuTimeline: 't'
|
menuTimeline: 't'
|
||||||
}
|
}
|
||||||
editProfileForm += htmlKeyboardNavigation(textModeBanner,
|
editProfileForm += htmlKeyboardNavigation(text_mode_banner,
|
||||||
navLinks, navAccessKeys)
|
navLinks, navAccessKeys)
|
||||||
|
|
||||||
# top banner
|
# top banner
|
||||||
|
|
|
@ -373,7 +373,7 @@ def htmlSearchEmojiTextEntry(cssCache: {}, translate: {},
|
||||||
def htmlSearch(cssCache: {}, translate: {},
|
def htmlSearch(cssCache: {}, translate: {},
|
||||||
base_dir: str, path: str, domain: str,
|
base_dir: str, path: str, domain: str,
|
||||||
defaultTimeline: str, theme: str,
|
defaultTimeline: str, theme: str,
|
||||||
textModeBanner: str, accessKeys: {}) -> str:
|
text_mode_banner: str, accessKeys: {}) -> str:
|
||||||
"""Search called from the timeline icon
|
"""Search called from the timeline icon
|
||||||
"""
|
"""
|
||||||
actor = path.replace('/search', '')
|
actor = path.replace('/search', '')
|
||||||
|
@ -392,15 +392,15 @@ def htmlSearch(cssCache: {}, translate: {},
|
||||||
searchBannerFile, searchBannerFilename = \
|
searchBannerFile, searchBannerFilename = \
|
||||||
getSearchBannerFile(base_dir, searchNickname, domain, theme)
|
getSearchBannerFile(base_dir, searchNickname, domain, theme)
|
||||||
|
|
||||||
textModeBannerStr = htmlKeyboardNavigation(textModeBanner, {}, {})
|
text_mode_bannerStr = htmlKeyboardNavigation(text_mode_banner, {}, {})
|
||||||
if textModeBannerStr is None:
|
if text_mode_bannerStr is None:
|
||||||
textModeBannerStr = ''
|
text_mode_bannerStr = ''
|
||||||
|
|
||||||
if os.path.isfile(searchBannerFilename):
|
if os.path.isfile(searchBannerFilename):
|
||||||
timelineKey = accessKeys['menuTimeline']
|
timelineKey = accessKeys['menuTimeline']
|
||||||
usersPath = '/users/' + searchNickname
|
usersPath = '/users/' + searchNickname
|
||||||
followStr += \
|
followStr += \
|
||||||
'<header>\n' + textModeBannerStr + \
|
'<header>\n' + text_mode_bannerStr + \
|
||||||
'<a href="' + usersPath + '/' + defaultTimeline + '" title="' + \
|
'<a href="' + usersPath + '/' + defaultTimeline + '" title="' + \
|
||||||
translate['Switch to timeline view'] + '" alt="' + \
|
translate['Switch to timeline view'] + '" alt="' + \
|
||||||
translate['Switch to timeline view'] + '" ' + \
|
translate['Switch to timeline view'] + '" ' + \
|
||||||
|
|
|
@ -274,7 +274,8 @@ def _htmlTimelineModerationButtons(moderator: bool, boxName: str,
|
||||||
return tlStr
|
return tlStr
|
||||||
|
|
||||||
|
|
||||||
def _htmlTimelineKeyboard(moderator: bool, textModeBanner: str, usersPath: str,
|
def _htmlTimelineKeyboard(moderator: bool, text_mode_banner: str,
|
||||||
|
usersPath: str,
|
||||||
nickname: str, newCalendarEvent: bool,
|
nickname: str, newCalendarEvent: bool,
|
||||||
newDM: bool, newReply: bool,
|
newDM: bool, newReply: bool,
|
||||||
newShare: bool, newWanted: bool,
|
newShare: bool, newWanted: bool,
|
||||||
|
@ -352,7 +353,7 @@ def _htmlTimelineKeyboard(moderator: bool, textModeBanner: str, usersPath: str,
|
||||||
navAccessKeys[locals()[variableName]] = key
|
navAccessKeys[locals()[variableName]] = key
|
||||||
if moderator:
|
if moderator:
|
||||||
navLinks[menuModeration] = usersPath + '/moderation#modtimeline'
|
navLinks[menuModeration] = usersPath + '/moderation#modtimeline'
|
||||||
return htmlKeyboardNavigation(textModeBanner, navLinks, navAccessKeys,
|
return htmlKeyboardNavigation(text_mode_banner, navLinks, navAccessKeys,
|
||||||
None, usersPath, translate, followApprovals)
|
None, usersPath, translate, followApprovals)
|
||||||
|
|
||||||
|
|
||||||
|
@ -444,7 +445,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
theme: str,
|
theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -696,7 +697,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
|
|
||||||
# keyboard navigation
|
# keyboard navigation
|
||||||
tlStr += \
|
tlStr += \
|
||||||
_htmlTimelineKeyboard(moderator, textModeBanner, usersPath, nickname,
|
_htmlTimelineKeyboard(moderator, text_mode_banner, usersPath, nickname,
|
||||||
newCalendarEvent, newDM, newReply,
|
newCalendarEvent, newDM, newReply,
|
||||||
newShare, newWanted,
|
newShare, newWanted,
|
||||||
followApprovals, accessKeys, translate)
|
followApprovals, accessKeys, translate)
|
||||||
|
@ -1138,7 +1139,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
||||||
authorized: bool, theme: str,
|
authorized: bool, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -1169,7 +1170,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
||||||
icons_as_buttons, rss_icon_at_top,
|
icons_as_buttons, rss_icon_at_top,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, None, theme, peertubeInstances,
|
authorized, None, theme, peertubeInstances,
|
||||||
allow_local_network_access, textModeBanner,
|
allow_local_network_access, text_mode_banner,
|
||||||
accessKeys, system_language, max_like_count,
|
accessKeys, system_language, max_like_count,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
signing_priv_key_pem,
|
signing_priv_key_pem,
|
||||||
|
@ -1196,7 +1197,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
||||||
authorized: bool, theme: str,
|
authorized: bool, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -1227,7 +1228,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
||||||
icons_as_buttons, rss_icon_at_top,
|
icons_as_buttons, rss_icon_at_top,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, None, theme, peertubeInstances,
|
authorized, None, theme, peertubeInstances,
|
||||||
allow_local_network_access, textModeBanner,
|
allow_local_network_access, text_mode_banner,
|
||||||
accessKeys, system_language, max_like_count,
|
accessKeys, system_language, max_like_count,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
signing_priv_key_pem,
|
signing_priv_key_pem,
|
||||||
|
@ -1255,7 +1256,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
||||||
authorized: bool, theme: str,
|
authorized: bool, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -1286,7 +1287,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
||||||
icons_as_buttons, rss_icon_at_top,
|
icons_as_buttons, rss_icon_at_top,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, None, theme, peertubeInstances,
|
authorized, None, theme, peertubeInstances,
|
||||||
allow_local_network_access, textModeBanner,
|
allow_local_network_access, text_mode_banner,
|
||||||
accessKeys, system_language, max_like_count,
|
accessKeys, system_language, max_like_count,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
signing_priv_key_pem,
|
signing_priv_key_pem,
|
||||||
|
@ -1314,7 +1315,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
||||||
authorized: bool, theme: str,
|
authorized: bool, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -1345,7 +1346,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
||||||
icons_as_buttons, rss_icon_at_top,
|
icons_as_buttons, rss_icon_at_top,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, None, theme, peertubeInstances,
|
authorized, None, theme, peertubeInstances,
|
||||||
allow_local_network_access, textModeBanner,
|
allow_local_network_access, text_mode_banner,
|
||||||
accessKeys, system_language, max_like_count,
|
accessKeys, system_language, max_like_count,
|
||||||
shared_items_federated_domains, signing_priv_key_pem,
|
shared_items_federated_domains, signing_priv_key_pem,
|
||||||
CWlists, lists_enabled)
|
CWlists, lists_enabled)
|
||||||
|
@ -1372,7 +1373,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
||||||
authorized: bool, theme: str,
|
authorized: bool, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -1398,7 +1399,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
||||||
icons_as_buttons, rss_icon_at_top,
|
icons_as_buttons, rss_icon_at_top,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, None, theme, peertubeInstances,
|
authorized, None, theme, peertubeInstances,
|
||||||
allow_local_network_access, textModeBanner,
|
allow_local_network_access, text_mode_banner,
|
||||||
accessKeys, system_language, max_like_count,
|
accessKeys, system_language, max_like_count,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
signing_priv_key_pem,
|
signing_priv_key_pem,
|
||||||
|
@ -1426,7 +1427,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
||||||
authorized: bool, theme: str,
|
authorized: bool, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -1452,7 +1453,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
||||||
icons_as_buttons, rss_icon_at_top,
|
icons_as_buttons, rss_icon_at_top,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, None, theme, peertubeInstances,
|
authorized, None, theme, peertubeInstances,
|
||||||
allow_local_network_access, textModeBanner,
|
allow_local_network_access, text_mode_banner,
|
||||||
accessKeys, system_language, max_like_count,
|
accessKeys, system_language, max_like_count,
|
||||||
shared_items_federated_domains, signing_priv_key_pem,
|
shared_items_federated_domains, signing_priv_key_pem,
|
||||||
CWlists, lists_enabled)
|
CWlists, lists_enabled)
|
||||||
|
@ -1479,7 +1480,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
||||||
authorized: bool, theme: str,
|
authorized: bool, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -1505,7 +1506,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
||||||
icons_as_buttons, rss_icon_at_top,
|
icons_as_buttons, rss_icon_at_top,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, None, theme, peertubeInstances,
|
authorized, None, theme, peertubeInstances,
|
||||||
allow_local_network_access, textModeBanner,
|
allow_local_network_access, text_mode_banner,
|
||||||
accessKeys, system_language, max_like_count,
|
accessKeys, system_language, max_like_count,
|
||||||
shared_items_federated_domains, signing_priv_key_pem,
|
shared_items_federated_domains, signing_priv_key_pem,
|
||||||
CWlists, lists_enabled)
|
CWlists, lists_enabled)
|
||||||
|
@ -1532,7 +1533,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
||||||
authorized: bool, theme: str,
|
authorized: bool, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -1558,7 +1559,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
||||||
icons_as_buttons, rss_icon_at_top,
|
icons_as_buttons, rss_icon_at_top,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, None, theme, peertubeInstances,
|
authorized, None, theme, peertubeInstances,
|
||||||
allow_local_network_access, textModeBanner,
|
allow_local_network_access, text_mode_banner,
|
||||||
accessKeys, system_language, max_like_count,
|
accessKeys, system_language, max_like_count,
|
||||||
shared_items_federated_domains, signing_priv_key_pem,
|
shared_items_federated_domains, signing_priv_key_pem,
|
||||||
CWlists, lists_enabled)
|
CWlists, lists_enabled)
|
||||||
|
@ -1586,7 +1587,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
||||||
theme: str,
|
theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -1611,7 +1612,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
||||||
icons_as_buttons, rss_icon_at_top,
|
icons_as_buttons, rss_icon_at_top,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, None, theme, peertubeInstances,
|
authorized, None, theme, peertubeInstances,
|
||||||
allow_local_network_access, textModeBanner,
|
allow_local_network_access, text_mode_banner,
|
||||||
accessKeys, system_language, max_like_count,
|
accessKeys, system_language, max_like_count,
|
||||||
shared_items_federated_domains, signing_priv_key_pem,
|
shared_items_federated_domains, signing_priv_key_pem,
|
||||||
CWlists, lists_enabled)
|
CWlists, lists_enabled)
|
||||||
|
@ -1638,7 +1639,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
||||||
authorized: bool, theme: str,
|
authorized: bool, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -1663,7 +1664,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
||||||
icons_as_buttons, rss_icon_at_top,
|
icons_as_buttons, rss_icon_at_top,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, None, theme, peertubeInstances,
|
authorized, None, theme, peertubeInstances,
|
||||||
allow_local_network_access, textModeBanner,
|
allow_local_network_access, text_mode_banner,
|
||||||
accessKeys, system_language, max_like_count,
|
accessKeys, system_language, max_like_count,
|
||||||
shared_items_federated_domains, signing_priv_key_pem,
|
shared_items_federated_domains, signing_priv_key_pem,
|
||||||
CWlists, lists_enabled)
|
CWlists, lists_enabled)
|
||||||
|
@ -1690,7 +1691,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
||||||
authorized: bool, theme: str,
|
authorized: bool, theme: str,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
textModeBanner: str,
|
text_mode_banner: str,
|
||||||
accessKeys: {}, system_language: str,
|
accessKeys: {}, system_language: str,
|
||||||
max_like_count: int,
|
max_like_count: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -1718,7 +1719,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
||||||
icons_as_buttons, rss_icon_at_top,
|
icons_as_buttons, rss_icon_at_top,
|
||||||
publish_button_at_top,
|
publish_button_at_top,
|
||||||
authorized, None, theme, peertubeInstances,
|
authorized, None, theme, peertubeInstances,
|
||||||
allow_local_network_access, textModeBanner,
|
allow_local_network_access, text_mode_banner,
|
||||||
accessKeys, system_language, max_like_count,
|
accessKeys, system_language, max_like_count,
|
||||||
shared_items_federated_domains, signing_priv_key_pem,
|
shared_items_federated_domains, signing_priv_key_pem,
|
||||||
CWlists, lists_enabled)
|
CWlists, lists_enabled)
|
||||||
|
|
Loading…
Reference in New Issue