mirror of https://gitlab.com/bashrc2/epicyon
Don't include known addresses list in text mode browsers which don't support it
parent
3e6b4c8251
commit
9ad73fd6bb
|
|
@ -4514,7 +4514,8 @@ def daemon_http_get(self) -> None:
|
|||
self.server.auto_cw_cache,
|
||||
self.server.searchable_by_default,
|
||||
self.server.mitm_servers,
|
||||
self.server.instance_software):
|
||||
self.server.instance_software,
|
||||
ua_str):
|
||||
self.server.getreq_busy = False
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -413,7 +413,8 @@ def show_new_post(self, edit_post_params: {},
|
|||
auto_cw_cache: {},
|
||||
searchable_by_default_dict: [],
|
||||
mitm_servers: [],
|
||||
instance_software: {}) -> bool:
|
||||
instance_software: {},
|
||||
ua_str: str) -> bool:
|
||||
"""Shows the new post screen
|
||||
"""
|
||||
searchable_by_default = 'yourself'
|
||||
|
|
@ -541,7 +542,8 @@ def show_new_post(self, edit_post_params: {},
|
|||
auto_cw_cache,
|
||||
searchable_by_default,
|
||||
mitm_servers,
|
||||
instance_software)
|
||||
instance_software,
|
||||
ua_str)
|
||||
if not msg:
|
||||
print('Error replying to ' + in_reply_to_url)
|
||||
http_404(self, 104)
|
||||
|
|
|
|||
|
|
@ -922,7 +922,8 @@ def _person_options_dm(self, options_confirm_params: str,
|
|||
cookie: str, calling_domain: str,
|
||||
access_keys: {},
|
||||
mitm_servers: [],
|
||||
instance_software: {}) -> bool:
|
||||
instance_software: {},
|
||||
ua_str: str) -> bool:
|
||||
"""Person options screen, DM button
|
||||
See html_person_options
|
||||
"""
|
||||
|
|
@ -1005,7 +1006,8 @@ def _person_options_dm(self, options_confirm_params: str,
|
|||
auto_cw_cache,
|
||||
searchable_by_default,
|
||||
mitm_servers,
|
||||
instance_software)
|
||||
instance_software,
|
||||
ua_str)
|
||||
if msg:
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
|
@ -1163,7 +1165,8 @@ def _person_options_report(self, options_confirm_params: str,
|
|||
cookie: str, calling_domain: str,
|
||||
access_keys: {},
|
||||
mitm_servers: [],
|
||||
instance_software: {}) -> bool:
|
||||
instance_software: {},
|
||||
ua_str: str) -> bool:
|
||||
"""Person options screen, report button
|
||||
See html_person_options
|
||||
"""
|
||||
|
|
@ -1246,7 +1249,8 @@ def _person_options_report(self, options_confirm_params: str,
|
|||
auto_cw_cache,
|
||||
searchable_by_default,
|
||||
mitm_servers,
|
||||
instance_software)
|
||||
instance_software,
|
||||
ua_str)
|
||||
if msg:
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
|
@ -1641,7 +1645,8 @@ def person_options2(self, path: str,
|
|||
cookie, calling_domain,
|
||||
access_keys,
|
||||
mitm_servers,
|
||||
instance_software):
|
||||
instance_software,
|
||||
ua_str):
|
||||
return
|
||||
|
||||
if _person_options_info(self, options_confirm_params,
|
||||
|
|
@ -1711,7 +1716,8 @@ def person_options2(self, path: str,
|
|||
cookie, calling_domain,
|
||||
access_keys,
|
||||
mitm_servers,
|
||||
instance_software):
|
||||
instance_software,
|
||||
ua_str):
|
||||
return
|
||||
|
||||
# redirect back from person options screen
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ from maps import get_map_preferences_coords
|
|||
from maps import get_location_from_post
|
||||
from cache import get_person_from_cache
|
||||
from person import get_person_notes
|
||||
from textmode import text_mode_browser
|
||||
|
||||
|
||||
def _html_new_post_drop_down(scope_icon: str, scope_description: str,
|
||||
|
|
@ -278,7 +279,8 @@ def html_new_post(edit_post_params: {},
|
|||
auto_cw_cache: {},
|
||||
searchable_by_default: str,
|
||||
mitm_servers: [],
|
||||
instance_software: {}) -> str:
|
||||
instance_software: {},
|
||||
ua_str: str) -> str:
|
||||
"""New post screen
|
||||
"""
|
||||
# get the json if this is an edited post
|
||||
|
|
@ -1116,14 +1118,20 @@ def html_new_post(edit_post_params: {},
|
|||
'https://www.openstreetmap.org/#map=') + '</p>\n'
|
||||
|
||||
# event address
|
||||
date_and_location += \
|
||||
'<label class="labels">' + translate['Address'] + ':' + \
|
||||
'</label><br>\n'
|
||||
date_and_location += \
|
||||
'<input type="text" name="locationAddress" ' + \
|
||||
'list="addressbook">\n'
|
||||
date_and_location += \
|
||||
html_address_book_list(base_dir, nickname, domain)
|
||||
# The list of known addresses doesn't work in text mode browsers
|
||||
if not text_mode_browser(ua_str):
|
||||
date_and_location += \
|
||||
'<label class="labels">' + translate['Address'] + ':' + \
|
||||
'</label><br>\n'
|
||||
date_and_location += \
|
||||
'<input type="text" name="locationAddress" ' + \
|
||||
'list="addressbook">\n'
|
||||
date_and_location += \
|
||||
html_address_book_list(base_dir, nickname, domain)
|
||||
else:
|
||||
date_and_location += \
|
||||
edit_text_field(translate['Address'], 'locationAddress',
|
||||
'', '') + '</p>\n'
|
||||
|
||||
date_and_location += end_edit_section()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue