mirror of https://gitlab.com/bashrc2/epicyon
Show mutual icon on Liked By screen
parent
0f74d862f0
commit
256e7a1d85
|
|
@ -4562,7 +4562,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.bold_reading,
|
self.server.bold_reading,
|
||||||
self.server.mitm_servers,
|
self.server.mitm_servers,
|
||||||
self.server.instance_software):
|
self.server.instance_software,
|
||||||
|
ua_str):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -4854,7 +4855,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.bold_reading,
|
self.server.bold_reading,
|
||||||
self.server.mitm_servers,
|
self.server.mitm_servers,
|
||||||
self.server.instance_software):
|
self.server.instance_software,
|
||||||
|
ua_str):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -4900,7 +4902,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.onion_domain,
|
self.server.onion_domain,
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.mitm_servers,
|
self.server.mitm_servers,
|
||||||
self.server.instance_software):
|
self.server.instance_software,
|
||||||
|
ua_str):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,8 @@ def _show_post_from_file(self, post_filename: str, liked_by: str,
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
mitm_servers: [],
|
mitm_servers: [],
|
||||||
instance_software: {}) -> bool:
|
instance_software: {},
|
||||||
|
ua_str: str) -> bool:
|
||||||
"""Shows an individual post from its filename
|
"""Shows an individual post from its filename
|
||||||
"""
|
"""
|
||||||
if not os.path.isfile(post_filename):
|
if not os.path.isfile(post_filename):
|
||||||
|
|
@ -166,7 +167,8 @@ def _show_post_from_file(self, post_filename: str, liked_by: str,
|
||||||
buy_sites,
|
buy_sites,
|
||||||
auto_cw_cache,
|
auto_cw_cache,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software)
|
instance_software,
|
||||||
|
ua_str)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
set_html_post_headers(self, msglen,
|
set_html_post_headers(self, msglen,
|
||||||
|
|
@ -247,7 +249,8 @@ def show_individual_post(self, ssml_getreq: bool, authorized: bool,
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
mitm_servers: [],
|
mitm_servers: [],
|
||||||
instance_software: {}) -> bool:
|
instance_software: {},
|
||||||
|
ua_str: str) -> bool:
|
||||||
"""Shows an individual post
|
"""Shows an individual post
|
||||||
"""
|
"""
|
||||||
liked_by = None
|
liked_by = None
|
||||||
|
|
@ -354,7 +357,8 @@ def show_individual_post(self, ssml_getreq: bool, authorized: bool,
|
||||||
onion_domain,
|
onion_domain,
|
||||||
i2p_domain,
|
i2p_domain,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software)
|
instance_software,
|
||||||
|
ua_str)
|
||||||
|
|
||||||
fitness_performance(getreq_start_time, fitness,
|
fitness_performance(getreq_start_time, fitness,
|
||||||
'_GET', 'show_individual_post',
|
'_GET', 'show_individual_post',
|
||||||
|
|
@ -584,7 +588,8 @@ def show_individual_at_post(self, ssml_getreq: bool, authorized: bool,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
bold_reading_nicknames: {},
|
bold_reading_nicknames: {},
|
||||||
mitm_servers: [],
|
mitm_servers: [],
|
||||||
instance_software: {}) -> bool:
|
instance_software: {},
|
||||||
|
ua_str: str) -> bool:
|
||||||
"""get an individual post from the path /@nickname/statusnumber
|
"""get an individual post from the path /@nickname/statusnumber
|
||||||
"""
|
"""
|
||||||
if '/@' not in path:
|
if '/@' not in path:
|
||||||
|
|
@ -697,7 +702,8 @@ def show_individual_at_post(self, ssml_getreq: bool, authorized: bool,
|
||||||
onion_domain,
|
onion_domain,
|
||||||
i2p_domain,
|
i2p_domain,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software)
|
instance_software,
|
||||||
|
ua_str)
|
||||||
|
|
||||||
fitness_performance(getreq_start_time, fitness,
|
fitness_performance(getreq_start_time, fitness,
|
||||||
'_GET', 'show_individual_at_post',
|
'_GET', 'show_individual_at_post',
|
||||||
|
|
@ -1218,7 +1224,8 @@ def show_notify_post(self, authorized: bool,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
bold_reading_nicknames: {},
|
bold_reading_nicknames: {},
|
||||||
mitm_servers: [],
|
mitm_servers: [],
|
||||||
instance_software: {}) -> bool:
|
instance_software: {},
|
||||||
|
ua_str: str) -> bool:
|
||||||
"""Shows an individual post from an account which you are following
|
"""Shows an individual post from an account which you are following
|
||||||
and where you have the notify checkbox set on person options
|
and where you have the notify checkbox set on person options
|
||||||
"""
|
"""
|
||||||
|
|
@ -1278,7 +1285,8 @@ def show_notify_post(self, authorized: bool,
|
||||||
onion_domain,
|
onion_domain,
|
||||||
i2p_domain,
|
i2p_domain,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software)
|
instance_software,
|
||||||
|
ua_str)
|
||||||
fitness_performance(getreq_start_time, fitness,
|
fitness_performance(getreq_start_time, fitness,
|
||||||
'_GET', 'show_notify_post',
|
'_GET', 'show_notify_post',
|
||||||
debug)
|
debug)
|
||||||
|
|
|
||||||
|
|
@ -3442,7 +3442,8 @@ def html_individual_post(recent_posts_cache: {}, max_recent_posts: int,
|
||||||
min_images_for_accounts: [],
|
min_images_for_accounts: [],
|
||||||
buy_sites: {},
|
buy_sites: {},
|
||||||
auto_cw_cache: {}, mitm_servers: [],
|
auto_cw_cache: {}, mitm_servers: [],
|
||||||
instance_software: {}) -> str:
|
instance_software: {},
|
||||||
|
ua_str: str) -> str:
|
||||||
"""Show an individual post as html
|
"""Show an individual post as html
|
||||||
"""
|
"""
|
||||||
original_post_json = post_json_object
|
original_post_json = post_json_object
|
||||||
|
|
@ -3472,8 +3473,18 @@ def html_individual_post(recent_posts_cache: {}, max_recent_posts: int,
|
||||||
# Liked by handle
|
# Liked by handle
|
||||||
domain_full = get_full_domain(domain, port)
|
domain_full = get_full_domain(domain, port)
|
||||||
actor = '/users/' + nickname
|
actor = '/users/' + nickname
|
||||||
|
|
||||||
|
# get the list of mutuals for the current account
|
||||||
|
mutuals_list = get_mutuals_of_person(base_dir, nickname, domain)
|
||||||
|
mutual_prefix = ''
|
||||||
|
if by_str_handle in mutuals_list:
|
||||||
|
if not text_mode_browser(ua_str):
|
||||||
|
mutual_prefix = '⇆ '
|
||||||
|
else:
|
||||||
|
mutual_prefix = translate['Mutual'] + ' '
|
||||||
|
|
||||||
post_str += \
|
post_str += \
|
||||||
'<p>' + by_text + ' '
|
'<p>' + mutual_prefix + by_text + ' '
|
||||||
post_str += \
|
post_str += \
|
||||||
'<form method="POST" accept-charset="UTF-8" action="' + \
|
'<form method="POST" accept-charset="UTF-8" action="' + \
|
||||||
actor + '/searchhandle">\n' + \
|
actor + '/searchhandle">\n' + \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue