mirror of https://gitlab.com/bashrc2/epicyon
merge-requests/30/head
commit
20d0fab413
16264
emoji/default_emoji.json
16264
emoji/default_emoji.json
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -62,6 +62,10 @@ body, html {
|
||||||
image-rendering: var(--rendering);
|
image-rendering: var(--rendering);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
background-color: var(--main-bg-color);
|
||||||
|
}
|
||||||
|
|
||||||
a, u {
|
a, u {
|
||||||
color: var(--main-fg-color);
|
color: var(--main-fg-color);
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,10 @@ body, html {
|
||||||
image-rendering: var(--rendering);
|
image-rendering: var(--rendering);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
background-color: var(--options-bg-color);
|
||||||
|
}
|
||||||
|
|
||||||
a, u {
|
a, u {
|
||||||
color: var(--options-fg-color);
|
color: var(--options-fg-color);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1758,7 +1758,7 @@ h3 {
|
||||||
color: var(--time-color);
|
color: var(--time-color);
|
||||||
margin: var(--time-vertical-align) 20px;
|
margin: var(--time-vertical-align) 20px;
|
||||||
}
|
}
|
||||||
input[type=text], input[type=password], select, textarea {
|
input[type=text], input[type=search], input[type=password], select, textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
|
@ -2557,7 +2557,7 @@ h3 {
|
||||||
color: var(--time-color);
|
color: var(--time-color);
|
||||||
margin: var(--time-vertical-align-mobile) 20px;
|
margin: var(--time-vertical-align-mobile) 20px;
|
||||||
}
|
}
|
||||||
input[type=text], input[type=password], select, textarea {
|
input[type=text], input[type=search], input[type=password], select, textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
|
@ -3354,7 +3354,7 @@ h3 {
|
||||||
color: var(--time-color);
|
color: var(--time-color);
|
||||||
margin: var(--time-vertical-align-tiny) 20px;
|
margin: var(--time-vertical-align-tiny) 20px;
|
||||||
}
|
}
|
||||||
input[type=text], input[type=password], select, textarea {
|
input[type=text], input[type=search], input[type=password], select, textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -99,7 +99,7 @@ def html_conversation_view(post_id: str,
|
||||||
minimize_all_images, None)
|
minimize_all_images, None)
|
||||||
if post_str:
|
if post_str:
|
||||||
# check for "HTTP/1.1 303 See Other Server"
|
# check for "HTTP/1.1 303 See Other Server"
|
||||||
if not post_str.startswith('HTTP/'):
|
if 'X-AP-Instance-ID' not in post_str:
|
||||||
conv_str += text_mode_separator + separator_str + post_str
|
conv_str += text_mode_separator + separator_str + post_str
|
||||||
|
|
||||||
conv_str += text_mode_separator + html_footer()
|
conv_str += text_mode_separator + html_footer()
|
||||||
|
|
|
@ -24,6 +24,7 @@ from utils import get_currencies
|
||||||
from utils import get_category_types
|
from utils import get_category_types
|
||||||
from utils import get_account_timezone
|
from utils import get_account_timezone
|
||||||
from utils import get_supported_languages
|
from utils import get_supported_languages
|
||||||
|
from webapp_utils import html_following_data_list
|
||||||
from webapp_utils import html_common_emoji
|
from webapp_utils import html_common_emoji
|
||||||
from webapp_utils import begin_edit_section
|
from webapp_utils import begin_edit_section
|
||||||
from webapp_utils import end_edit_section
|
from webapp_utils import end_edit_section
|
||||||
|
@ -39,48 +40,6 @@ from maps import get_map_preferences_coords
|
||||||
from maps import get_location_from_tags
|
from maps import get_location_from_tags
|
||||||
|
|
||||||
|
|
||||||
def _html_following_data_list(base_dir: str, nickname: str,
|
|
||||||
domain: str, domain_full: str) -> str:
|
|
||||||
"""Returns a datalist of handles being followed
|
|
||||||
"""
|
|
||||||
list_str = '<datalist id="followingHandles">\n'
|
|
||||||
following_filename = \
|
|
||||||
acct_dir(base_dir, nickname, domain) + '/following.txt'
|
|
||||||
msg = None
|
|
||||||
if os.path.isfile(following_filename):
|
|
||||||
with open(following_filename, 'r',
|
|
||||||
encoding='utf-8') as following_file:
|
|
||||||
msg = following_file.read()
|
|
||||||
# add your own handle, so that you can send DMs
|
|
||||||
# to yourself as reminders
|
|
||||||
msg += nickname + '@' + domain_full + '\n'
|
|
||||||
if msg:
|
|
||||||
# include petnames
|
|
||||||
petnames_filename = \
|
|
||||||
acct_dir(base_dir, nickname, domain) + '/petnames.txt'
|
|
||||||
if os.path.isfile(petnames_filename):
|
|
||||||
following_list = []
|
|
||||||
with open(petnames_filename, 'r',
|
|
||||||
encoding='utf-8') as petnames_file:
|
|
||||||
pet_str = petnames_file.read()
|
|
||||||
# extract each petname and append it
|
|
||||||
petnames_list = pet_str.split('\n')
|
|
||||||
for pet in petnames_list:
|
|
||||||
following_list.append(pet.split(' ')[0])
|
|
||||||
# add the following.txt entries
|
|
||||||
following_list += msg.split('\n')
|
|
||||||
else:
|
|
||||||
# no petnames list exists - just use following.txt
|
|
||||||
following_list = msg.split('\n')
|
|
||||||
following_list.sort()
|
|
||||||
if following_list:
|
|
||||||
for following_address in following_list:
|
|
||||||
if following_address:
|
|
||||||
list_str += '<option>@' + following_address + '</option>\n'
|
|
||||||
list_str += '</datalist>\n'
|
|
||||||
return list_str
|
|
||||||
|
|
||||||
|
|
||||||
def _html_new_post_drop_down(scope_icon: str, scope_description: str,
|
def _html_new_post_drop_down(scope_icon: str, scope_description: str,
|
||||||
reply_str: str,
|
reply_str: str,
|
||||||
translate: {},
|
translate: {},
|
||||||
|
@ -1066,7 +1025,8 @@ def html_new_post(edit_post_params: {},
|
||||||
' <input type="text" name="mentions" ' + \
|
' <input type="text" name="mentions" ' + \
|
||||||
'list="followingHandles" value="' + mentions_str + '" selected>\n'
|
'list="followingHandles" value="' + mentions_str + '" selected>\n'
|
||||||
new_post_form += \
|
new_post_form += \
|
||||||
_html_following_data_list(base_dir, nickname, domain, domain_full)
|
html_following_data_list(base_dir, nickname, domain, domain_full,
|
||||||
|
'following', True)
|
||||||
new_post_form += ''
|
new_post_form += ''
|
||||||
selected_str = ''
|
selected_str = ''
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ from filters import is_filtered
|
||||||
from follow import is_follower_of_person
|
from follow import is_follower_of_person
|
||||||
from follow import get_follower_domains
|
from follow import get_follower_domains
|
||||||
from webapp_frontscreen import html_front_screen
|
from webapp_frontscreen import html_front_screen
|
||||||
|
from webapp_utils import html_following_data_list
|
||||||
from webapp_utils import edit_number_field
|
from webapp_utils import edit_number_field
|
||||||
from webapp_utils import html_keyboard_navigation
|
from webapp_utils import html_keyboard_navigation
|
||||||
from webapp_utils import html_hide_from_screen_reader
|
from webapp_utils import html_hide_from_screen_reader
|
||||||
|
@ -1098,6 +1099,28 @@ def html_profile(signing_priv_key_pem: str,
|
||||||
profile_str += ' </center>'
|
profile_str += ' </center>'
|
||||||
profile_str += '</div>'
|
profile_str += '</div>'
|
||||||
|
|
||||||
|
# search for following or followers
|
||||||
|
if authorized:
|
||||||
|
if selected in ('following', 'followers'):
|
||||||
|
follow_search_str = '<div class="container">\n'
|
||||||
|
follow_search_str += \
|
||||||
|
'<form method="POST" action="' + users_path + \
|
||||||
|
'/searchhandle?page=1">\n'
|
||||||
|
follow_search_str += \
|
||||||
|
' <input type="hidden" ' + \
|
||||||
|
'name="actor" value="' + actor + '">\n'
|
||||||
|
follow_search_str += \
|
||||||
|
' <input type="search" name="searchtext" ' + \
|
||||||
|
'list="' + selected + 'Handles" placeholder="🔎">\n'
|
||||||
|
follow_search_str += \
|
||||||
|
html_following_data_list(base_dir, nickname, domain,
|
||||||
|
domain_full, selected, False)
|
||||||
|
follow_search_str += \
|
||||||
|
' <button type="submit" class="button" ' + \
|
||||||
|
'name="submitSearch">' + translate['Search'] + '</button>\n'
|
||||||
|
follow_search_str += '</form>\n</div>\n'
|
||||||
|
profile_str += follow_search_str
|
||||||
|
|
||||||
# start of #timeline
|
# start of #timeline
|
||||||
profile_str += '<div id="timeline">\n'
|
profile_str += '<div id="timeline">\n'
|
||||||
|
|
||||||
|
|
|
@ -1967,3 +1967,52 @@ def get_default_path(media_instance: bool, blogs_instance: bool,
|
||||||
else:
|
else:
|
||||||
path = '/users/' + nickname + '/inbox'
|
path = '/users/' + nickname + '/inbox'
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
||||||
|
def html_following_data_list(base_dir: str, nickname: str,
|
||||||
|
domain: str, domain_full: str,
|
||||||
|
following_type: str,
|
||||||
|
use_petnames: bool) -> str:
|
||||||
|
"""Returns a datalist of handles being followed
|
||||||
|
followingHandles, followersHandles
|
||||||
|
"""
|
||||||
|
list_str = '<datalist id="' + following_type + 'Handles">\n'
|
||||||
|
following_filename = \
|
||||||
|
acct_dir(base_dir, nickname, domain) + '/' + following_type + '.txt'
|
||||||
|
msg = None
|
||||||
|
if os.path.isfile(following_filename):
|
||||||
|
with open(following_filename, 'r',
|
||||||
|
encoding='utf-8') as following_file:
|
||||||
|
msg = following_file.read()
|
||||||
|
# add your own handle, so that you can send DMs
|
||||||
|
# to yourself as reminders
|
||||||
|
msg += nickname + '@' + domain_full + '\n'
|
||||||
|
if msg:
|
||||||
|
# include petnames
|
||||||
|
petnames_filename = \
|
||||||
|
acct_dir(base_dir, nickname, domain) + '/petnames.txt'
|
||||||
|
if use_petnames and os.path.isfile(petnames_filename):
|
||||||
|
following_list = []
|
||||||
|
with open(petnames_filename, 'r',
|
||||||
|
encoding='utf-8') as petnames_file:
|
||||||
|
pet_str = petnames_file.read()
|
||||||
|
# extract each petname and append it
|
||||||
|
petnames_list = pet_str.split('\n')
|
||||||
|
for pet in petnames_list:
|
||||||
|
following_list.append(pet.split(' ')[0])
|
||||||
|
# add the following.txt entries
|
||||||
|
following_list += msg.split('\n')
|
||||||
|
else:
|
||||||
|
# no petnames list exists - just use following.txt
|
||||||
|
following_list = msg.split('\n')
|
||||||
|
following_list.sort()
|
||||||
|
if following_list:
|
||||||
|
for following_address in following_list:
|
||||||
|
if not following_address:
|
||||||
|
continue
|
||||||
|
if '@' not in following_address and \
|
||||||
|
'://' not in following_address:
|
||||||
|
continue
|
||||||
|
list_str += '<option>@' + following_address + '</option>\n'
|
||||||
|
list_str += '</datalist>\n'
|
||||||
|
return list_str
|
||||||
|
|
Loading…
Reference in New Issue