mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
b287c3502a
commit
0436f2867f
68
daemon.py
68
daemon.py
|
@ -2237,9 +2237,9 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.showPublishAsIcon = False
|
||||
if 'icons-as-buttons' in themeDesignerParams:
|
||||
if themeDesignerParams['icons-as-buttons'].lower() == 'true':
|
||||
self.server.iconsAsButtons = True
|
||||
self.server.icons_as_buttons = True
|
||||
else:
|
||||
self.server.iconsAsButtons = False
|
||||
self.server.icons_as_buttons = False
|
||||
if 'full-width-timeline-buttons' in themeDesignerParams:
|
||||
themeValue = themeDesignerParams['full-width-timeline-buttons']
|
||||
if themeValue.lower() == 'true':
|
||||
|
@ -5021,9 +5021,9 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.fullWidthTimelineButtonHeader = \
|
||||
getConfigParam(self.server.base_dir,
|
||||
'fullWidthTimelineButtonHeader')
|
||||
self.server.iconsAsButtons = \
|
||||
self.server.icons_as_buttons = \
|
||||
getConfigParam(self.server.base_dir,
|
||||
'iconsAsButtons')
|
||||
'icons_as_buttons')
|
||||
self.server.rss_icon_at_top = \
|
||||
getConfigParam(self.server.base_dir,
|
||||
'rss_icon_at_top')
|
||||
|
@ -5962,9 +5962,9 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
getConfigParam(base_dir,
|
||||
'fullWidthTimeline' +
|
||||
'ButtonHeader')
|
||||
self.server.iconsAsButtons = \
|
||||
self.server.icons_as_buttons = \
|
||||
getConfigParam(base_dir,
|
||||
'iconsAsButtons')
|
||||
'icons_as_buttons')
|
||||
self.server.rss_icon_at_top = \
|
||||
getConfigParam(base_dir,
|
||||
'rss_icon_at_top')
|
||||
|
@ -9675,8 +9675,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.yt_replace_domain
|
||||
twitterReplacementDomain = \
|
||||
self.server.twitterReplacementDomain
|
||||
iconsAsButtons = \
|
||||
self.server.iconsAsButtons
|
||||
icons_as_buttons = \
|
||||
self.server.icons_as_buttons
|
||||
|
||||
accessKeys = self.server.accessKeys
|
||||
if self.server.keyShortcuts.get(nickname):
|
||||
|
@ -9690,7 +9690,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlProfile(self.server.signingPrivateKeyPem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
iconsAsButtons,
|
||||
icons_as_buttons,
|
||||
defaultTimeline,
|
||||
recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
|
@ -9782,8 +9782,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.twitterReplacementDomain
|
||||
showPublishedDateOnly = \
|
||||
self.server.showPublishedDateOnly
|
||||
iconsAsButtons = \
|
||||
self.server.iconsAsButtons
|
||||
icons_as_buttons = \
|
||||
self.server.icons_as_buttons
|
||||
allow_local_network_access = \
|
||||
self.server.allow_local_network_access
|
||||
accessKeys = self.server.accessKeys
|
||||
|
@ -9806,7 +9806,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlProfile(signingPrivateKeyPem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
iconsAsButtons,
|
||||
icons_as_buttons,
|
||||
defaultTimeline,
|
||||
recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
|
@ -10249,7 +10249,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized,
|
||||
|
@ -10400,7 +10400,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized, self.server.themeName,
|
||||
|
@ -10543,7 +10543,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized, self.server.themeName,
|
||||
|
@ -10684,7 +10684,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized,
|
||||
|
@ -10826,7 +10826,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized,
|
||||
|
@ -10978,7 +10978,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized,
|
||||
|
@ -11127,7 +11127,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized,
|
||||
|
@ -11234,7 +11234,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
self.server.fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized, self.server.themeName,
|
||||
|
@ -11318,7 +11318,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
self.server.fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized, self.server.themeName,
|
||||
|
@ -11440,7 +11440,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized,
|
||||
|
@ -11578,7 +11578,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized,
|
||||
|
@ -11710,7 +11710,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.positiveVoting,
|
||||
self.server.showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.publish_button_at_top,
|
||||
authorized, moderationActionStr,
|
||||
|
@ -11817,7 +11817,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlProfile(self.server.signingPrivateKeyPem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
|
@ -11938,7 +11938,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlProfile(self.server.signingPrivateKeyPem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
|
@ -12057,7 +12057,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlProfile(self.server.signingPrivateKeyPem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
|
@ -12193,7 +12193,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlProfile(self.server.signingPrivateKeyPem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
self.server.iconsAsButtons,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
|
@ -14959,7 +14959,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
'/users/' + nickname + '/' + self.server.defaultTimeline
|
||||
showPublishAsIcon = self.server.showPublishAsIcon
|
||||
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
|
||||
accessKeys = self.server.accessKeys
|
||||
if self.server.keyShortcuts.get(nickname):
|
||||
|
@ -14977,7 +14977,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
showPublishAsIcon,
|
||||
authorized,
|
||||
rss_icon_at_top,
|
||||
iconsAsButtons,
|
||||
icons_as_buttons,
|
||||
defaultTimeline,
|
||||
self.server.themeName,
|
||||
accessKeys).encode('utf-8')
|
||||
|
@ -15004,7 +15004,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
accessKeys = self.server.keyShortcuts[nickname]
|
||||
timelinePath = \
|
||||
'/users/' + nickname + '/' + self.server.defaultTimeline
|
||||
iconsAsButtons = self.server.iconsAsButtons
|
||||
icons_as_buttons = self.server.icons_as_buttons
|
||||
defaultTimeline = self.server.defaultTimeline
|
||||
sharedItemsDomains = \
|
||||
self.server.shared_items_federated_domains
|
||||
|
@ -15016,7 +15016,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
timelinePath,
|
||||
authorized,
|
||||
self.server.rss_icon_at_top,
|
||||
iconsAsButtons,
|
||||
icons_as_buttons,
|
||||
defaultTimeline,
|
||||
self.server.themeName,
|
||||
accessKeys,
|
||||
|
@ -18431,7 +18431,7 @@ def runDaemon(content_license_url: str,
|
|||
max_feed_item_size_kb: int,
|
||||
publish_button_at_top: bool,
|
||||
rss_icon_at_top: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
showPublishAsIcon: bool,
|
||||
maxFollowers: int,
|
||||
|
@ -18665,7 +18665,7 @@ def runDaemon(content_license_url: str,
|
|||
httpd.fullWidthTimelineButtonHeader = fullWidthTimelineButtonHeader
|
||||
|
||||
# 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
|
||||
httpd.rss_icon_at_top = rss_icon_at_top
|
||||
|
|
14
epicyon.py
14
epicyon.py
|
@ -337,8 +337,8 @@ parser.add_argument("--fullWidthTimelineButtonHeader",
|
|||
help="Whether to show the timeline " +
|
||||
"button header containing inbox and outbox " +
|
||||
"as the full width of the screen")
|
||||
parser.add_argument("--iconsAsButtons",
|
||||
dest='iconsAsButtons',
|
||||
parser.add_argument("--icons_as_buttons",
|
||||
dest='icons_as_buttons',
|
||||
type=str2bool, nargs='?',
|
||||
const=True, default=False,
|
||||
help="Show header icons as buttons")
|
||||
|
@ -3083,10 +3083,10 @@ showPublishAsIcon = \
|
|||
if showPublishAsIcon is not None:
|
||||
args.showPublishAsIcon = bool(showPublishAsIcon)
|
||||
|
||||
iconsAsButtons = \
|
||||
getConfigParam(base_dir, 'iconsAsButtons')
|
||||
if iconsAsButtons is not None:
|
||||
args.iconsAsButtons = bool(iconsAsButtons)
|
||||
icons_as_buttons = \
|
||||
getConfigParam(base_dir, 'icons_as_buttons')
|
||||
if icons_as_buttons is not None:
|
||||
args.icons_as_buttons = bool(icons_as_buttons)
|
||||
|
||||
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.publish_button_at_top,
|
||||
args.rss_icon_at_top,
|
||||
args.iconsAsButtons,
|
||||
args.icons_as_buttons,
|
||||
args.fullWidthTimelineButtonHeader,
|
||||
args.showPublishAsIcon,
|
||||
args.maxFollowers,
|
||||
|
|
2
theme.py
2
theme.py
|
@ -197,7 +197,7 @@ def _setIconsAsButtons(base_dir: str, useButtons: bool) -> bool:
|
|||
configJson = loadJson(configFilename, 0)
|
||||
if not configJson:
|
||||
return False
|
||||
configJson['iconsAsButtons'] = useButtons
|
||||
configJson['icons_as_buttons'] = useButtons
|
||||
return saveJson(configJson, configFilename)
|
||||
|
||||
|
||||
|
|
|
@ -353,7 +353,7 @@ def htmlLinksMobile(cssCache: {}, base_dir: str,
|
|||
http_prefix: str, translate,
|
||||
timelinePath: str, authorized: bool,
|
||||
rss_icon_at_top: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
defaultTimeline: str,
|
||||
theme: str, accessKeys: {},
|
||||
shared_items_federated_domains: []) -> str:
|
||||
|
@ -392,7 +392,7 @@ def htmlLinksMobile(cssCache: {}, base_dir: str,
|
|||
htmlStr += '<center>' + \
|
||||
headerButtonsFrontScreen(translate, nickname,
|
||||
'links', authorized,
|
||||
iconsAsButtons) + '</center>'
|
||||
icons_as_buttons) + '</center>'
|
||||
htmlStr += \
|
||||
getLeftColumnContent(base_dir, nickname, domainFull,
|
||||
http_prefix, translate,
|
||||
|
|
|
@ -453,7 +453,7 @@ def htmlNewswireMobile(cssCache: {}, base_dir: str, nickname: str,
|
|||
showPublishAsIcon: bool,
|
||||
authorized: bool,
|
||||
rss_icon_at_top: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
defaultTimeline: str,
|
||||
theme: str,
|
||||
accessKeys: {}) -> str:
|
||||
|
@ -496,7 +496,7 @@ def htmlNewswireMobile(cssCache: {}, base_dir: str, nickname: str,
|
|||
htmlStr += '<center>' + \
|
||||
headerButtonsFrontScreen(translate, nickname,
|
||||
'newswire', authorized,
|
||||
iconsAsButtons) + '</center>'
|
||||
icons_as_buttons) + '</center>'
|
||||
htmlStr += \
|
||||
getRightColumnContent(base_dir, nickname, domainFull,
|
||||
http_prefix, translate,
|
||||
|
|
|
@ -95,7 +95,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
|||
|
||||
def htmlFrontScreen(signingPrivateKeyPem: str,
|
||||
rss_icon_at_top: bool,
|
||||
cssCache: {}, iconsAsButtons: bool,
|
||||
cssCache: {}, icons_as_buttons: bool,
|
||||
defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
translate: {}, projectVersion: str,
|
||||
|
@ -131,7 +131,7 @@ def htmlFrontScreen(signingPrivateKeyPem: str,
|
|||
|
||||
loginButton = headerButtonsFrontScreen(translate, nickname,
|
||||
'features', authorized,
|
||||
iconsAsButtons)
|
||||
icons_as_buttons)
|
||||
|
||||
# If this is the news account then show a different banner
|
||||
bannerFile, bannerFilename = \
|
||||
|
|
|
@ -46,7 +46,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
|||
calendarPath: str,
|
||||
calendarImage: str,
|
||||
followApprovals: str,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
accessKeys: {}) -> str:
|
||||
"""Returns the header at the top of the timeline, containing
|
||||
buttons for inbox, outbox, search, calendar, etc
|
||||
|
@ -157,7 +157,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
|||
twodays = datetime.now() + timedelta(2)
|
||||
if dayEventsCheck(base_dir, nickname, domain, now):
|
||||
# happening today button
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
happeningStr += \
|
||||
'<a href="' + usersPath + '/calendar?year=' + \
|
||||
str(now.year) + '?month=' + str(now.month) + \
|
||||
|
@ -174,7 +174,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
|||
|
||||
elif dayEventsCheck(base_dir, nickname, domain, tomorrow):
|
||||
# happening tomorrow button
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
happeningStr += \
|
||||
'<a href="' + usersPath + '/calendar?year=' + \
|
||||
str(tomorrow.year) + '?month=' + str(tomorrow.month) + \
|
||||
|
@ -189,7 +189,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
|||
'<button class="button">' + \
|
||||
translate['Happening Tomorrow'] + '</button></a>'
|
||||
elif dayEventsCheck(base_dir, nickname, domain, twodays):
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
happeningStr += \
|
||||
'<a href="' + usersPath + \
|
||||
'/calendar" tabindex="-1">' + \
|
||||
|
@ -216,7 +216,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
|||
moderationButtonStr + happeningStr + newPostButtonStr
|
||||
|
||||
if not featuresHeader:
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
# the search icon
|
||||
tlStr += \
|
||||
'<a class="imageAnchor" href="' + usersPath + \
|
||||
|
@ -244,7 +244,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
|||
if newCalendarEvent:
|
||||
# indicate that the calendar icon is highlighted
|
||||
calendarAltText = '*' + calendarAltText + '*'
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
tlStr += \
|
||||
' <a class="imageAnchor" href="' + \
|
||||
usersPath + calendarPath + \
|
||||
|
@ -261,7 +261,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
|||
|
||||
if not featuresHeader:
|
||||
# the show/hide button, for a simpler header appearance
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
tlStr += \
|
||||
' <a class="imageAnchor" href="' + \
|
||||
usersPath + '/minimal' + \
|
||||
|
@ -283,7 +283,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
|||
'<span>' + translate['User'] + '</span></button></a>'
|
||||
|
||||
# the newswire button to show right column links
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
tlStr += \
|
||||
'<a class="imageAnchorMobile" href="' + \
|
||||
usersPath + '/newswiremobile">' + \
|
||||
|
@ -301,7 +301,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
|||
'</span></button></a>'
|
||||
|
||||
# the links button to show left column links
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
tlStr += \
|
||||
'<a class="imageAnchorMobile" href="' + \
|
||||
usersPath + '/linksmobile">' + \
|
||||
|
@ -327,7 +327,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
|||
if not featuresHeader:
|
||||
tlStr += followApprovals
|
||||
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
# end of headericons div
|
||||
tlStr += '</div>'
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool, moderationActionStr: str,
|
||||
|
@ -71,8 +71,10 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
|||
twitterReplacementDomain,
|
||||
showPublishedDateOnly,
|
||||
newswire, False, False, artist, positiveVoting,
|
||||
showPublishAsIcon, fullWidthTimelineButtonHeader,
|
||||
iconsAsButtons, rss_icon_at_top, publish_button_at_top,
|
||||
showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
icons_as_buttons, rss_icon_at_top,
|
||||
publish_button_at_top,
|
||||
authorized, moderationActionStr, theme,
|
||||
peertubeInstances, allow_local_network_access,
|
||||
textModeBanner, accessKeys, systemLanguage,
|
||||
|
|
|
@ -540,7 +540,7 @@ def _getProfileHeaderAfterSearch(base_dir: str,
|
|||
|
||||
def htmlProfile(signingPrivateKeyPem: str,
|
||||
rss_icon_at_top: bool,
|
||||
cssCache: {}, iconsAsButtons: bool,
|
||||
cssCache: {}, icons_as_buttons: bool,
|
||||
defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
translate: {}, projectVersion: str,
|
||||
|
@ -569,7 +569,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
if isSystemAccount(nickname):
|
||||
return htmlFrontScreen(signingPrivateKeyPem,
|
||||
rss_icon_at_top,
|
||||
cssCache, iconsAsButtons,
|
||||
cssCache, icons_as_buttons,
|
||||
defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
translate, projectVersion,
|
||||
|
|
|
@ -98,13 +98,13 @@ def _getHelpForTimeline(base_dir: str, boxName: str) -> str:
|
|||
|
||||
|
||||
def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
|
||||
boxName: str, iconsAsButtons: bool,
|
||||
boxName: str, icons_as_buttons: bool,
|
||||
usersPath: str, translate: {}) -> str:
|
||||
"""Returns html for the new post button
|
||||
"""
|
||||
newPostButtonStr = ''
|
||||
if boxName == 'dm':
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
newPostButtonStr += \
|
||||
'<a class="imageAnchor" href="' + usersPath + \
|
||||
'/newdm?nodropdown"><img loading="lazy" src="/' + \
|
||||
|
@ -120,7 +120,7 @@ def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
|
|||
elif (boxName == 'tlblogs' or
|
||||
boxName == 'tlnews' or
|
||||
boxName == 'tlfeatures'):
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
newPostButtonStr += \
|
||||
'<a class="imageAnchor" href="' + usersPath + \
|
||||
'/newblog"><img loading="lazy" src="/' + \
|
||||
|
@ -134,7 +134,7 @@ def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
|
|||
'<button class="button"><span>' + \
|
||||
translate['Post'] + '</span></button></a>'
|
||||
elif boxName == 'tlshares':
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
newPostButtonStr += \
|
||||
'<a class="imageAnchor" href="' + usersPath + \
|
||||
'/newshare?nodropdown"><img loading="lazy" src="/' + \
|
||||
|
@ -148,7 +148,7 @@ def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
|
|||
'<button class="button"><span>' + \
|
||||
translate['Post'] + '</span></button></a>'
|
||||
elif boxName == 'tlwanted':
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
newPostButtonStr += \
|
||||
'<a class="imageAnchor" href="' + usersPath + \
|
||||
'/newwanted?nodropdown"><img loading="lazy" src="/' + \
|
||||
|
@ -163,7 +163,7 @@ def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
|
|||
translate['Post'] + '</span></button></a>'
|
||||
else:
|
||||
if not manuallyApproveFollowers:
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
newPostButtonStr += \
|
||||
'<a class="imageAnchor" href="' + usersPath + \
|
||||
'/newpost"><img loading="lazy" src="/' + \
|
||||
|
@ -177,7 +177,7 @@ def _htmlTimelineNewPost(manuallyApproveFollowers: bool,
|
|||
'<button class="button"><span>' + \
|
||||
translate['Post'] + '</span></button></a>'
|
||||
else:
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
newPostButtonStr += \
|
||||
'<a class="imageAnchor" href="' + usersPath + \
|
||||
'/newfollowers"><img loading="lazy" src="/' + \
|
||||
|
@ -436,7 +436,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool,
|
||||
|
@ -686,13 +686,13 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
newPostButtonStr = ''
|
||||
# start of headericons div
|
||||
if not newsHeader:
|
||||
if not iconsAsButtons:
|
||||
if not icons_as_buttons:
|
||||
newPostButtonStr += '<div class="headericons">'
|
||||
|
||||
# what screen to go to when a new post is created
|
||||
newPostButtonStr += \
|
||||
_htmlTimelineNewPost(manuallyApproveFollowers, boxName,
|
||||
iconsAsButtons, usersPath, translate)
|
||||
icons_as_buttons, usersPath, translate)
|
||||
|
||||
# keyboard navigation
|
||||
tlStr += \
|
||||
|
@ -727,7 +727,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
domain, timelineStartTime,
|
||||
newCalendarEvent, calendarPath,
|
||||
calendarImage, followApprovals,
|
||||
iconsAsButtons, accessKeys)
|
||||
icons_as_buttons, accessKeys)
|
||||
|
||||
# start the timeline
|
||||
tlStr += \
|
||||
|
@ -770,7 +770,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
domain, timelineStartTime,
|
||||
newCalendarEvent, calendarPath,
|
||||
calendarImage, followApprovals,
|
||||
iconsAsButtons, accessKeys)
|
||||
icons_as_buttons, accessKeys)
|
||||
|
||||
tlStr += ' <div id="timelineposts" class="timeline-posts">\n'
|
||||
|
||||
|
@ -1132,7 +1132,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool, theme: str,
|
||||
|
@ -1165,7 +1165,8 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
newswire, False, False, artist,
|
||||
positiveVoting, showPublishAsIcon,
|
||||
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,
|
||||
allow_local_network_access, textModeBanner,
|
||||
accessKeys, systemLanguage, max_like_count,
|
||||
|
@ -1187,7 +1188,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool, theme: str,
|
||||
|
@ -1220,7 +1221,8 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
|||
newswire, False, False, artist,
|
||||
positiveVoting, showPublishAsIcon,
|
||||
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,
|
||||
allow_local_network_access, textModeBanner,
|
||||
accessKeys, systemLanguage, max_like_count,
|
||||
|
@ -1243,7 +1245,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool, theme: str,
|
||||
|
@ -1276,7 +1278,8 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
newswire, False, False, artist,
|
||||
positiveVoting, showPublishAsIcon,
|
||||
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,
|
||||
allow_local_network_access, textModeBanner,
|
||||
accessKeys, systemLanguage, max_like_count,
|
||||
|
@ -1299,7 +1302,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool, theme: str,
|
||||
|
@ -1332,7 +1335,8 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
newswire, False, False, artist,
|
||||
positiveVoting, showPublishAsIcon,
|
||||
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,
|
||||
allow_local_network_access, textModeBanner,
|
||||
accessKeys, systemLanguage, max_like_count,
|
||||
|
@ -1355,7 +1359,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool, theme: str,
|
||||
|
@ -1383,7 +1387,8 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
newswire, False, False, artist, positiveVoting,
|
||||
showPublishAsIcon,
|
||||
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,
|
||||
allow_local_network_access, textModeBanner,
|
||||
accessKeys, systemLanguage, max_like_count,
|
||||
|
@ -1406,7 +1411,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool, theme: str,
|
||||
|
@ -1435,7 +1440,8 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
newswire, False, False, artist,
|
||||
positiveVoting, showPublishAsIcon,
|
||||
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,
|
||||
allow_local_network_access, textModeBanner,
|
||||
accessKeys, systemLanguage, max_like_count,
|
||||
|
@ -1458,7 +1464,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool, theme: str,
|
||||
|
@ -1487,7 +1493,8 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
newswire, False, False, artist,
|
||||
positiveVoting, showPublishAsIcon,
|
||||
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,
|
||||
allow_local_network_access, textModeBanner,
|
||||
accessKeys, systemLanguage, max_like_count,
|
||||
|
@ -1510,7 +1517,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool, theme: str,
|
||||
|
@ -1539,7 +1546,8 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
newswire, False, False, artist,
|
||||
positiveVoting, showPublishAsIcon,
|
||||
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,
|
||||
allow_local_network_access, textModeBanner,
|
||||
accessKeys, systemLanguage, max_like_count,
|
||||
|
@ -1562,7 +1570,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool,
|
||||
|
@ -1591,7 +1599,8 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
newswire, False, False, False,
|
||||
positiveVoting, showPublishAsIcon,
|
||||
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,
|
||||
allow_local_network_access, textModeBanner,
|
||||
accessKeys, systemLanguage, max_like_count,
|
||||
|
@ -1614,7 +1623,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, moderator: bool, editor: bool, artist: bool,
|
||||
positiveVoting: bool, showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool, theme: str,
|
||||
|
@ -1642,7 +1651,8 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
newswire, moderator, editor, artist,
|
||||
positiveVoting, showPublishAsIcon,
|
||||
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,
|
||||
allow_local_network_access, textModeBanner,
|
||||
accessKeys, systemLanguage, max_like_count,
|
||||
|
@ -1665,7 +1675,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
|||
newswire: {}, positiveVoting: bool,
|
||||
showPublishAsIcon: bool,
|
||||
fullWidthTimelineButtonHeader: bool,
|
||||
iconsAsButtons: bool,
|
||||
icons_as_buttons: bool,
|
||||
rss_icon_at_top: bool,
|
||||
publish_button_at_top: bool,
|
||||
authorized: bool, theme: str,
|
||||
|
@ -1694,8 +1704,10 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
|||
twitterReplacementDomain,
|
||||
showPublishedDateOnly,
|
||||
newswire, False, False, artist, positiveVoting,
|
||||
showPublishAsIcon, fullWidthTimelineButtonHeader,
|
||||
iconsAsButtons, rss_icon_at_top, publish_button_at_top,
|
||||
showPublishAsIcon,
|
||||
fullWidthTimelineButtonHeader,
|
||||
icons_as_buttons, rss_icon_at_top,
|
||||
publish_button_at_top,
|
||||
authorized, None, theme, peertubeInstances,
|
||||
allow_local_network_access, textModeBanner,
|
||||
accessKeys, systemLanguage, max_like_count,
|
||||
|
|
|
@ -94,7 +94,7 @@ def htmlHashtagBlocked(cssCache: {}, base_dir: str, translate: {}) -> str:
|
|||
def headerButtonsFrontScreen(translate: {},
|
||||
nickname: str, boxName: str,
|
||||
authorized: bool,
|
||||
iconsAsButtons: bool) -> str:
|
||||
icons_as_buttons: bool) -> str:
|
||||
"""Returns the header buttons for the front page of a news instance
|
||||
"""
|
||||
headerStr = ''
|
||||
|
@ -120,7 +120,7 @@ def headerButtonsFrontScreen(translate: {},
|
|||
'<button class="buttonMobile">' + \
|
||||
'<span>' + translate['Login'] + \
|
||||
'</span></button></a>'
|
||||
if iconsAsButtons:
|
||||
if icons_as_buttons:
|
||||
headerStr += \
|
||||
' <a href="/users/news/newswiremobile">' + \
|
||||
'<button class="' + buttonNewswire + '">' + \
|
||||
|
|
Loading…
Reference in New Issue