Snake case

merge-requests/30/head
Bob Mottram 2021-12-25 19:19:14 +00:00
parent b287c3502a
commit 0436f2867f
11 changed files with 114 additions and 100 deletions

View File

@ -2237,9 +2237,9 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishAsIcon = False self.server.showPublishAsIcon = False
if 'icons-as-buttons' in themeDesignerParams: if 'icons-as-buttons' in themeDesignerParams:
if themeDesignerParams['icons-as-buttons'].lower() == 'true': if themeDesignerParams['icons-as-buttons'].lower() == 'true':
self.server.iconsAsButtons = True self.server.icons_as_buttons = True
else: else:
self.server.iconsAsButtons = False self.server.icons_as_buttons = False
if 'full-width-timeline-buttons' in themeDesignerParams: if 'full-width-timeline-buttons' in themeDesignerParams:
themeValue = themeDesignerParams['full-width-timeline-buttons'] themeValue = themeDesignerParams['full-width-timeline-buttons']
if themeValue.lower() == 'true': if themeValue.lower() == 'true':
@ -5021,9 +5021,9 @@ class PubServer(BaseHTTPRequestHandler):
self.server.fullWidthTimelineButtonHeader = \ self.server.fullWidthTimelineButtonHeader = \
getConfigParam(self.server.base_dir, getConfigParam(self.server.base_dir,
'fullWidthTimelineButtonHeader') 'fullWidthTimelineButtonHeader')
self.server.iconsAsButtons = \ self.server.icons_as_buttons = \
getConfigParam(self.server.base_dir, getConfigParam(self.server.base_dir,
'iconsAsButtons') 'icons_as_buttons')
self.server.rss_icon_at_top = \ self.server.rss_icon_at_top = \
getConfigParam(self.server.base_dir, getConfigParam(self.server.base_dir,
'rss_icon_at_top') 'rss_icon_at_top')
@ -5962,9 +5962,9 @@ class PubServer(BaseHTTPRequestHandler):
getConfigParam(base_dir, getConfigParam(base_dir,
'fullWidthTimeline' + 'fullWidthTimeline' +
'ButtonHeader') 'ButtonHeader')
self.server.iconsAsButtons = \ self.server.icons_as_buttons = \
getConfigParam(base_dir, getConfigParam(base_dir,
'iconsAsButtons') 'icons_as_buttons')
self.server.rss_icon_at_top = \ self.server.rss_icon_at_top = \
getConfigParam(base_dir, getConfigParam(base_dir,
'rss_icon_at_top') 'rss_icon_at_top')
@ -9675,8 +9675,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.yt_replace_domain self.server.yt_replace_domain
twitterReplacementDomain = \ twitterReplacementDomain = \
self.server.twitterReplacementDomain self.server.twitterReplacementDomain
iconsAsButtons = \ icons_as_buttons = \
self.server.iconsAsButtons self.server.icons_as_buttons
accessKeys = self.server.accessKeys accessKeys = self.server.accessKeys
if self.server.keyShortcuts.get(nickname): if self.server.keyShortcuts.get(nickname):
@ -9690,7 +9690,7 @@ class PubServer(BaseHTTPRequestHandler):
htmlProfile(self.server.signingPrivateKeyPem, htmlProfile(self.server.signingPrivateKeyPem,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.cssCache, self.server.cssCache,
iconsAsButtons, icons_as_buttons,
defaultTimeline, defaultTimeline,
recentPostsCache, recentPostsCache,
self.server.maxRecentPosts, self.server.maxRecentPosts,
@ -9782,8 +9782,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.twitterReplacementDomain self.server.twitterReplacementDomain
showPublishedDateOnly = \ showPublishedDateOnly = \
self.server.showPublishedDateOnly self.server.showPublishedDateOnly
iconsAsButtons = \ icons_as_buttons = \
self.server.iconsAsButtons self.server.icons_as_buttons
allow_local_network_access = \ allow_local_network_access = \
self.server.allow_local_network_access self.server.allow_local_network_access
accessKeys = self.server.accessKeys accessKeys = self.server.accessKeys
@ -9806,7 +9806,7 @@ class PubServer(BaseHTTPRequestHandler):
htmlProfile(signingPrivateKeyPem, htmlProfile(signingPrivateKeyPem,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.cssCache, self.server.cssCache,
iconsAsButtons, icons_as_buttons,
defaultTimeline, defaultTimeline,
recentPostsCache, recentPostsCache,
self.server.maxRecentPosts, self.server.maxRecentPosts,
@ -10249,7 +10249,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, authorized,
@ -10400,7 +10400,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, self.server.themeName, authorized, self.server.themeName,
@ -10543,7 +10543,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, self.server.themeName, authorized, self.server.themeName,
@ -10684,7 +10684,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, authorized,
@ -10826,7 +10826,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, authorized,
@ -10978,7 +10978,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, authorized,
@ -11127,7 +11127,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, authorized,
@ -11234,7 +11234,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
self.server.fullWidthTimelineButtonHeader, self.server.fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, self.server.themeName, authorized, self.server.themeName,
@ -11318,7 +11318,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
self.server.fullWidthTimelineButtonHeader, self.server.fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, self.server.themeName, authorized, self.server.themeName,
@ -11440,7 +11440,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, authorized,
@ -11578,7 +11578,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, authorized,
@ -11710,7 +11710,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.positiveVoting, self.server.positiveVoting,
self.server.showPublishAsIcon, self.server.showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.publish_button_at_top, self.server.publish_button_at_top,
authorized, moderationActionStr, authorized, moderationActionStr,
@ -11817,7 +11817,7 @@ class PubServer(BaseHTTPRequestHandler):
htmlProfile(self.server.signingPrivateKeyPem, htmlProfile(self.server.signingPrivateKeyPem,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.cssCache, self.server.cssCache,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.defaultTimeline, self.server.defaultTimeline,
self.server.recentPostsCache, self.server.recentPostsCache,
self.server.maxRecentPosts, self.server.maxRecentPosts,
@ -11938,7 +11938,7 @@ class PubServer(BaseHTTPRequestHandler):
htmlProfile(self.server.signingPrivateKeyPem, htmlProfile(self.server.signingPrivateKeyPem,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.cssCache, self.server.cssCache,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.defaultTimeline, self.server.defaultTimeline,
self.server.recentPostsCache, self.server.recentPostsCache,
self.server.maxRecentPosts, self.server.maxRecentPosts,
@ -12057,7 +12057,7 @@ class PubServer(BaseHTTPRequestHandler):
htmlProfile(self.server.signingPrivateKeyPem, htmlProfile(self.server.signingPrivateKeyPem,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.cssCache, self.server.cssCache,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.defaultTimeline, self.server.defaultTimeline,
self.server.recentPostsCache, self.server.recentPostsCache,
self.server.maxRecentPosts, self.server.maxRecentPosts,
@ -12193,7 +12193,7 @@ class PubServer(BaseHTTPRequestHandler):
htmlProfile(self.server.signingPrivateKeyPem, htmlProfile(self.server.signingPrivateKeyPem,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
self.server.cssCache, self.server.cssCache,
self.server.iconsAsButtons, self.server.icons_as_buttons,
self.server.defaultTimeline, self.server.defaultTimeline,
self.server.recentPostsCache, self.server.recentPostsCache,
self.server.maxRecentPosts, self.server.maxRecentPosts,
@ -14959,7 +14959,7 @@ class PubServer(BaseHTTPRequestHandler):
'/users/' + nickname + '/' + self.server.defaultTimeline '/users/' + nickname + '/' + self.server.defaultTimeline
showPublishAsIcon = self.server.showPublishAsIcon showPublishAsIcon = self.server.showPublishAsIcon
rss_icon_at_top = self.server.rss_icon_at_top rss_icon_at_top = self.server.rss_icon_at_top
iconsAsButtons = self.server.iconsAsButtons icons_as_buttons = self.server.icons_as_buttons
defaultTimeline = self.server.defaultTimeline defaultTimeline = self.server.defaultTimeline
accessKeys = self.server.accessKeys accessKeys = self.server.accessKeys
if self.server.keyShortcuts.get(nickname): if self.server.keyShortcuts.get(nickname):
@ -14977,7 +14977,7 @@ class PubServer(BaseHTTPRequestHandler):
showPublishAsIcon, showPublishAsIcon,
authorized, authorized,
rss_icon_at_top, rss_icon_at_top,
iconsAsButtons, icons_as_buttons,
defaultTimeline, defaultTimeline,
self.server.themeName, self.server.themeName,
accessKeys).encode('utf-8') accessKeys).encode('utf-8')
@ -15004,7 +15004,7 @@ class PubServer(BaseHTTPRequestHandler):
accessKeys = self.server.keyShortcuts[nickname] accessKeys = self.server.keyShortcuts[nickname]
timelinePath = \ timelinePath = \
'/users/' + nickname + '/' + self.server.defaultTimeline '/users/' + nickname + '/' + self.server.defaultTimeline
iconsAsButtons = self.server.iconsAsButtons icons_as_buttons = self.server.icons_as_buttons
defaultTimeline = self.server.defaultTimeline defaultTimeline = self.server.defaultTimeline
sharedItemsDomains = \ sharedItemsDomains = \
self.server.shared_items_federated_domains self.server.shared_items_federated_domains
@ -15016,7 +15016,7 @@ class PubServer(BaseHTTPRequestHandler):
timelinePath, timelinePath,
authorized, authorized,
self.server.rss_icon_at_top, self.server.rss_icon_at_top,
iconsAsButtons, icons_as_buttons,
defaultTimeline, defaultTimeline,
self.server.themeName, self.server.themeName,
accessKeys, accessKeys,
@ -18431,7 +18431,7 @@ def runDaemon(content_license_url: str,
max_feed_item_size_kb: int, max_feed_item_size_kb: int,
publish_button_at_top: bool, publish_button_at_top: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
maxFollowers: int, maxFollowers: int,
@ -18665,7 +18665,7 @@ def runDaemon(content_license_url: str,
httpd.fullWidthTimelineButtonHeader = fullWidthTimelineButtonHeader httpd.fullWidthTimelineButtonHeader = fullWidthTimelineButtonHeader
# whether to show icons in the header (eg calendar) as buttons # whether to show icons in the header (eg calendar) as buttons
httpd.iconsAsButtons = iconsAsButtons httpd.icons_as_buttons = icons_as_buttons
# whether to show the RSS icon at the top or the bottom of the timeline # whether to show the RSS icon at the top or the bottom of the timeline
httpd.rss_icon_at_top = rss_icon_at_top httpd.rss_icon_at_top = rss_icon_at_top

View File

@ -337,8 +337,8 @@ parser.add_argument("--fullWidthTimelineButtonHeader",
help="Whether to show the timeline " + help="Whether to show the timeline " +
"button header containing inbox and outbox " + "button header containing inbox and outbox " +
"as the full width of the screen") "as the full width of the screen")
parser.add_argument("--iconsAsButtons", parser.add_argument("--icons_as_buttons",
dest='iconsAsButtons', dest='icons_as_buttons',
type=str2bool, nargs='?', type=str2bool, nargs='?',
const=True, default=False, const=True, default=False,
help="Show header icons as buttons") help="Show header icons as buttons")
@ -3083,10 +3083,10 @@ showPublishAsIcon = \
if showPublishAsIcon is not None: if showPublishAsIcon is not None:
args.showPublishAsIcon = bool(showPublishAsIcon) args.showPublishAsIcon = bool(showPublishAsIcon)
iconsAsButtons = \ icons_as_buttons = \
getConfigParam(base_dir, 'iconsAsButtons') getConfigParam(base_dir, 'icons_as_buttons')
if iconsAsButtons is not None: if icons_as_buttons is not None:
args.iconsAsButtons = bool(iconsAsButtons) args.icons_as_buttons = bool(icons_as_buttons)
rss_icon_at_top = \ rss_icon_at_top = \
getConfigParam(base_dir, 'rss_icon_at_top') getConfigParam(base_dir, 'rss_icon_at_top')
@ -3229,7 +3229,7 @@ if __name__ == "__main__":
args.max_feed_item_size_kb, args.max_feed_item_size_kb,
args.publish_button_at_top, args.publish_button_at_top,
args.rss_icon_at_top, args.rss_icon_at_top,
args.iconsAsButtons, args.icons_as_buttons,
args.fullWidthTimelineButtonHeader, args.fullWidthTimelineButtonHeader,
args.showPublishAsIcon, args.showPublishAsIcon,
args.maxFollowers, args.maxFollowers,

View File

@ -197,7 +197,7 @@ def _setIconsAsButtons(base_dir: str, useButtons: bool) -> bool:
configJson = loadJson(configFilename, 0) configJson = loadJson(configFilename, 0)
if not configJson: if not configJson:
return False return False
configJson['iconsAsButtons'] = useButtons configJson['icons_as_buttons'] = useButtons
return saveJson(configJson, configFilename) return saveJson(configJson, configFilename)

View File

@ -353,7 +353,7 @@ def htmlLinksMobile(cssCache: {}, base_dir: str,
http_prefix: str, translate, http_prefix: str, translate,
timelinePath: str, authorized: bool, timelinePath: str, authorized: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
defaultTimeline: str, defaultTimeline: str,
theme: str, accessKeys: {}, theme: str, accessKeys: {},
shared_items_federated_domains: []) -> str: shared_items_federated_domains: []) -> str:
@ -392,7 +392,7 @@ def htmlLinksMobile(cssCache: {}, base_dir: str,
htmlStr += '<center>' + \ htmlStr += '<center>' + \
headerButtonsFrontScreen(translate, nickname, headerButtonsFrontScreen(translate, nickname,
'links', authorized, 'links', authorized,
iconsAsButtons) + '</center>' icons_as_buttons) + '</center>'
htmlStr += \ htmlStr += \
getLeftColumnContent(base_dir, nickname, domainFull, getLeftColumnContent(base_dir, nickname, domainFull,
http_prefix, translate, http_prefix, translate,

View File

@ -453,7 +453,7 @@ def htmlNewswireMobile(cssCache: {}, base_dir: str, nickname: str,
showPublishAsIcon: bool, showPublishAsIcon: bool,
authorized: bool, authorized: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
defaultTimeline: str, defaultTimeline: str,
theme: str, theme: str,
accessKeys: {}) -> str: accessKeys: {}) -> str:
@ -496,7 +496,7 @@ def htmlNewswireMobile(cssCache: {}, base_dir: str, nickname: str,
htmlStr += '<center>' + \ htmlStr += '<center>' + \
headerButtonsFrontScreen(translate, nickname, headerButtonsFrontScreen(translate, nickname,
'newswire', authorized, 'newswire', authorized,
iconsAsButtons) + '</center>' icons_as_buttons) + '</center>'
htmlStr += \ htmlStr += \
getRightColumnContent(base_dir, nickname, domainFull, getRightColumnContent(base_dir, nickname, domainFull,
http_prefix, translate, http_prefix, translate,

View File

@ -95,7 +95,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
def htmlFrontScreen(signingPrivateKeyPem: str, def htmlFrontScreen(signingPrivateKeyPem: str,
rss_icon_at_top: bool, rss_icon_at_top: bool,
cssCache: {}, iconsAsButtons: bool, cssCache: {}, icons_as_buttons: bool,
defaultTimeline: str, defaultTimeline: str,
recentPostsCache: {}, maxRecentPosts: int, recentPostsCache: {}, maxRecentPosts: int,
translate: {}, projectVersion: str, translate: {}, projectVersion: str,
@ -131,7 +131,7 @@ def htmlFrontScreen(signingPrivateKeyPem: str,
loginButton = headerButtonsFrontScreen(translate, nickname, loginButton = headerButtonsFrontScreen(translate, nickname,
'features', authorized, 'features', authorized,
iconsAsButtons) icons_as_buttons)
# If this is the news account then show a different banner # If this is the news account then show a different banner
bannerFile, bannerFilename = \ bannerFile, bannerFilename = \

View File

@ -46,7 +46,7 @@ def headerButtonsTimeline(defaultTimeline: str,
calendarPath: str, calendarPath: str,
calendarImage: str, calendarImage: str,
followApprovals: str, followApprovals: str,
iconsAsButtons: bool, icons_as_buttons: bool,
accessKeys: {}) -> str: accessKeys: {}) -> str:
"""Returns the header at the top of the timeline, containing """Returns the header at the top of the timeline, containing
buttons for inbox, outbox, search, calendar, etc buttons for inbox, outbox, search, calendar, etc
@ -157,7 +157,7 @@ def headerButtonsTimeline(defaultTimeline: str,
twodays = datetime.now() + timedelta(2) twodays = datetime.now() + timedelta(2)
if dayEventsCheck(base_dir, nickname, domain, now): if dayEventsCheck(base_dir, nickname, domain, now):
# happening today button # happening today button
if not iconsAsButtons: if not icons_as_buttons:
happeningStr += \ happeningStr += \
'<a href="' + usersPath + '/calendar?year=' + \ '<a href="' + usersPath + '/calendar?year=' + \
str(now.year) + '?month=' + str(now.month) + \ str(now.year) + '?month=' + str(now.month) + \
@ -174,7 +174,7 @@ def headerButtonsTimeline(defaultTimeline: str,
elif dayEventsCheck(base_dir, nickname, domain, tomorrow): elif dayEventsCheck(base_dir, nickname, domain, tomorrow):
# happening tomorrow button # happening tomorrow button
if not iconsAsButtons: if not icons_as_buttons:
happeningStr += \ happeningStr += \
'<a href="' + usersPath + '/calendar?year=' + \ '<a href="' + usersPath + '/calendar?year=' + \
str(tomorrow.year) + '?month=' + str(tomorrow.month) + \ str(tomorrow.year) + '?month=' + str(tomorrow.month) + \
@ -189,7 +189,7 @@ def headerButtonsTimeline(defaultTimeline: str,
'<button class="button">' + \ '<button class="button">' + \
translate['Happening Tomorrow'] + '</button></a>' translate['Happening Tomorrow'] + '</button></a>'
elif dayEventsCheck(base_dir, nickname, domain, twodays): elif dayEventsCheck(base_dir, nickname, domain, twodays):
if not iconsAsButtons: if not icons_as_buttons:
happeningStr += \ happeningStr += \
'<a href="' + usersPath + \ '<a href="' + usersPath + \
'/calendar" tabindex="-1">' + \ '/calendar" tabindex="-1">' + \
@ -216,7 +216,7 @@ def headerButtonsTimeline(defaultTimeline: str,
moderationButtonStr + happeningStr + newPostButtonStr moderationButtonStr + happeningStr + newPostButtonStr
if not featuresHeader: if not featuresHeader:
if not iconsAsButtons: if not icons_as_buttons:
# the search icon # the search icon
tlStr += \ tlStr += \
'<a class="imageAnchor" href="' + usersPath + \ '<a class="imageAnchor" href="' + usersPath + \
@ -244,7 +244,7 @@ def headerButtonsTimeline(defaultTimeline: str,
if newCalendarEvent: if newCalendarEvent:
# indicate that the calendar icon is highlighted # indicate that the calendar icon is highlighted
calendarAltText = '*' + calendarAltText + '*' calendarAltText = '*' + calendarAltText + '*'
if not iconsAsButtons: if not icons_as_buttons:
tlStr += \ tlStr += \
' <a class="imageAnchor" href="' + \ ' <a class="imageAnchor" href="' + \
usersPath + calendarPath + \ usersPath + calendarPath + \
@ -261,7 +261,7 @@ def headerButtonsTimeline(defaultTimeline: str,
if not featuresHeader: if not featuresHeader:
# the show/hide button, for a simpler header appearance # the show/hide button, for a simpler header appearance
if not iconsAsButtons: if not icons_as_buttons:
tlStr += \ tlStr += \
' <a class="imageAnchor" href="' + \ ' <a class="imageAnchor" href="' + \
usersPath + '/minimal' + \ usersPath + '/minimal' + \
@ -283,7 +283,7 @@ def headerButtonsTimeline(defaultTimeline: str,
'<span>' + translate['User'] + '</span></button></a>' '<span>' + translate['User'] + '</span></button></a>'
# the newswire button to show right column links # the newswire button to show right column links
if not iconsAsButtons: if not icons_as_buttons:
tlStr += \ tlStr += \
'<a class="imageAnchorMobile" href="' + \ '<a class="imageAnchorMobile" href="' + \
usersPath + '/newswiremobile">' + \ usersPath + '/newswiremobile">' + \
@ -301,7 +301,7 @@ def headerButtonsTimeline(defaultTimeline: str,
'</span></button></a>' '</span></button></a>'
# the links button to show left column links # the links button to show left column links
if not iconsAsButtons: if not icons_as_buttons:
tlStr += \ tlStr += \
'<a class="imageAnchorMobile" href="' + \ '<a class="imageAnchorMobile" href="' + \
usersPath + '/linksmobile">' + \ usersPath + '/linksmobile">' + \
@ -327,7 +327,7 @@ def headerButtonsTimeline(defaultTimeline: str,
if not featuresHeader: if not featuresHeader:
tlStr += followApprovals tlStr += followApprovals
if not iconsAsButtons: if not icons_as_buttons:
# end of headericons div # end of headericons div
tlStr += '</div>' tlStr += '</div>'

View File

@ -43,7 +43,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
newswire: {}, positiveVoting: bool, newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, moderationActionStr: str, authorized: bool, moderationActionStr: str,
@ -71,8 +71,10 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, artist, positiveVoting, newswire, False, False, artist, positiveVoting,
showPublishAsIcon, fullWidthTimelineButtonHeader, showPublishAsIcon,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, fullWidthTimelineButtonHeader,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, moderationActionStr, theme, authorized, moderationActionStr, theme,
peertubeInstances, allow_local_network_access, peertubeInstances, allow_local_network_access,
textModeBanner, accessKeys, systemLanguage, textModeBanner, accessKeys, systemLanguage,

View File

@ -540,7 +540,7 @@ def _getProfileHeaderAfterSearch(base_dir: str,
def htmlProfile(signingPrivateKeyPem: str, def htmlProfile(signingPrivateKeyPem: str,
rss_icon_at_top: bool, rss_icon_at_top: bool,
cssCache: {}, iconsAsButtons: bool, cssCache: {}, icons_as_buttons: bool,
defaultTimeline: str, defaultTimeline: str,
recentPostsCache: {}, maxRecentPosts: int, recentPostsCache: {}, maxRecentPosts: int,
translate: {}, projectVersion: str, translate: {}, projectVersion: str,
@ -569,7 +569,7 @@ def htmlProfile(signingPrivateKeyPem: str,
if isSystemAccount(nickname): if isSystemAccount(nickname):
return htmlFrontScreen(signingPrivateKeyPem, return htmlFrontScreen(signingPrivateKeyPem,
rss_icon_at_top, rss_icon_at_top,
cssCache, iconsAsButtons, cssCache, icons_as_buttons,
defaultTimeline, defaultTimeline,
recentPostsCache, maxRecentPosts, recentPostsCache, maxRecentPosts,
translate, projectVersion, translate, projectVersion,

View File

@ -98,13 +98,13 @@ def _getHelpForTimeline(base_dir: str, boxName: str) -> str:
def _htmlTimelineNewPost(manuallyApproveFollowers: bool, def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
boxName: str, iconsAsButtons: bool, boxName: str, icons_as_buttons: bool,
usersPath: str, translate: {}) -> str: usersPath: str, translate: {}) -> str:
"""Returns html for the new post button """Returns html for the new post button
""" """
newPostButtonStr = '' newPostButtonStr = ''
if boxName == 'dm': if boxName == 'dm':
if not iconsAsButtons: if not icons_as_buttons:
newPostButtonStr += \ newPostButtonStr += \
'<a class="imageAnchor" href="' + usersPath + \ '<a class="imageAnchor" href="' + usersPath + \
'/newdm?nodropdown"><img loading="lazy" src="/' + \ '/newdm?nodropdown"><img loading="lazy" src="/' + \
@ -120,7 +120,7 @@ def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
elif (boxName == 'tlblogs' or elif (boxName == 'tlblogs' or
boxName == 'tlnews' or boxName == 'tlnews' or
boxName == 'tlfeatures'): boxName == 'tlfeatures'):
if not iconsAsButtons: if not icons_as_buttons:
newPostButtonStr += \ newPostButtonStr += \
'<a class="imageAnchor" href="' + usersPath + \ '<a class="imageAnchor" href="' + usersPath + \
'/newblog"><img loading="lazy" src="/' + \ '/newblog"><img loading="lazy" src="/' + \
@ -134,7 +134,7 @@ def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
'<button class="button"><span>' + \ '<button class="button"><span>' + \
translate['Post'] + '</span></button></a>' translate['Post'] + '</span></button></a>'
elif boxName == 'tlshares': elif boxName == 'tlshares':
if not iconsAsButtons: if not icons_as_buttons:
newPostButtonStr += \ newPostButtonStr += \
'<a class="imageAnchor" href="' + usersPath + \ '<a class="imageAnchor" href="' + usersPath + \
'/newshare?nodropdown"><img loading="lazy" src="/' + \ '/newshare?nodropdown"><img loading="lazy" src="/' + \
@ -148,7 +148,7 @@ def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
'<button class="button"><span>' + \ '<button class="button"><span>' + \
translate['Post'] + '</span></button></a>' translate['Post'] + '</span></button></a>'
elif boxName == 'tlwanted': elif boxName == 'tlwanted':
if not iconsAsButtons: if not icons_as_buttons:
newPostButtonStr += \ newPostButtonStr += \
'<a class="imageAnchor" href="' + usersPath + \ '<a class="imageAnchor" href="' + usersPath + \
'/newwanted?nodropdown"><img loading="lazy" src="/' + \ '/newwanted?nodropdown"><img loading="lazy" src="/' + \
@ -163,7 +163,7 @@ def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
translate['Post'] + '</span></button></a>' translate['Post'] + '</span></button></a>'
else: else:
if not manuallyApproveFollowers: if not manuallyApproveFollowers:
if not iconsAsButtons: if not icons_as_buttons:
newPostButtonStr += \ newPostButtonStr += \
'<a class="imageAnchor" href="' + usersPath + \ '<a class="imageAnchor" href="' + usersPath + \
'/newpost"><img loading="lazy" src="/' + \ '/newpost"><img loading="lazy" src="/' + \
@ -177,7 +177,7 @@ def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
'<button class="button"><span>' + \ '<button class="button"><span>' + \
translate['Post'] + '</span></button></a>' translate['Post'] + '</span></button></a>'
else: else:
if not iconsAsButtons: if not icons_as_buttons:
newPostButtonStr += \ newPostButtonStr += \
'<a class="imageAnchor" href="' + usersPath + \ '<a class="imageAnchor" href="' + usersPath + \
'/newfollowers"><img loading="lazy" src="/' + \ '/newfollowers"><img loading="lazy" src="/' + \
@ -436,7 +436,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
positiveVoting: bool, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, authorized: bool,
@ -686,13 +686,13 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
newPostButtonStr = '' newPostButtonStr = ''
# start of headericons div # start of headericons div
if not newsHeader: if not newsHeader:
if not iconsAsButtons: if not icons_as_buttons:
newPostButtonStr += '<div class="headericons">' newPostButtonStr += '<div class="headericons">'
# what screen to go to when a new post is created # what screen to go to when a new post is created
newPostButtonStr += \ newPostButtonStr += \
_htmlTimelineNewPost(manuallyApproveFollowers, boxName, _htmlTimelineNewPost(manuallyApproveFollowers, boxName,
iconsAsButtons, usersPath, translate) icons_as_buttons, usersPath, translate)
# keyboard navigation # keyboard navigation
tlStr += \ tlStr += \
@ -727,7 +727,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
domain, timelineStartTime, domain, timelineStartTime,
newCalendarEvent, calendarPath, newCalendarEvent, calendarPath,
calendarImage, followApprovals, calendarImage, followApprovals,
iconsAsButtons, accessKeys) icons_as_buttons, accessKeys)
# start the timeline # start the timeline
tlStr += \ tlStr += \
@ -770,7 +770,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
domain, timelineStartTime, domain, timelineStartTime,
newCalendarEvent, calendarPath, newCalendarEvent, calendarPath,
calendarImage, followApprovals, calendarImage, followApprovals,
iconsAsButtons, accessKeys) icons_as_buttons, accessKeys)
tlStr += ' <div id="timelineposts" class="timeline-posts">\n' tlStr += ' <div id="timelineposts" class="timeline-posts">\n'
@ -1132,7 +1132,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
newswire: {}, positiveVoting: bool, newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, theme: str, authorized: bool, theme: str,
@ -1165,7 +1165,8 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
newswire, False, False, artist, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,
allow_local_network_access, textModeBanner, allow_local_network_access, textModeBanner,
accessKeys, systemLanguage, max_like_count, accessKeys, systemLanguage, max_like_count,
@ -1187,7 +1188,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
newswire: {}, positiveVoting: bool, newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, theme: str, authorized: bool, theme: str,
@ -1220,7 +1221,8 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
newswire, False, False, artist, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,
allow_local_network_access, textModeBanner, allow_local_network_access, textModeBanner,
accessKeys, systemLanguage, max_like_count, accessKeys, systemLanguage, max_like_count,
@ -1243,7 +1245,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
newswire: {}, positiveVoting: bool, newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, theme: str, authorized: bool, theme: str,
@ -1276,7 +1278,8 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
newswire, False, False, artist, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,
allow_local_network_access, textModeBanner, allow_local_network_access, textModeBanner,
accessKeys, systemLanguage, max_like_count, accessKeys, systemLanguage, max_like_count,
@ -1299,7 +1302,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
newswire: {}, positiveVoting: bool, newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, theme: str, authorized: bool, theme: str,
@ -1332,7 +1335,8 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
newswire, False, False, artist, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,
allow_local_network_access, textModeBanner, allow_local_network_access, textModeBanner,
accessKeys, systemLanguage, max_like_count, accessKeys, systemLanguage, max_like_count,
@ -1355,7 +1359,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
newswire: {}, positiveVoting: bool, newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, theme: str, authorized: bool, theme: str,
@ -1383,7 +1387,8 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
newswire, False, False, artist, positiveVoting, newswire, False, False, artist, positiveVoting,
showPublishAsIcon, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,
allow_local_network_access, textModeBanner, allow_local_network_access, textModeBanner,
accessKeys, systemLanguage, max_like_count, accessKeys, systemLanguage, max_like_count,
@ -1406,7 +1411,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
newswire: {}, positiveVoting: bool, newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, theme: str, authorized: bool, theme: str,
@ -1435,7 +1440,8 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
newswire, False, False, artist, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,
allow_local_network_access, textModeBanner, allow_local_network_access, textModeBanner,
accessKeys, systemLanguage, max_like_count, accessKeys, systemLanguage, max_like_count,
@ -1458,7 +1464,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
newswire: {}, positiveVoting: bool, newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, theme: str, authorized: bool, theme: str,
@ -1487,7 +1493,8 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
newswire, False, False, artist, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,
allow_local_network_access, textModeBanner, allow_local_network_access, textModeBanner,
accessKeys, systemLanguage, max_like_count, accessKeys, systemLanguage, max_like_count,
@ -1510,7 +1517,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
newswire: {}, positiveVoting: bool, newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, theme: str, authorized: bool, theme: str,
@ -1539,7 +1546,8 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
newswire, False, False, artist, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,
allow_local_network_access, textModeBanner, allow_local_network_access, textModeBanner,
accessKeys, systemLanguage, max_like_count, accessKeys, systemLanguage, max_like_count,
@ -1562,7 +1570,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
newswire: {}, positiveVoting: bool, newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, authorized: bool,
@ -1591,7 +1599,8 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
newswire, False, False, False, newswire, False, False, False,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,
allow_local_network_access, textModeBanner, allow_local_network_access, textModeBanner,
accessKeys, systemLanguage, max_like_count, accessKeys, systemLanguage, max_like_count,
@ -1614,7 +1623,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
newswire: {}, moderator: bool, editor: bool, artist: bool, newswire: {}, moderator: bool, editor: bool, artist: bool,
positiveVoting: bool, showPublishAsIcon: bool, positiveVoting: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, theme: str, authorized: bool, theme: str,
@ -1642,7 +1651,8 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
newswire, moderator, editor, artist, newswire, moderator, editor, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,
allow_local_network_access, textModeBanner, allow_local_network_access, textModeBanner,
accessKeys, systemLanguage, max_like_count, accessKeys, systemLanguage, max_like_count,
@ -1665,7 +1675,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
newswire: {}, positiveVoting: bool, newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool, showPublishAsIcon: bool,
fullWidthTimelineButtonHeader: bool, fullWidthTimelineButtonHeader: bool,
iconsAsButtons: bool, icons_as_buttons: bool,
rss_icon_at_top: bool, rss_icon_at_top: bool,
publish_button_at_top: bool, publish_button_at_top: bool,
authorized: bool, theme: str, authorized: bool, theme: str,
@ -1694,8 +1704,10 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, artist, positiveVoting, newswire, False, False, artist, positiveVoting,
showPublishAsIcon, fullWidthTimelineButtonHeader, showPublishAsIcon,
iconsAsButtons, rss_icon_at_top, publish_button_at_top, fullWidthTimelineButtonHeader,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,
allow_local_network_access, textModeBanner, allow_local_network_access, textModeBanner,
accessKeys, systemLanguage, max_like_count, accessKeys, systemLanguage, max_like_count,

View File

@ -94,7 +94,7 @@ def htmlHashtagBlocked(cssCache: {}, base_dir: str, translate: {}) -> str:
def headerButtonsFrontScreen(translate: {}, def headerButtonsFrontScreen(translate: {},
nickname: str, boxName: str, nickname: str, boxName: str,
authorized: bool, authorized: bool,
iconsAsButtons: bool) -> str: icons_as_buttons: bool) -> str:
"""Returns the header buttons for the front page of a news instance """Returns the header buttons for the front page of a news instance
""" """
headerStr = '' headerStr = ''
@ -120,7 +120,7 @@ def headerButtonsFrontScreen(translate: {},
'<button class="buttonMobile">' + \ '<button class="buttonMobile">' + \
'<span>' + translate['Login'] + \ '<span>' + translate['Login'] + \
'</span></button></a>' '</span></button></a>'
if iconsAsButtons: if icons_as_buttons:
headerStr += \ headerStr += \
' <a href="/users/news/newswiremobile">' + \ ' <a href="/users/news/newswiremobile">' + \
'<button class="' + buttonNewswire + '">' + \ '<button class="' + buttonNewswire + '">' + \