mirror of https://gitlab.com/bashrc2/epicyon
				
				
				
			Remove icons_as_buttons option
It adds too much complexity to user interface implementationmain
							parent
							
								
									35f0135663
								
							
						
					
					
						commit
						9538f28757
					
				|  | @ -384,7 +384,6 @@ class EpicyonServer(ThreadingHTTPServer): | |||
|     max_followers = 2000 | ||||
|     show_publish_as_icon = False | ||||
|     full_width_tl_button_header = False | ||||
|     icons_as_buttons = False | ||||
|     rss_icon_at_top = True | ||||
|     publish_button_at_top = False | ||||
|     max_feed_item_size_kb = 100 | ||||
|  | @ -619,7 +618,6 @@ def run_daemon(accounts_data_dir: str, | |||
|                max_feed_item_size_kb: int, | ||||
|                publish_button_at_top: bool, | ||||
|                rss_icon_at_top: bool, | ||||
|                icons_as_buttons: bool, | ||||
|                full_width_tl_button_header: bool, | ||||
|                show_publish_as_icon: bool, | ||||
|                max_followers: int, | ||||
|  | @ -1076,9 +1074,6 @@ def run_daemon(accounts_data_dir: str, | |||
|     # calendar, etc as the full width of the screen or not | ||||
|     httpd.full_width_tl_button_header = full_width_tl_button_header | ||||
| 
 | ||||
|     # whether to show icons in the header (eg calendar) as buttons | ||||
|     httpd.icons_as_buttons = False | ||||
| 
 | ||||
|     # whether to show the RSS icon at the top or the bottom of the timeline | ||||
|     httpd.rss_icon_at_top = rss_icon_at_top | ||||
| 
 | ||||
|  |  | |||
|  | @ -2981,7 +2981,6 @@ def daemon_http_get(self) -> None: | |||
|                 '/users/' + nickname + '/' + self.server.default_timeline | ||||
|             show_publish_as_icon = self.server.show_publish_as_icon | ||||
|             rss_icon_at_top = self.server.rss_icon_at_top | ||||
|             icons_as_buttons = False | ||||
|             default_timeline = self.server.default_timeline | ||||
|             access_keys = self.server.access_keys | ||||
|             if self.server.key_shortcuts.get(nickname): | ||||
|  | @ -2998,7 +2997,6 @@ def daemon_http_get(self) -> None: | |||
|                                      show_publish_as_icon, | ||||
|                                      authorized, | ||||
|                                      rss_icon_at_top, | ||||
|                                      icons_as_buttons, | ||||
|                                      default_timeline, | ||||
|                                      self.server.theme_name, | ||||
|                                      access_keys, | ||||
|  | @ -3026,7 +3024,6 @@ def daemon_http_get(self) -> None: | |||
|                 access_keys = self.server.key_shortcuts[nickname] | ||||
|             timeline_path = \ | ||||
|                 '/users/' + nickname + '/' + self.server.default_timeline | ||||
|             icons_as_buttons = False | ||||
|             default_timeline = self.server.default_timeline | ||||
|             shared_items_domains = \ | ||||
|                 self.server.shared_items_federated_domains | ||||
|  | @ -3039,7 +3036,6 @@ def daemon_http_get(self) -> None: | |||
|                                   timeline_path, | ||||
|                                   authorized, | ||||
|                                   self.server.rss_icon_at_top, | ||||
|                                   icons_as_buttons, | ||||
|                                   default_timeline, | ||||
|                                   self.server.theme_name, | ||||
|                                   access_keys, | ||||
|  | @ -4720,7 +4716,6 @@ def daemon_http_get(self) -> None: | |||
|                       self.server.cached_webfingers, | ||||
|                       self.server.yt_replace_domain, | ||||
|                       self.server.twitter_replacement_domain, | ||||
|                       self.server.icons_as_buttons, | ||||
|                       self.server.access_keys, | ||||
|                       self.server.key_shortcuts, | ||||
|                       self.server.city, | ||||
|  | @ -4779,7 +4774,6 @@ def daemon_http_get(self) -> None: | |||
|                        self.server.yt_replace_domain, | ||||
|                        self.server.twitter_replacement_domain, | ||||
|                        self.server.show_published_date_only, | ||||
|                        self.server.icons_as_buttons, | ||||
|                        self.server.allow_local_network_access, | ||||
|                        self.server.access_keys, | ||||
|                        self.server.key_shortcuts, | ||||
|  | @ -4951,7 +4945,6 @@ def daemon_http_get(self) -> None: | |||
|                       self.server.show_published_date_only, | ||||
|                       self.server.newswire, | ||||
|                       self.server.show_publish_as_icon, | ||||
|                       self.server.icons_as_buttons, | ||||
|                       self.server.rss_icon_at_top, | ||||
|                       self.server.publish_button_at_top, | ||||
|                       self.server.theme_name, | ||||
|  | @ -5012,7 +5005,6 @@ def daemon_http_get(self) -> None: | |||
|                     self.server.yt_replace_domain, | ||||
|                     self.server.newswire, | ||||
|                     self.server.show_publish_as_icon, | ||||
|                     self.server.icons_as_buttons, | ||||
|                     self.server.rss_icon_at_top, | ||||
|                     self.server.publish_button_at_top, | ||||
|                     self.server.theme_name, | ||||
|  | @ -5073,7 +5065,6 @@ def daemon_http_get(self) -> None: | |||
|                         self.server.yt_replace_domain, | ||||
|                         self.server.newswire, | ||||
|                         self.server.show_publish_as_icon, | ||||
|                         self.server.icons_as_buttons, | ||||
|                         self.server.rss_icon_at_top, | ||||
|                         self.server.publish_button_at_top, | ||||
|                         self.server.theme_name, | ||||
|  | @ -5134,7 +5125,6 @@ def daemon_http_get(self) -> None: | |||
|                                self.server.show_published_date_only, | ||||
|                                self.server.newswire, | ||||
|                                self.server.show_publish_as_icon, | ||||
|                                self.server.icons_as_buttons, | ||||
|                                self.server.rss_icon_at_top, | ||||
|                                self.server.publish_button_at_top, | ||||
|                                self.server.theme_name, | ||||
|  | @ -5198,7 +5188,6 @@ def daemon_http_get(self) -> None: | |||
|                                self.server.show_published_date_only, | ||||
|                                self.server.newswire, | ||||
|                                self.server.show_publish_as_icon, | ||||
|                                self.server.icons_as_buttons, | ||||
|                                self.server.rss_icon_at_top, | ||||
|                                self.server.publish_button_at_top, | ||||
|                                self.server.theme_name, | ||||
|  | @ -5260,7 +5249,6 @@ def daemon_http_get(self) -> None: | |||
|                               self.server.show_published_date_only, | ||||
|                               self.server.newswire, | ||||
|                               self.server.show_publish_as_icon, | ||||
|                               self.server.icons_as_buttons, | ||||
|                               self.server.rss_icon_at_top, | ||||
|                               self.server.publish_button_at_top, | ||||
|                               self.server.theme_name, | ||||
|  | @ -5322,7 +5310,6 @@ def daemon_http_get(self) -> None: | |||
|                                   self.server.yt_replace_domain, | ||||
|                                   self.server.newswire, | ||||
|                                   self.server.show_publish_as_icon, | ||||
|                                   self.server.icons_as_buttons, | ||||
|                                   self.server.rss_icon_at_top, | ||||
|                                   self.server.publish_button_at_top, | ||||
|                                   self.server.theme_name, | ||||
|  | @ -5379,7 +5366,6 @@ def daemon_http_get(self) -> None: | |||
|                                 self.server.newswire, | ||||
|                                 self.server.positive_voting, | ||||
|                                 self.server.show_publish_as_icon, | ||||
|                                 self.server.icons_as_buttons, | ||||
|                                 self.server.rss_icon_at_top, | ||||
|                                 self.server.publish_button_at_top, | ||||
|                                 self.server.theme_name, | ||||
|  | @ -5433,7 +5419,6 @@ def daemon_http_get(self) -> None: | |||
|                                 self.server.newswire, | ||||
|                                 self.server.positive_voting, | ||||
|                                 self.server.show_publish_as_icon, | ||||
|                                 self.server.icons_as_buttons, | ||||
|                                 self.server.rss_icon_at_top, | ||||
|                                 self.server.publish_button_at_top, | ||||
|                                 self.server.theme_name, | ||||
|  | @ -5586,7 +5571,6 @@ def daemon_http_get(self) -> None: | |||
|                                    self.server.yt_replace_domain, | ||||
|                                    self.server.newswire, | ||||
|                                    self.server.show_publish_as_icon, | ||||
|                                    self.server.icons_as_buttons, | ||||
|                                    self.server.rss_icon_at_top, | ||||
|                                    self.server.publish_button_at_top, | ||||
|                                    self.server.theme_name, | ||||
|  | @ -5648,7 +5632,6 @@ def daemon_http_get(self) -> None: | |||
|                                 self.server.show_published_date_only, | ||||
|                                 self.server.newswire, | ||||
|                                 self.server.show_publish_as_icon, | ||||
|                                 self.server.icons_as_buttons, | ||||
|                                 self.server.rss_icon_at_top, | ||||
|                                 self.server.publish_button_at_top, | ||||
|                                 self.server.theme_name, | ||||
|  | @ -5715,7 +5698,6 @@ def daemon_http_get(self) -> None: | |||
|                              self.server.yt_replace_domain, | ||||
|                              self.server.newswire, | ||||
|                              self.server.show_publish_as_icon, | ||||
|                              self.server.icons_as_buttons, | ||||
|                              self.server.rss_icon_at_top, | ||||
|                              self.server.publish_button_at_top, | ||||
|                              self.server.theme_name, | ||||
|  | @ -5759,7 +5741,6 @@ def daemon_http_get(self) -> None: | |||
|                         self.server.bold_reading, | ||||
|                         self.server.signing_priv_key_pem, | ||||
|                         self.server.rss_icon_at_top, | ||||
|                         self.server.icons_as_buttons, | ||||
|                         self.server.default_timeline, | ||||
|                         self.server.recent_posts_cache, | ||||
|                         self.server.max_recent_posts, | ||||
|  | @ -5821,7 +5802,6 @@ def daemon_http_get(self) -> None: | |||
|                            self.server.sites_unavailable, | ||||
|                            self.server.signing_priv_key_pem, | ||||
|                            self.server.rss_icon_at_top, | ||||
|                            self.server.icons_as_buttons, | ||||
|                            self.server.default_timeline, | ||||
|                            self.server.recent_posts_cache, | ||||
|                            self.server.max_recent_posts, | ||||
|  | @ -5879,7 +5859,6 @@ def daemon_http_get(self) -> None: | |||
|                        self.server.sites_unavailable, | ||||
|                        self.server.signing_priv_key_pem, | ||||
|                        self.server.rss_icon_at_top, | ||||
|                        self.server.icons_as_buttons, | ||||
|                        self.server.default_timeline, | ||||
|                        self.server.recent_posts_cache, | ||||
|                        self.server.max_recent_posts, | ||||
|  | @ -5939,7 +5918,6 @@ def daemon_http_get(self) -> None: | |||
|                           self.server.max_shares_on_profile, | ||||
|                           self.server.signing_priv_key_pem, | ||||
|                           self.server.rss_icon_at_top, | ||||
|                           self.server.icons_as_buttons, | ||||
|                           self.server.default_timeline, | ||||
|                           self.server.recent_posts_cache, | ||||
|                           self.server.max_recent_posts, | ||||
|  | @ -5997,7 +5975,6 @@ def daemon_http_get(self) -> None: | |||
|                            self.server.sites_unavailable, | ||||
|                            self.server.signing_priv_key_pem, | ||||
|                            self.server.rss_icon_at_top, | ||||
|                            self.server.icons_as_buttons, | ||||
|                            self.server.default_timeline, | ||||
|                            self.server.recent_posts_cache, | ||||
|                            self.server.max_recent_posts, | ||||
|  | @ -6056,7 +6033,6 @@ def daemon_http_get(self) -> None: | |||
|                            self.server.fitness, | ||||
|                            self.server.signing_priv_key_pem, | ||||
|                            self.server.rss_icon_at_top, | ||||
|                            self.server.icons_as_buttons, | ||||
|                            self.server.default_timeline, | ||||
|                            self.server.recent_posts_cache, | ||||
|                            self.server.max_recent_posts, | ||||
|  |  | |||
|  | @ -40,7 +40,6 @@ def show_shares_feed(self, authorized: bool, | |||
|                      bold_reading_nicknames: {}, | ||||
|                      signing_priv_key_pem: str, | ||||
|                      rss_icon_at_top: bool, | ||||
|                      icons_as_buttons: bool, | ||||
|                      default_timeline: str, | ||||
|                      recent_posts_cache: {}, | ||||
|                      max_recent_posts: int, | ||||
|  | @ -135,7 +134,6 @@ def show_shares_feed(self, authorized: bool, | |||
|                 msg = \ | ||||
|                     html_profile(signing_priv_key_pem, | ||||
|                                  rss_icon_at_top, | ||||
|                                  icons_as_buttons, | ||||
|                                  default_timeline, | ||||
|                                  recent_posts_cache, | ||||
|                                  max_recent_posts, | ||||
|  | @ -232,7 +230,6 @@ def show_following_feed(self, authorized: bool, | |||
|                         sites_unavailable: [], | ||||
|                         signing_priv_key_pem: str, | ||||
|                         rss_icon_at_top: bool, | ||||
|                         icons_as_buttons: bool, | ||||
|                         default_timeline: str, | ||||
|                         recent_posts_cache: {}, | ||||
|                         max_recent_posts: int, | ||||
|  | @ -330,7 +327,6 @@ def show_following_feed(self, authorized: bool, | |||
|                 msg = \ | ||||
|                     html_profile(signing_priv_key_pem, | ||||
|                                  rss_icon_at_top, | ||||
|                                  icons_as_buttons, | ||||
|                                  default_timeline, | ||||
|                                  recent_posts_cache, | ||||
|                                  max_recent_posts, | ||||
|  | @ -434,7 +430,6 @@ def show_moved_feed(self, authorized: bool, | |||
|                     sites_unavailable: [], | ||||
|                     signing_priv_key_pem: str, | ||||
|                     rss_icon_at_top: bool, | ||||
|                     icons_as_buttons: bool, | ||||
|                     default_timeline: str, | ||||
|                     recent_posts_cache: {}, | ||||
|                     max_recent_posts: int, | ||||
|  | @ -527,7 +522,6 @@ def show_moved_feed(self, authorized: bool, | |||
|                 msg = \ | ||||
|                     html_profile(signing_priv_key_pem, | ||||
|                                  rss_icon_at_top, | ||||
|                                  icons_as_buttons, | ||||
|                                  default_timeline, | ||||
|                                  recent_posts_cache, | ||||
|                                  max_recent_posts, | ||||
|  | @ -624,7 +618,6 @@ def show_inactive_feed(self, authorized: bool, | |||
|                        max_shares_on_profile: int, | ||||
|                        signing_priv_key_pem: str, | ||||
|                        rss_icon_at_top: bool, | ||||
|                        icons_as_buttons: bool, | ||||
|                        default_timeline: str, | ||||
|                        recent_posts_cache: {}, | ||||
|                        max_recent_posts: int, | ||||
|  | @ -717,7 +710,6 @@ def show_inactive_feed(self, authorized: bool, | |||
|                 msg = \ | ||||
|                     html_profile(signing_priv_key_pem, | ||||
|                                  rss_icon_at_top, | ||||
|                                  icons_as_buttons, | ||||
|                                  default_timeline, | ||||
|                                  recent_posts_cache, | ||||
|                                  max_recent_posts, | ||||
|  | @ -815,7 +807,6 @@ def show_followers_feed(self, authorized: bool, | |||
|                         sites_unavailable: [], | ||||
|                         signing_priv_key_pem: str, | ||||
|                         rss_icon_at_top: bool, | ||||
|                         icons_as_buttons: bool, | ||||
|                         default_timeline: str, | ||||
|                         recent_posts_cache: {}, | ||||
|                         max_recent_posts: int, | ||||
|  | @ -909,7 +900,6 @@ def show_followers_feed(self, authorized: bool, | |||
|                 msg = \ | ||||
|                     html_profile(signing_priv_key_pem, | ||||
|                                  rss_icon_at_top, | ||||
|                                  icons_as_buttons, | ||||
|                                  default_timeline, | ||||
|                                  recent_posts_cache, | ||||
|                                  max_recent_posts, | ||||
|  |  | |||
|  | @ -55,7 +55,6 @@ def show_person_profile(self, authorized: bool, | |||
|                         fitness: {}, | ||||
|                         signing_priv_key_pem: str, | ||||
|                         rss_icon_at_top: bool, | ||||
|                         icons_as_buttons: bool, | ||||
|                         default_timeline: str, | ||||
|                         recent_posts_cache: {}, | ||||
|                         max_recent_posts: int, | ||||
|  | @ -121,7 +120,6 @@ def show_person_profile(self, authorized: bool, | |||
|         msg = \ | ||||
|             html_profile(signing_priv_key_pem, | ||||
|                          rss_icon_at_top, | ||||
|                          icons_as_buttons, | ||||
|                          default_timeline, | ||||
|                          recent_posts_cache, | ||||
|                          max_recent_posts, | ||||
|  | @ -216,7 +214,6 @@ def show_roles(self, calling_domain: str, referer_domain: str, | |||
|                cached_webfingers: {}, | ||||
|                yt_replace_domain: str, | ||||
|                twitter_replacement_domain: str, | ||||
|                icons_as_buttons: bool, | ||||
|                access_keys: {}, | ||||
|                key_shortcuts: {}, city: str, | ||||
|                signing_priv_key_pem: str, | ||||
|  | @ -291,7 +288,6 @@ def show_roles(self, calling_domain: str, referer_domain: str, | |||
|                 msg = \ | ||||
|                     html_profile(signing_priv_key_pem, | ||||
|                                  rss_icon_at_top, | ||||
|                                  icons_as_buttons, | ||||
|                                  default_timeline, | ||||
|                                  recent_posts_cache, | ||||
|                                  max_recent_posts, | ||||
|  | @ -373,7 +369,6 @@ def show_skills(self, calling_domain: str, referer_domain: str, | |||
|                 yt_replace_domain: str, | ||||
|                 twitter_replacement_domain: str, | ||||
|                 show_published_date_only: bool, | ||||
|                 icons_as_buttons: bool, | ||||
|                 allow_local_network_access: bool, | ||||
|                 access_keys: {}, | ||||
|                 key_shortcuts: {}, | ||||
|  | @ -448,7 +443,6 @@ def show_skills(self, calling_domain: str, referer_domain: str, | |||
|                             msg = \ | ||||
|                                 html_profile(signing_priv_key_pem, | ||||
|                                              rss_icon_at_top, | ||||
|                                              icons_as_buttons, | ||||
|                                              default_timeline, | ||||
|                                              recent_posts_cache, | ||||
|                                              max_recent_posts, | ||||
|  |  | |||
|  | @ -66,7 +66,6 @@ def show_media_timeline(self, authorized: bool, | |||
|                         show_published_date_only: bool, | ||||
|                         newswire: {}, | ||||
|                         show_publish_as_icon: bool, | ||||
|                         icons_as_buttons: bool, | ||||
|                         rss_icon_at_top: bool, | ||||
|                         publish_button_at_top: bool, | ||||
|                         theme_name: str, | ||||
|  | @ -183,7 +182,6 @@ def show_media_timeline(self, authorized: bool, | |||
|                                      positive_voting, | ||||
|                                      show_publish_as_icon, | ||||
|                                      full_width_tl_button_header, | ||||
|                                      icons_as_buttons, | ||||
|                                      rss_icon_at_top, | ||||
|                                      publish_button_at_top, | ||||
|                                      authorized, | ||||
|  | @ -286,7 +284,6 @@ def show_blogs_timeline(self, authorized: bool, | |||
|                         show_published_date_only: bool, | ||||
|                         newswire: {}, | ||||
|                         show_publish_as_icon: bool, | ||||
|                         icons_as_buttons: bool, | ||||
|                         rss_icon_at_top: bool, | ||||
|                         publish_button_at_top: bool, | ||||
|                         theme_name: str, | ||||
|  | @ -398,7 +395,6 @@ def show_blogs_timeline(self, authorized: bool, | |||
|                                      positive_voting, | ||||
|                                      show_publish_as_icon, | ||||
|                                      full_width_tl_button_header, | ||||
|                                      icons_as_buttons, | ||||
|                                      rss_icon_at_top, | ||||
|                                      publish_button_at_top, | ||||
|                                      authorized, | ||||
|  | @ -499,7 +495,6 @@ def show_news_timeline(self, authorized: bool, | |||
|                        show_published_date_only: bool, | ||||
|                        newswire: {}, | ||||
|                        show_publish_as_icon: bool, | ||||
|                        icons_as_buttons: bool, | ||||
|                        rss_icon_at_top: bool, | ||||
|                        publish_button_at_top: bool, | ||||
|                        theme_name: str, | ||||
|  | @ -617,7 +612,6 @@ def show_news_timeline(self, authorized: bool, | |||
|                                     positive_voting, | ||||
|                                     show_publish_as_icon, | ||||
|                                     full_width_tl_button_header, | ||||
|                                     icons_as_buttons, | ||||
|                                     rss_icon_at_top, | ||||
|                                     publish_button_at_top, | ||||
|                                     authorized, | ||||
|  | @ -718,7 +712,6 @@ def show_features_timeline(self, authorized: bool, | |||
|                            yt_replace_domain: str, | ||||
|                            newswire: {}, | ||||
|                            show_publish_as_icon: bool, | ||||
|                            icons_as_buttons: bool, | ||||
|                            rss_icon_at_top: bool, | ||||
|                            publish_button_at_top: bool, | ||||
|                            theme_name: str, | ||||
|  | @ -830,7 +823,6 @@ def show_features_timeline(self, authorized: bool, | |||
|                                         positive_voting, | ||||
|                                         show_publish_as_icon, | ||||
|                                         full_width_tl_button_header, | ||||
|                                         icons_as_buttons, | ||||
|                                         rss_icon_at_top, | ||||
|                                         publish_button_at_top, | ||||
|                                         authorized, | ||||
|  | @ -927,7 +919,6 @@ def show_shares_timeline(self, authorized: bool, | |||
|                          newswire: {}, | ||||
|                          positive_voting: bool, | ||||
|                          show_publish_as_icon: bool, | ||||
|                          icons_as_buttons: bool, | ||||
|                          rss_icon_at_top: bool, | ||||
|                          publish_button_at_top: bool, | ||||
|                          theme_name: str, | ||||
|  | @ -1004,7 +995,6 @@ def show_shares_timeline(self, authorized: bool, | |||
|                                 positive_voting, | ||||
|                                 show_publish_as_icon, | ||||
|                                 full_width_tl_button_header, | ||||
|                                 icons_as_buttons, | ||||
|                                 rss_icon_at_top, | ||||
|                                 publish_button_at_top, | ||||
|                                 authorized, theme_name, | ||||
|  | @ -1077,7 +1067,6 @@ def show_wanted_timeline(self, authorized: bool, | |||
|                          newswire: {}, | ||||
|                          positive_voting: bool, | ||||
|                          show_publish_as_icon: bool, | ||||
|                          icons_as_buttons: bool, | ||||
|                          rss_icon_at_top: bool, | ||||
|                          publish_button_at_top: bool, | ||||
|                          theme_name: str, | ||||
|  | @ -1153,7 +1142,6 @@ def show_wanted_timeline(self, authorized: bool, | |||
|                                 positive_voting, | ||||
|                                 show_publish_as_icon, | ||||
|                                 full_width_tl_button_header, | ||||
|                                 icons_as_buttons, | ||||
|                                 rss_icon_at_top, | ||||
|                                 publish_button_at_top, | ||||
|                                 authorized, theme_name, | ||||
|  | @ -1230,7 +1218,6 @@ def show_bookmarks_timeline(self, authorized: bool, | |||
|                             yt_replace_domain: str, | ||||
|                             newswire: {}, | ||||
|                             show_publish_as_icon: bool, | ||||
|                             icons_as_buttons: bool, | ||||
|                             rss_icon_at_top: bool, | ||||
|                             publish_button_at_top: bool, | ||||
|                             theme_name: str, | ||||
|  | @ -1337,7 +1324,6 @@ def show_bookmarks_timeline(self, authorized: bool, | |||
|                                        positive_voting, | ||||
|                                        show_publish_as_icon, | ||||
|                                        full_width_tl_button_header, | ||||
|                                        icons_as_buttons, | ||||
|                                        rss_icon_at_top, | ||||
|                                        publish_button_at_top, | ||||
|                                        authorized, | ||||
|  | @ -1438,7 +1424,6 @@ def show_outbox_timeline(self, authorized: bool, | |||
|                          show_published_date_only: bool, | ||||
|                          newswire: {}, | ||||
|                          show_publish_as_icon: bool, | ||||
|                          icons_as_buttons: bool, | ||||
|                          rss_icon_at_top: bool, | ||||
|                          publish_button_at_top: bool, | ||||
|                          theme_name: str, | ||||
|  | @ -1557,7 +1542,6 @@ def show_outbox_timeline(self, authorized: bool, | |||
|                             positive_voting, | ||||
|                             show_publish_as_icon, | ||||
|                             full_width_tl_button_header, | ||||
|                             icons_as_buttons, | ||||
|                             rss_icon_at_top, | ||||
|                             publish_button_at_top, | ||||
|                             authorized, | ||||
|  | @ -1648,7 +1632,6 @@ def show_mod_timeline(self, authorized: bool, | |||
|                       yt_replace_domain: str, | ||||
|                       newswire: {}, | ||||
|                       show_publish_as_icon: bool, | ||||
|                       icons_as_buttons: bool, | ||||
|                       rss_icon_at_top: bool, | ||||
|                       publish_button_at_top: bool, | ||||
|                       theme_name: str, | ||||
|  | @ -1752,7 +1735,6 @@ def show_mod_timeline(self, authorized: bool, | |||
|                                         positive_voting, | ||||
|                                         show_publish_as_icon, | ||||
|                                         full_width_tl_button_header, | ||||
|                                         icons_as_buttons, | ||||
|                                         rss_icon_at_top, | ||||
|                                         publish_button_at_top, | ||||
|                                         authorized, moderation_action_str, | ||||
|  | @ -1852,7 +1834,6 @@ def show_dms(self, authorized: bool, | |||
|              yt_replace_domain: str, | ||||
|              newswire: {}, | ||||
|              show_publish_as_icon: bool, | ||||
|              icons_as_buttons: bool, | ||||
|              rss_icon_at_top: bool, | ||||
|              publish_button_at_top: bool, | ||||
|              theme_name: str, | ||||
|  | @ -1963,7 +1944,6 @@ def show_dms(self, authorized: bool, | |||
|                                        positive_voting, | ||||
|                                        show_publish_as_icon, | ||||
|                                        full_width_tl_button_header, | ||||
|                                        icons_as_buttons, | ||||
|                                        rss_icon_at_top, | ||||
|                                        publish_button_at_top, | ||||
|                                        authorized, theme_name, | ||||
|  | @ -2064,7 +2044,6 @@ def show_replies(self, authorized: bool, | |||
|                  yt_replace_domain: str, | ||||
|                  newswire: {}, | ||||
|                  show_publish_as_icon: bool, | ||||
|                  icons_as_buttons: bool, | ||||
|                  rss_icon_at_top: bool, | ||||
|                  publish_button_at_top: bool, | ||||
|                  theme_name: str, | ||||
|  | @ -2175,7 +2154,6 @@ def show_replies(self, authorized: bool, | |||
|                                        positive_voting, | ||||
|                                        show_publish_as_icon, | ||||
|                                        full_width_tl_button_header, | ||||
|                                        icons_as_buttons, | ||||
|                                        rss_icon_at_top, | ||||
|                                        publish_button_at_top, | ||||
|                                        authorized, theme_name, | ||||
|  | @ -2277,7 +2255,6 @@ def show_inbox(self, authorized: bool, | |||
|                show_published_date_only: bool, | ||||
|                newswire: {}, | ||||
|                show_publish_as_icon: bool, | ||||
|                icons_as_buttons: bool, | ||||
|                rss_icon_at_top: bool, | ||||
|                publish_button_at_top: bool, | ||||
|                theme_name: str, | ||||
|  | @ -2399,7 +2376,6 @@ def show_inbox(self, authorized: bool, | |||
|                                    positive_voting, | ||||
|                                    show_publish_as_icon, | ||||
|                                    full_width_tl_button_header, | ||||
|                                    icons_as_buttons, | ||||
|                                    rss_icon_at_top, | ||||
|                                    publish_button_at_top, | ||||
|                                    authorized, | ||||
|  |  | |||
|  | @ -1444,7 +1444,6 @@ def _profile_post_remove_custom_font(base_dir: str, nickname: str, domain: str, | |||
|                 get_config_param(base_dir, 'showPublishAsIcon') | ||||
|             self.server.full_width_tl_button_header = \ | ||||
|                 get_config_param(base_dir, 'fullWidthTimelineButtonHeader') | ||||
|             self.server.icons_as_buttons = False | ||||
|             self.server.rss_icon_at_top = \ | ||||
|                 get_config_param(base_dir, 'rssIconAtTop') | ||||
|             self.server.publish_button_at_top = \ | ||||
|  | @ -2616,7 +2615,6 @@ def _profile_post_theme_change(base_dir: str, nickname: str, | |||
|                     get_config_param(base_dir, 'showPublishAsIcon') | ||||
|                 self.server.full_width_tl_button_header = \ | ||||
|                     get_config_param(base_dir, 'fullWidthTlButtonHeader') | ||||
|                 self.server.icons_as_buttons = False | ||||
|                 self.server.rss_icon_at_top = \ | ||||
|                     get_config_param(base_dir, 'rssIconAtTop') | ||||
|                 self.server.publish_button_at_top = \ | ||||
|  |  | |||
|  | @ -525,11 +525,6 @@ def _command_options() -> None: | |||
|                         help="Whether to show the timeline " + | ||||
|                         "button header containing inbox and outbox " + | ||||
|                         "as the full width of the screen") | ||||
|     parser.add_argument("--icons_as_buttons", | ||||
|                         dest='icons_as_buttons', | ||||
|                         type=str2bool, nargs='?', | ||||
|                         const=True, default=False, | ||||
|                         help="Show header icons as buttons") | ||||
|     parser.add_argument("--log_login_failures", | ||||
|                         dest='log_login_failures', | ||||
|                         type=str2bool, nargs='?', | ||||
|  | @ -4159,8 +4154,6 @@ def _command_options() -> None: | |||
|     if show_publish_as_icon is not None: | ||||
|         argb.show_publish_as_icon = bool(show_publish_as_icon) | ||||
| 
 | ||||
|     icons_as_buttons = False | ||||
| 
 | ||||
|     rss_icon_at_top = \ | ||||
|         get_config_param(base_dir, 'rssIconAtTop') | ||||
|     if rss_icon_at_top is not None: | ||||
|  | @ -4353,7 +4346,6 @@ if __name__ == "__main__": | |||
|                argb2.max_feed_item_size_kb, | ||||
|                argb2.publish_button_at_top, | ||||
|                argb2.rss_icon_at_top, | ||||
|                argb2.icons_as_buttons, | ||||
|                argb2.full_width_tl_button_header, | ||||
|                argb2.show_publish_as_icon, | ||||
|                argb2.max_followers, | ||||
|  |  | |||
							
								
								
									
										8
									
								
								tests.py
								
								
								
								
							
							
						
						
									
										8
									
								
								tests.py
								
								
								
								
							|  | @ -938,7 +938,7 @@ def create_server_alice(path: str, domain: str, port: int, | |||
|                send_threads_timeout_mins, | ||||
|                dormant_months, max_newswire_posts, | ||||
|                allow_local_network_access, | ||||
|                2048, False, True, False, False, True, max_followers, | ||||
|                2048, False, True, False, True, max_followers, | ||||
|                0, 100, 1024, 5, False, | ||||
|                0, False, 1, False, False, False, | ||||
|                5, True, True, 'en', __version__, | ||||
|  | @ -1139,7 +1139,7 @@ def create_server_bob(path: str, domain: str, port: int, | |||
|                send_threads_timeout_mins, | ||||
|                dormant_months, max_newswire_posts, | ||||
|                allow_local_network_access, | ||||
|                2048, False, True, False, False, True, max_followers, | ||||
|                2048, False, True, False, True, max_followers, | ||||
|                0, 100, 1024, 5, False, 0, | ||||
|                False, 1, False, False, False, | ||||
|                5, True, True, 'en', __version__, | ||||
|  | @ -1245,7 +1245,7 @@ def create_server_eve(path: str, domain: str, port: int, federation_list: [], | |||
|                dormant_months, | ||||
|                max_newswire_posts, | ||||
|                allow_local_network_access, | ||||
|                2048, False, True, False, False, True, | ||||
|                2048, False, True, False, True, | ||||
|                max_followers, | ||||
|                0, 100, 1024, 5, False, 0, | ||||
|                False, 1, False, False, False, | ||||
|  | @ -1361,7 +1361,7 @@ def create_server_group(path: str, domain: str, port: int, | |||
|                send_threads_timeout_mins, | ||||
|                dormant_months, max_newswire_posts, | ||||
|                allow_local_network_access, | ||||
|                2048, False, True, False, False, True, max_followers, | ||||
|                2048, False, True, False, True, max_followers, | ||||
|                0, 100, 1024, 5, False, | ||||
|                0, False, 1, False, False, False, | ||||
|                5, True, True, 'en', __version__, | ||||
|  |  | |||
							
								
								
									
										20
									
								
								theme.py
								
								
								
								
							
							
						
						
									
										20
									
								
								theme.py
								
								
								
								
							|  | @ -205,20 +205,6 @@ def _set_newswire_publish_as_icon(base_dir: str, use_icon: bool) -> bool: | |||
|     return save_json(config_json, config_filename) | ||||
| 
 | ||||
| 
 | ||||
| def _set_icons_as_buttons(base_dir: str, use_buttons: bool) -> bool: | ||||
|     """Whether to show icons in the header (inbox, outbox, etc) | ||||
|     as buttons | ||||
|     """ | ||||
|     config_filename = base_dir + '/config.json' | ||||
|     if not os.path.isfile(config_filename): | ||||
|         return False | ||||
|     config_json = load_json(config_filename) | ||||
|     if not config_json: | ||||
|         return False | ||||
|     config_json['iconsAsButtons'] = use_buttons | ||||
|     return save_json(config_json, config_filename) | ||||
| 
 | ||||
| 
 | ||||
| def _set_rss_icon_at_top(base_dir: str, at_top: bool) -> bool: | ||||
|     """Whether to show RSS icon at the top of the timeline | ||||
|     """ | ||||
|  | @ -383,12 +369,6 @@ def _set_theme_from_dict(base_dir: str, name: str, | |||
|                     else: | ||||
|                         _set_full_width_timeline_button_header(base_dir, False) | ||||
|                     continue | ||||
|                 if param_name == 'icons-as-buttons': | ||||
|                     if param_value.lower() == 'true': | ||||
|                         _set_icons_as_buttons(base_dir, True) | ||||
|                     else: | ||||
|                         _set_icons_as_buttons(base_dir, False) | ||||
|                     continue | ||||
|                 if param_name == 'rss-icon-at-top': | ||||
|                     if param_value.lower() == 'true': | ||||
|                         _set_rss_icon_at_top(base_dir, True) | ||||
|  |  | |||
|  | @ -378,7 +378,6 @@ def html_links_mobile(base_dir: str, | |||
|                       http_prefix: str, translate, | ||||
|                       timeline_path: str, authorized: bool, | ||||
|                       rss_icon_at_top: bool, | ||||
|                       icons_as_buttons: bool, | ||||
|                       default_timeline: str, | ||||
|                       theme: str, access_keys: {}, | ||||
|                       shared_items_federated_domains: [], | ||||
|  | @ -420,8 +419,7 @@ def html_links_mobile(base_dir: str, | |||
|     html_str += '<div class="col-left-mobile">\n' | ||||
|     html_str += '<center>' + \ | ||||
|         header_buttons_front_screen(translate, nickname, | ||||
|                                     'links', authorized, | ||||
|                                     icons_as_buttons) + '</center>' | ||||
|                                     'links', authorized) + '</center>' | ||||
|     html_str += \ | ||||
|         get_left_column_content(base_dir, nickname, domain_full, | ||||
|                                 http_prefix, translate, | ||||
|  |  | |||
|  | @ -496,7 +496,6 @@ def html_newswire_mobile(base_dir: str, nickname: str, | |||
|                          show_publish_as_icon: bool, | ||||
|                          authorized: bool, | ||||
|                          rss_icon_at_top: bool, | ||||
|                          icons_as_buttons: bool, | ||||
|                          default_timeline: str, | ||||
|                          theme: str, | ||||
|                          access_keys: {}, | ||||
|  | @ -546,8 +545,7 @@ def html_newswire_mobile(base_dir: str, nickname: str, | |||
| 
 | ||||
|     html_str += '<center>' + \ | ||||
|         header_buttons_front_screen(translate, nickname, | ||||
|                                     'newswire', authorized, | ||||
|                                     icons_as_buttons) + '</center>' | ||||
|                                     'newswire', authorized) + '</center>' | ||||
|     html_str += \ | ||||
|         get_right_column_content(base_dir, nickname, domain_full, | ||||
|                                  translate, | ||||
|  |  | |||
|  | @ -115,7 +115,6 @@ def _html_front_screen_posts(recent_posts_cache: {}, max_recent_posts: int, | |||
| 
 | ||||
| def html_front_screen(signing_priv_key_pem: str, | ||||
|                       rss_icon_at_top: bool, | ||||
|                       icons_as_buttons: bool, | ||||
|                       default_timeline: str, | ||||
|                       recent_posts_cache: {}, max_recent_posts: int, | ||||
|                       translate: {}, project_version: str, | ||||
|  | @ -155,8 +154,7 @@ def html_front_screen(signing_priv_key_pem: str, | |||
|         domain_full = domain + ':' + str(port) | ||||
| 
 | ||||
|     login_button = header_buttons_front_screen(translate, nickname, | ||||
|                                                'features', authorized, | ||||
|                                                icons_as_buttons) | ||||
|                                                'features', authorized) | ||||
| 
 | ||||
|     # If this is the news account then show a different banner | ||||
|     banner_file, _ = \ | ||||
|  |  | |||
|  | @ -46,7 +46,6 @@ def header_buttons_timeline(default_timeline: str, | |||
|                             calendar_path: str, | ||||
|                             calendar_image: str, | ||||
|                             follow_approvals: str, | ||||
|                             icons_as_buttons: bool, | ||||
|                             access_keys: {}, | ||||
|                             is_text_browser: str, | ||||
|                             show_announces: bool) -> str: | ||||
|  | @ -205,50 +204,27 @@ def header_buttons_timeline(default_timeline: str, | |||
|         twodays = datetime.now() + timedelta(2) | ||||
|         if day_events_check(base_dir, nickname, domain, now): | ||||
|             # happening today button | ||||
|             if not icons_as_buttons: | ||||
|             happening_str += \ | ||||
|                 '<a href="' + users_path + '/calendar?year=' + \ | ||||
|                 str(now.year) + '?month=' + str(now.month) + \ | ||||
|                 '?day=' + str(now.day) + '" tabindex="2">' + \ | ||||
|                 '<button class="buttonevent">' + \ | ||||
|                 translate['Happening Today'] + '</button></a>' | ||||
|             else: | ||||
|                 happening_str += \ | ||||
|                     '<a href="' + users_path + '/calendar?year=' + \ | ||||
|                     str(now.year) + '?month=' + str(now.month) + \ | ||||
|                     '?day=' + str(now.day) + '" tabindex="2">' + \ | ||||
|                     '<button class="button">' + \ | ||||
|                     translate['Happening Today'] + '</button></a>' | ||||
| 
 | ||||
|         elif day_events_check(base_dir, nickname, domain, tomorrow): | ||||
|             # happening tomorrow button | ||||
|             if not icons_as_buttons: | ||||
|             happening_str += \ | ||||
|                 '<a href="' + users_path + '/calendar?year=' + \ | ||||
|                 str(tomorrow.year) + '?month=' + str(tomorrow.month) + \ | ||||
|                 '?day=' + str(tomorrow.day) + '" tabindex="2">' + \ | ||||
|                 '<button class="buttonevent">' + \ | ||||
|                 translate['Happening Tomorrow'] + '</button></a>' | ||||
|             else: | ||||
|                 happening_str += \ | ||||
|                     '<a href="' + users_path + '/calendar?year=' + \ | ||||
|                     str(tomorrow.year) + '?month=' + str(tomorrow.month) + \ | ||||
|                     '?day=' + str(tomorrow.day) + '" tabindex="2">' + \ | ||||
|                     '<button class="button">' + \ | ||||
|                     translate['Happening Tomorrow'] + '</button></a>' | ||||
|         elif day_events_check(base_dir, nickname, domain, twodays): | ||||
|             if not icons_as_buttons: | ||||
|             happening_str += \ | ||||
|                 '<a href="' + users_path + \ | ||||
|                 '/calendar" tabindex="2">' + \ | ||||
|                 '<button class="buttonevent">' + \ | ||||
|                 translate['Happening This Week'] + '</button></a>' | ||||
|             else: | ||||
|                 happening_str += \ | ||||
|                     '<a href="' + users_path + \ | ||||
|                     '/calendar" tabindex="2">' + \ | ||||
|                     '<button class="button">' + \ | ||||
|                     translate['Happening This Week'] + '</button></a>' | ||||
| 
 | ||||
|     if not is_text_browser: | ||||
|         if not features_header: | ||||
|  | @ -290,7 +266,6 @@ def header_buttons_timeline(default_timeline: 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 += \ | ||||
|             '<a class="imageAnchorMobile" href="' + \ | ||||
|             users_path + '/linksmobile">' + \ | ||||
|  | @ -298,17 +273,8 @@ def header_buttons_timeline(default_timeline: str, | |||
|             '/links.png" title="' + translate['Edit Links'] + \ | ||||
|             '" alt="| ' + translate['Edit Links'] + \ | ||||
|             '" class="timelineicon"/></a>' | ||||
|         else: | ||||
|             # NOTE: deliberately no \n at end of line | ||||
|             tl_str += \ | ||||
|                 '<a href="' + \ | ||||
|                 users_path + '/linksmobile' + \ | ||||
|                 '" tabindex="2"><button class="buttonMobile">' + \ | ||||
|                 '<span>' + translate['Links'] + \ | ||||
|                 '</span></button></a>' | ||||
| 
 | ||||
|         # the newswire button to show left column links | ||||
|         if not icons_as_buttons: | ||||
|         tl_str += \ | ||||
|             '<a class="imageAnchorMobile" href="' + \ | ||||
|             users_path + '/newswiremobile">' + \ | ||||
|  | @ -316,19 +282,10 @@ def header_buttons_timeline(default_timeline: str, | |||
|             '/newswire.png" title="' + translate['News'] + \ | ||||
|             '" alt="| ' + translate['News'] + \ | ||||
|             '" class="timelineicon"/></a>' | ||||
|         else: | ||||
|             # NOTE: deliberately no \n at end of line | ||||
|             tl_str += \ | ||||
|                 '<a href="' + \ | ||||
|                 users_path + '/newswiremobile' + \ | ||||
|                 '" tabindex="2"><button class="buttonMobile">' + \ | ||||
|                 '<span>' + translate['Newswire'] + \ | ||||
|                 '</span></button></a>' | ||||
| 
 | ||||
|     if not is_text_browser: | ||||
|         if not features_header: | ||||
|             # 4. the show/hide button, for a simpler header appearance | ||||
|             if not icons_as_buttons: | ||||
|             tl_str += \ | ||||
|                 '      <a class="imageAnchor" href="' + \ | ||||
|                 users_path + '/minimal" tabindex="3">' + \ | ||||
|  | @ -337,12 +294,6 @@ def header_buttons_timeline(default_timeline: str, | |||
|                 translate['Show/Hide Buttons'] + \ | ||||
|                 '" alt="| ' + translate['Show/Hide Buttons'] + \ | ||||
|                 '" class="timelineicon"/></a>\n' | ||||
|             else: | ||||
|                 tl_str += \ | ||||
|                     '<a href="' + users_path + '/minimal' + \ | ||||
|                     '" tabindex="3"><button class="button">' + \ | ||||
|                     '<span>' + translate['Show/Hide Buttons'] + \ | ||||
|                     '</span></button></a>' | ||||
| 
 | ||||
|             # 5. the hide announces button | ||||
|             if show_announces: | ||||
|  | @ -352,7 +303,6 @@ def header_buttons_timeline(default_timeline: str, | |||
|                 hide_announces_icon = 'repeat_show.png' | ||||
|                 hide_announces_text = translate['Show Announces'] | ||||
| 
 | ||||
|             if not icons_as_buttons: | ||||
|             tl_str += \ | ||||
|                 '      <a class="imageAnchor" href="' + \ | ||||
|                 users_path + '/hideannounces" tabindex="3">' + \ | ||||
|  | @ -361,12 +311,6 @@ def header_buttons_timeline(default_timeline: str, | |||
|                 hide_announces_text + \ | ||||
|                 '" alt="| ' + translate['Hide Announces'] + \ | ||||
|                 '" class="timelineicon"/></a>\n' | ||||
|             else: | ||||
|                 tl_str += \ | ||||
|                     '<a href="' + users_path + '/hideannounces' + \ | ||||
|                     '" tabindex="3"><button class="button">' + \ | ||||
|                     '<span>' + hide_announces_text + \ | ||||
|                     '</span></button></a>' | ||||
| 
 | ||||
|         # 6. calendar button | ||||
|         if not features_header: | ||||
|  | @ -374,7 +318,6 @@ def header_buttons_timeline(default_timeline: str, | |||
|             if new_calendar_event: | ||||
|                 # indicate that the calendar icon is highlighted | ||||
|                 calendar_alt_text = '*' + calendar_alt_text + '*' | ||||
|             if not icons_as_buttons: | ||||
|             tl_str += \ | ||||
|                 '      <a class="imageAnchor" href="' + \ | ||||
|                 users_path + calendar_path + \ | ||||
|  | @ -384,13 +327,6 @@ def header_buttons_timeline(default_timeline: str, | |||
|                 calendar_image + '" title="' + translate['Calendar'] + \ | ||||
|                 '" alt="| ' + calendar_alt_text + \ | ||||
|                 '" class="timelineicon"/></a>\n' | ||||
|             else: | ||||
|                 tl_str += \ | ||||
|                     '<a href="' + users_path + calendar_path + \ | ||||
|                     '" tabindex="3"><button class="button" accesskey="' + \ | ||||
|                     access_keys['menuCalendar'] + '">' + \ | ||||
|                     '<span>' + translate['Calendar'] + \ | ||||
|                     '</span></button></a>' | ||||
| 
 | ||||
|     if features_header: | ||||
|         tl_str += \ | ||||
|  | @ -404,7 +340,6 @@ def header_buttons_timeline(default_timeline: str, | |||
|     # 7. search button | ||||
|     if not is_text_browser: | ||||
|         if not features_header: | ||||
|             if not icons_as_buttons: | ||||
|             # the search icon | ||||
|             tl_str += \ | ||||
|                 '<a class="imageAnchor" href="' + users_path + \ | ||||
|  | @ -415,15 +350,6 @@ def header_buttons_timeline(default_timeline: str, | |||
|                 translate['Search and follow'] + '" alt="| ' + \ | ||||
|                 translate['Search and follow'] + \ | ||||
|                 '" class="timelineicon"/></a>' | ||||
|             else: | ||||
|                 # the search button | ||||
|                 tl_str += \ | ||||
|                     '<a href="' + users_path + \ | ||||
|                     '/search" tabindex="3">' + \ | ||||
|                     '<button class="button" ' + \ | ||||
|                     'accesskey="' + access_keys['menuSearch'] + '>' + \ | ||||
|                     '<span>' + translate['Search'] + \ | ||||
|                     '</span></button></a>' | ||||
| 
 | ||||
|     # 8. new post | ||||
|     if not is_text_browser: | ||||
|  | @ -436,7 +362,6 @@ def header_buttons_timeline(default_timeline: str, | |||
|         print('TIMELINE TIMING ' + box_name + ' 5 = ' + str(time_diff)) | ||||
| 
 | ||||
|     # end of headericons div | ||||
|     if not icons_as_buttons: | ||||
|     tl_str += '</div>' | ||||
| 
 | ||||
|     # end of the button header with inbox, outbox, etc | ||||
|  |  | |||
|  | @ -49,7 +49,6 @@ def html_moderation(default_timeline: str, | |||
|                     newswire: {}, positive_voting: bool, | ||||
|                     show_publish_as_icon: bool, | ||||
|                     full_width_tl_button_header: bool, | ||||
|                     icons_as_buttons: bool, | ||||
|                     rss_icon_at_top: bool, | ||||
|                     publish_button_at_top: bool, | ||||
|                     authorized: bool, moderation_action_str: str, | ||||
|  | @ -89,7 +88,7 @@ def html_moderation(default_timeline: str, | |||
|                          newswire, False, False, artist, positive_voting, | ||||
|                          show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, moderation_action_str, theme, | ||||
|                          peertube_instances, allow_local_network_access, | ||||
|  |  | |||
|  | @ -1063,7 +1063,6 @@ def _get_profile_header_after_search(base_dir: str, | |||
| 
 | ||||
| def html_profile(signing_priv_key_pem: str, | ||||
|                  rss_icon_at_top: bool, | ||||
|                  icons_as_buttons: bool, | ||||
|                  default_timeline: str, | ||||
|                  recent_posts_cache: {}, max_recent_posts: int, | ||||
|                  translate: {}, project_version: str, | ||||
|  | @ -1110,7 +1109,6 @@ def html_profile(signing_priv_key_pem: str, | |||
|         min_images_for_accounts: list[str] = [] | ||||
|         return html_front_screen(signing_priv_key_pem, | ||||
|                                  rss_icon_at_top, | ||||
|                                  icons_as_buttons, | ||||
|                                  default_timeline, | ||||
|                                  recent_posts_cache, max_recent_posts, | ||||
|                                  translate, project_version, | ||||
|  |  | |||
|  | @ -113,14 +113,13 @@ def _get_help_for_timeline(base_dir: str, box_name: str) -> str: | |||
| 
 | ||||
| 
 | ||||
| def _html_timeline_new_post(manually_approve_followers: bool, | ||||
|                             box_name: str, icons_as_buttons: bool, | ||||
|                             box_name: str, | ||||
|                             users_path: str, translate: {}, | ||||
|                             access_keys: {}) -> str: | ||||
|     """Returns html for the new post button | ||||
|     """ | ||||
|     new_post_button_str = '' | ||||
|     if box_name == 'dm': | ||||
|         if not icons_as_buttons: | ||||
|         new_post_button_str += \ | ||||
|             '<a class="imageAnchor" href="' + users_path + \ | ||||
|             '/newdm?nodropdown" tabindex="3" accesskey="' + \ | ||||
|  | @ -130,15 +129,7 @@ def _html_timeline_new_post(manually_approve_followers: bool, | |||
|             translate['Create a new DM'] + \ | ||||
|             '" alt="| ' + translate['Create a new DM'] + \ | ||||
|             '" class="timelineicon"/></a>\n' | ||||
|         else: | ||||
|             new_post_button_str += \ | ||||
|                 '<a href="' + users_path + \ | ||||
|                 '/newdm?nodropdown" tabindex="3" accesskey="' + \ | ||||
|                 access_keys['menuNewPost'] + '">' + \ | ||||
|                 '<button class="button"><span>' + \ | ||||
|                 translate['Post'] + ' </span></button></a>' | ||||
|     elif box_name in ('tlblogs', 'tlnews', 'tlfeatures'): | ||||
|         if not icons_as_buttons: | ||||
|         new_post_button_str += \ | ||||
|             '<a class="imageAnchor" href="' + users_path + \ | ||||
|             '/newblog" tabindex="3" accesskey="' + \ | ||||
|  | @ -148,15 +139,7 @@ def _html_timeline_new_post(manually_approve_followers: bool, | |||
|             translate['Create a new post'] + '" alt="| ' + \ | ||||
|             translate['Create a new post'] + \ | ||||
|             '" class="timelineicon"/></a>\n' | ||||
|         else: | ||||
|             new_post_button_str += \ | ||||
|                 '<a href="' + users_path + \ | ||||
|                 '/newblog" tabindex="3" accesskey="' + \ | ||||
|                 access_keys['menuNewPost'] + '">' + \ | ||||
|                 '<button class="button"><span>' + \ | ||||
|                 translate['Post'] + '</span></button></a>' | ||||
|     elif box_name == 'tlshares': | ||||
|         if not icons_as_buttons: | ||||
|         new_post_button_str += \ | ||||
|             '<a class="imageAnchor" href="' + users_path + \ | ||||
|             '/newshare?nodropdown" tabindex="3" accesskey="' + \ | ||||
|  | @ -166,15 +149,7 @@ def _html_timeline_new_post(manually_approve_followers: bool, | |||
|             translate['Create a new shared item'] + '" alt="| ' + \ | ||||
|             translate['Create a new shared item'] + \ | ||||
|             '" class="timelineicon"/></a>\n' | ||||
|         else: | ||||
|             new_post_button_str += \ | ||||
|                 '<a href="' + users_path + \ | ||||
|                 '/newshare?nodropdown" tabindex="3" accesskey="' + \ | ||||
|                 access_keys['menuNewPost'] + '">' + \ | ||||
|                 '<button class="button"><span>' + \ | ||||
|                 translate['Post'] + '</span></button></a>' | ||||
|     elif box_name == 'tlwanted': | ||||
|         if not icons_as_buttons: | ||||
|         new_post_button_str += \ | ||||
|             '<a class="imageAnchor" href="' + users_path + \ | ||||
|             '/newwanted?nodropdown" tabindex="3" accesskey="' + \ | ||||
|  | @ -184,16 +159,8 @@ def _html_timeline_new_post(manually_approve_followers: bool, | |||
|             translate['Create a new wanted item'] + '" alt="| ' + \ | ||||
|             translate['Create a new wanted item'] + \ | ||||
|             '" class="timelineicon"/></a>\n' | ||||
|         else: | ||||
|             new_post_button_str += \ | ||||
|                 '<a href="' + users_path + \ | ||||
|                 '/newwanted?nodropdown" tabindex="3" accesskey="' + \ | ||||
|                 access_keys['menuNewPost'] + '">' + \ | ||||
|                 '<button class="button"><span>' + \ | ||||
|                 translate['Post'] + '</span></button></a>' | ||||
|     else: | ||||
|         if not manually_approve_followers: | ||||
|             if not icons_as_buttons: | ||||
|             new_post_button_str += \ | ||||
|                 '<a class="imageAnchor" href="' + users_path + \ | ||||
|                 '/newpost" tabindex="3">' + \ | ||||
|  | @ -203,12 +170,6 @@ def _html_timeline_new_post(manually_approve_followers: bool, | |||
|                 translate['Create a new post'] + \ | ||||
|                 '" class="timelineicon"/></a>\n' | ||||
|         else: | ||||
|                 new_post_button_str += \ | ||||
|                     '<a href="' + users_path + '/newpost" tabindex="3">' + \ | ||||
|                     '<button class="button"><span>' + \ | ||||
|                     translate['Post'] + '</span></button></a>' | ||||
|         else: | ||||
|             if not icons_as_buttons: | ||||
|             new_post_button_str += \ | ||||
|                 '<a class="imageAnchor" href="' + users_path + \ | ||||
|                 '/newfollowers" tabindex="3" accesskey="' + \ | ||||
|  | @ -218,13 +179,6 @@ def _html_timeline_new_post(manually_approve_followers: bool, | |||
|                 translate['Create a new post'] + \ | ||||
|                 '" alt="| ' + translate['Create a new post'] + \ | ||||
|                 '" class="timelineicon"/></a>\n' | ||||
|             else: | ||||
|                 new_post_button_str += \ | ||||
|                     '<a href="' + users_path + \ | ||||
|                     '/newfollowers" tabindex="3" accesskey="' + \ | ||||
|                     access_keys['menuNewPost'] + '">' + \ | ||||
|                     '<button class="button"><span>' + \ | ||||
|                     translate['Post'] + '</span></button></a>' | ||||
|     return new_post_button_str | ||||
| 
 | ||||
| 
 | ||||
|  | @ -502,7 +456,6 @@ def html_timeline(default_timeline: str, | |||
|                   positive_voting: bool, | ||||
|                   show_publish_as_icon: bool, | ||||
|                   full_width_tl_button_header: bool, | ||||
|                   icons_as_buttons: bool, | ||||
|                   rss_icon_at_top: bool, | ||||
|                   publish_button_at_top: bool, | ||||
|                   authorized: bool, | ||||
|  | @ -823,13 +776,12 @@ def html_timeline(default_timeline: str, | |||
|     header_icons_str = '' | ||||
|     # start of headericons div | ||||
|     if not news_header: | ||||
|         if not icons_as_buttons: | ||||
|         header_icons_str = '<div class="headericons">' | ||||
| 
 | ||||
|     # what screen to go to when a new post is created | ||||
|     new_post_button_str = \ | ||||
|         _html_timeline_new_post(manually_approve_followers, box_name, | ||||
|                                 icons_as_buttons, users_path, translate, | ||||
|                                 users_path, translate, | ||||
|                                 access_keys) | ||||
| 
 | ||||
|     # keyboard navigation | ||||
|  | @ -870,7 +822,7 @@ def html_timeline(default_timeline: str, | |||
|                                     domain, timeline_start_time, | ||||
|                                     new_calendar_event, calendar_path, | ||||
|                                     calendar_image, follow_approvals, | ||||
|                                     icons_as_buttons, access_keys, | ||||
|                                     access_keys, | ||||
|                                     is_text_browser, show_announces) | ||||
| 
 | ||||
|     # start the timeline | ||||
|  | @ -924,7 +876,7 @@ def html_timeline(default_timeline: str, | |||
|                                     domain, timeline_start_time, | ||||
|                                     new_calendar_event, calendar_path, | ||||
|                                     calendar_image, follow_approvals, | ||||
|                                     icons_as_buttons, access_keys, | ||||
|                                     access_keys, | ||||
|                                     is_text_browser, show_announces) | ||||
| 
 | ||||
|     tl_str += \ | ||||
|  | @ -1410,7 +1362,6 @@ def html_shares(default_timeline: str, | |||
|                 newswire: {}, positive_voting: bool, | ||||
|                 show_publish_as_icon: bool, | ||||
|                 full_width_tl_button_header: bool, | ||||
|                 icons_as_buttons: bool, | ||||
|                 rss_icon_at_top: bool, | ||||
|                 publish_button_at_top: bool, | ||||
|                 authorized: bool, theme: str, | ||||
|  | @ -1454,7 +1405,7 @@ def html_shares(default_timeline: str, | |||
|                          newswire, False, False, artist, | ||||
|                          positive_voting, show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, None, theme, peertube_instances, | ||||
|                          allow_local_network_access, text_mode_banner, | ||||
|  | @ -1484,7 +1435,6 @@ def html_wanted(default_timeline: str, | |||
|                 newswire: {}, positive_voting: bool, | ||||
|                 show_publish_as_icon: bool, | ||||
|                 full_width_tl_button_header: bool, | ||||
|                 icons_as_buttons: bool, | ||||
|                 rss_icon_at_top: bool, | ||||
|                 publish_button_at_top: bool, | ||||
|                 authorized: bool, theme: str, | ||||
|  | @ -1528,7 +1478,7 @@ def html_wanted(default_timeline: str, | |||
|                          newswire, False, False, artist, | ||||
|                          positive_voting, show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, None, theme, peertube_instances, | ||||
|                          allow_local_network_access, text_mode_banner, | ||||
|  | @ -1559,7 +1509,6 @@ def html_inbox(default_timeline: str, | |||
|                newswire: {}, positive_voting: bool, | ||||
|                show_publish_as_icon: bool, | ||||
|                full_width_tl_button_header: bool, | ||||
|                icons_as_buttons: bool, | ||||
|                rss_icon_at_top: bool, | ||||
|                publish_button_at_top: bool, | ||||
|                authorized: bool, theme: str, | ||||
|  | @ -1604,7 +1553,7 @@ def html_inbox(default_timeline: str, | |||
|                          newswire, False, False, artist, | ||||
|                          positive_voting, show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, None, theme, peertube_instances, | ||||
|                          allow_local_network_access, text_mode_banner, | ||||
|  | @ -1635,7 +1584,6 @@ def html_bookmarks(default_timeline: str, | |||
|                    newswire: {}, positive_voting: bool, | ||||
|                    show_publish_as_icon: bool, | ||||
|                    full_width_tl_button_header: bool, | ||||
|                    icons_as_buttons: bool, | ||||
|                    rss_icon_at_top: bool, | ||||
|                    publish_button_at_top: bool, | ||||
|                    authorized: bool, theme: str, | ||||
|  | @ -1679,7 +1627,7 @@ def html_bookmarks(default_timeline: str, | |||
|                          newswire, False, False, artist, | ||||
|                          positive_voting, show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, None, theme, peertube_instances, | ||||
|                          allow_local_network_access, text_mode_banner, | ||||
|  | @ -1709,7 +1657,6 @@ def html_inbox_dms(default_timeline: str, | |||
|                    newswire: {}, positive_voting: bool, | ||||
|                    show_publish_as_icon: bool, | ||||
|                    full_width_tl_button_header: bool, | ||||
|                    icons_as_buttons: bool, | ||||
|                    rss_icon_at_top: bool, | ||||
|                    publish_button_at_top: bool, | ||||
|                    authorized: bool, theme: str, | ||||
|  | @ -1749,7 +1696,7 @@ def html_inbox_dms(default_timeline: str, | |||
|                          newswire, False, False, artist, positive_voting, | ||||
|                          show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, None, theme, peertube_instances, | ||||
|                          allow_local_network_access, text_mode_banner, | ||||
|  | @ -1780,7 +1727,6 @@ def html_inbox_replies(default_timeline: str, | |||
|                        newswire: {}, positive_voting: bool, | ||||
|                        show_publish_as_icon: bool, | ||||
|                        full_width_tl_button_header: bool, | ||||
|                        icons_as_buttons: bool, | ||||
|                        rss_icon_at_top: bool, | ||||
|                        publish_button_at_top: bool, | ||||
|                        authorized: bool, theme: str, | ||||
|  | @ -1820,7 +1766,7 @@ def html_inbox_replies(default_timeline: str, | |||
|                          newswire, False, False, artist, | ||||
|                          positive_voting, show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, None, theme, peertube_instances, | ||||
|                          allow_local_network_access, text_mode_banner, | ||||
|  | @ -1849,7 +1795,6 @@ def html_inbox_media(default_timeline: str, | |||
|                      newswire: {}, positive_voting: bool, | ||||
|                      show_publish_as_icon: bool, | ||||
|                      full_width_tl_button_header: bool, | ||||
|                      icons_as_buttons: bool, | ||||
|                      rss_icon_at_top: bool, | ||||
|                      publish_button_at_top: bool, | ||||
|                      authorized: bool, theme: str, | ||||
|  | @ -1889,7 +1834,7 @@ def html_inbox_media(default_timeline: str, | |||
|                          newswire, False, False, artist, | ||||
|                          positive_voting, show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, None, theme, peertube_instances, | ||||
|                          allow_local_network_access, text_mode_banner, | ||||
|  | @ -1918,7 +1863,6 @@ def html_inbox_blogs(default_timeline: str, | |||
|                      newswire: {}, positive_voting: bool, | ||||
|                      show_publish_as_icon: bool, | ||||
|                      full_width_tl_button_header: bool, | ||||
|                      icons_as_buttons: bool, | ||||
|                      rss_icon_at_top: bool, | ||||
|                      publish_button_at_top: bool, | ||||
|                      authorized: bool, theme: str, | ||||
|  | @ -1958,7 +1902,7 @@ def html_inbox_blogs(default_timeline: str, | |||
|                          newswire, False, False, artist, | ||||
|                          positive_voting, show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, None, theme, peertube_instances, | ||||
|                          allow_local_network_access, text_mode_banner, | ||||
|  | @ -1987,7 +1931,6 @@ def html_inbox_features(default_timeline: str, | |||
|                         newswire: {}, positive_voting: bool, | ||||
|                         show_publish_as_icon: bool, | ||||
|                         full_width_tl_button_header: bool, | ||||
|                         icons_as_buttons: bool, | ||||
|                         rss_icon_at_top: bool, | ||||
|                         publish_button_at_top: bool, | ||||
|                         authorized: bool, | ||||
|  | @ -2026,7 +1969,7 @@ def html_inbox_features(default_timeline: str, | |||
|                          newswire, False, False, False, | ||||
|                          positive_voting, show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, None, theme, peertube_instances, | ||||
|                          allow_local_network_access, text_mode_banner, | ||||
|  | @ -2055,7 +1998,6 @@ def html_inbox_news(default_timeline: str, | |||
|                     newswire: {}, moderator: bool, editor: bool, artist: bool, | ||||
|                     positive_voting: bool, show_publish_as_icon: bool, | ||||
|                     full_width_tl_button_header: bool, | ||||
|                     icons_as_buttons: bool, | ||||
|                     rss_icon_at_top: bool, | ||||
|                     publish_button_at_top: bool, | ||||
|                     authorized: bool, theme: str, | ||||
|  | @ -2093,7 +2035,7 @@ def html_inbox_news(default_timeline: str, | |||
|                          newswire, moderator, editor, artist, | ||||
|                          positive_voting, show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, None, theme, peertube_instances, | ||||
|                          allow_local_network_access, text_mode_banner, | ||||
|  | @ -2122,7 +2064,6 @@ def html_outbox(default_timeline: str, | |||
|                 newswire: {}, positive_voting: bool, | ||||
|                 show_publish_as_icon: bool, | ||||
|                 full_width_tl_button_header: bool, | ||||
|                 icons_as_buttons: bool, | ||||
|                 rss_icon_at_top: bool, | ||||
|                 publish_button_at_top: bool, | ||||
|                 authorized: bool, theme: str, | ||||
|  | @ -2163,7 +2104,7 @@ def html_outbox(default_timeline: str, | |||
|                          newswire, False, False, artist, positive_voting, | ||||
|                          show_publish_as_icon, | ||||
|                          full_width_tl_button_header, | ||||
|                          icons_as_buttons, rss_icon_at_top, | ||||
|                          rss_icon_at_top, | ||||
|                          publish_button_at_top, | ||||
|                          authorized, None, theme, peertube_instances, | ||||
|                          allow_local_network_access, text_mode_banner, | ||||
|  |  | |||
|  | @ -213,21 +213,14 @@ def html_hashtag_blocked(base_dir: str, translate: {}) -> str: | |||
| 
 | ||||
| def header_buttons_front_screen(translate: {}, | ||||
|                                 nickname: str, box_name: str, | ||||
|                                 authorized: bool, | ||||
|                                 icons_as_buttons: bool) -> str: | ||||
|                                 authorized: bool) -> str: | ||||
|     """Returns the header buttons for the front page of a news instance | ||||
|     """ | ||||
|     header_str = '' | ||||
|     if nickname == 'news': | ||||
|         button_features = 'buttonMobile' | ||||
|         button_newswire = 'buttonMobile' | ||||
|         button_links = 'buttonMobile' | ||||
|         if box_name == 'features': | ||||
|             button_features = 'buttonselected' | ||||
|         elif box_name == 'newswire': | ||||
|             button_newswire = 'buttonselected' | ||||
|         elif box_name == 'links': | ||||
|             button_links = 'buttonselected' | ||||
| 
 | ||||
|         header_str += \ | ||||
|             '        <a href="/">' + \ | ||||
|  | @ -240,18 +233,6 @@ def header_buttons_front_screen(translate: {}, | |||
|                 '<button class="buttonMobile">' + \ | ||||
|                 '<span>' + translate['Login'] + \ | ||||
|                 '</span></button></a>' | ||||
|         if icons_as_buttons: | ||||
|             header_str += \ | ||||
|                 '        <a href="/users/news/newswiremobile">' + \ | ||||
|                 '<button class="' + button_newswire + '">' + \ | ||||
|                 '<span>' + translate['Newswire'] + \ | ||||
|                 '</span></button></a>' | ||||
|             header_str += \ | ||||
|                 '        <a href="/users/news/linksmobile">' + \ | ||||
|                 '<button class="' + button_links + '">' + \ | ||||
|                 '<span>' + translate['Links'] + \ | ||||
|                 '</span></button></a>' | ||||
|         else: | ||||
|         header_str += \ | ||||
|             '        <a href="' + \ | ||||
|             '/users/news/newswiremobile">' + \ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue