Key shortcut to media timeline

merge-requests/30/head
Bob Mottram 2021-04-23 13:24:34 +01:00
parent 4b904c8f33
commit 5d4ed5b741
2 changed files with 9 additions and 5 deletions

View File

@ -43,7 +43,8 @@ def headerButtonsTimeline(defaultTimeline: str,
calendarPath: str,
calendarImage: str,
followApprovals: str,
iconsAsButtons: bool) -> str:
iconsAsButtons: bool,
accessKeys: {}) -> str:
"""Returns the header at the top of the timeline, containing
buttons for inbox, outbox, search, calendar, etc
"""
@ -53,7 +54,9 @@ def headerButtonsTimeline(defaultTimeline: str,
if defaultTimeline == 'tlmedia':
tlStr += \
'<a href="' + usersPath + \
'/tlmedia" tabindex="-1"><button class="' + \
'/tlmedia" tabindex="-1" ' + \
'accesskey="' + accessKeys['menuMedia'] + '"' + \
'><button class="' + \
mediaButton + '"><span>' + translate['Media'] + \
'</span></button></a>'
elif defaultTimeline == 'tlblogs':

View File

@ -269,7 +269,8 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
# show follow approvals icon
followApprovals = \
'<a href="' + usersPath + \
'/followers#buttonheader">' + \
'/followers#buttonheader" ' + \
'accesskey="' + accessKeys['followButton'] + '">' + \
'<img loading="lazy" ' + \
'class="timelineicon" alt="' + \
translate['Approve follow requests'] + \
@ -515,7 +516,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
domain, timelineStartTime,
newCalendarEvent, calendarPath,
calendarImage, followApprovals,
iconsAsButtons)
iconsAsButtons, accessKeys)
# start the timeline
tlStr += '<table class="timeline">\n'
@ -555,7 +556,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
domain, timelineStartTime,
newCalendarEvent, calendarPath,
calendarImage, followApprovals,
iconsAsButtons)
iconsAsButtons, accessKeys)
tlStr += ' <div id="timelineposts" class="timeline-posts">\n'