diff --git a/webapp_headerbuttons.py b/webapp_headerbuttons.py index a30d5300f..25f9c55b3 100644 --- a/webapp_headerbuttons.py +++ b/webapp_headerbuttons.py @@ -37,6 +37,7 @@ def header_buttons_timeline(default_timeline: str, bookmarks_button_str: str, events_button_str: str, moderation_button_str: str, + header_icons_str: str, new_post_button_str: str, base_dir: str, nickname: str, domain: str, @@ -266,39 +267,65 @@ def header_buttons_timeline(default_timeline: str, tl_str += \ shares_button_str + wanted_button_str + \ bookmarks_button_str + events_button_str + \ - moderation_button_str + happening_str + new_post_button_str + moderation_button_str + happening_str else: tl_str += happening_str + # start of headericons div if not is_text_browser: if not features_header: - if not icons_as_buttons: - # the search icon - tl_str += \ - '' + \ - '| ' + \
-                    translate['Search and follow'] + \
-                    '' - else: - # the search button - tl_str += \ - '' + \ - '' + + # 3. the newswire and links button to show right column links + if not is_text_browser: + # the links button to show left column links + if not icons_as_buttons: + tl_str += \ + '' + \ + '| ' + translate['Edit Links'] + \
+                '' + else: + # NOTE: deliberately no \n at end of line + tl_str += \ + '' + + # the newswire button to show left column links + if not icons_as_buttons: + tl_str += \ + '' + \ + '| ' + translate['News'] + \
+                '' + else: + # NOTE: deliberately no \n at end of line + tl_str += \ + '' + + # 4. the calendar button if not is_text_browser: if not features_header: calendar_alt_text = translate['Calendar'] @@ -374,54 +401,42 @@ def header_buttons_timeline(default_timeline: str, '>' + # 5. search button if not is_text_browser: - # the newswire button to show right column links - if not icons_as_buttons: - tl_str += \ - '' + \ - '| ' + translate['News'] + \
-                '' - else: - # NOTE: deliberately no \n at end of line - tl_str += \ - '' + if not features_header: + if not icons_as_buttons: + # the search icon + tl_str += \ + '' + \ + '| ' + \
+                    translate['Search and follow'] + \
+                    '' + else: + # the search button + tl_str += \ + '' + \ + '' + # 6. new post + if not is_text_browser: + if not features_header: + tl_str += new_post_button_str - if features_header: - tl_str += \ - '' + \ - '' - - if not features_header: - tl_str += follow_approvals + # benchmark 5 + time_diff = int((time.time() - timeline_start_time) * 1000) + if time_diff > 100: + print('TIMELINE TIMING ' + box_name + ' 5 = ' + str(time_diff)) + # end of headericons div if not icons_as_buttons: - # end of headericons div tl_str += '' # end of the button header with inbox, outbox, etc diff --git a/webapp_timeline.py b/webapp_timeline.py index 35cfbeaa8..5530e975d 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -770,14 +770,14 @@ def html_timeline(default_timeline: str, if default_timeline == 'tlfeatures' and box_name == 'tlfeatures': news_header = True - new_post_button_str = '' + header_icons_str = '' # start of headericons div if not news_header: if not icons_as_buttons: - new_post_button_str += '
' + header_icons_str = '
' # what screen to go to when a new post is created - new_post_button_str += \ + new_post_button_str = \ _html_timeline_new_post(manually_approve_followers, box_name, icons_as_buttons, users_path, translate, access_keys) @@ -815,6 +815,7 @@ def html_timeline(default_timeline: str, shares_button_str, wanted_button_str, bookmarks_button_str, events_button_str, moderation_button_str, + header_icons_str, new_post_button_str, base_dir, nickname, domain, timeline_start_time, new_calendar_event, calendar_path, @@ -867,6 +868,7 @@ def html_timeline(default_timeline: str, shares_button_str, wanted_button_str, bookmarks_button_str, events_button_str, moderation_button_str, + header_icons_str, new_post_button_str, base_dir, nickname, domain, timeline_start_time, new_calendar_event, calendar_path,