Some cosmetic fixes

This commit is contained in:
localhost_frssoft 2022-05-11 00:12:49 +03:00
parent 6d22fea77c
commit d203791dfa

View file

@ -164,7 +164,7 @@ backup_restore_menu()
backup_api_create()
{
post_request "$instance_point/pleroma/backups"
post_request "$instance_point/pleroma/backups"
}
backup_api_list()
@ -599,14 +599,15 @@ thread_menu()
timeline_api()
{
timelines_params="limit=$max_statuses&max_id=$1&min_id=$2"
case "$timeline" in
"home") default_curl_opt "$instance_point/timelines/home?limit=$max_statuses&max_id=$1&min_id=$2" ;;
"home/local") default_curl_opt "$instance_point/timelines/home?local=true&limit=$max_statuses&max_id=$1&min_id=$2" ;;
"favourites") default_curl_opt "$instance_point/favourites?limit=$max_statuses&max_id=$1&min_id=$2" ;;
"bookmarks") default_curl_opt "$instance_point/bookmarks?limit=$max_statuses&max_id=$1&min_id=$2" ;;
"direct") default_curl_opt "$instance_point/timelines/direct?limit=$max_statuses&max_id=$1&min_id=$2" ;;
"public") default_curl_opt "$instance_point/timelines/public?limit=$max_statuses&max_id=$1&min_id=$2" ;;
"local") default_curl_opt "$instance_point/timelines/public?local=true&limit=$max_statuses&max_id=$1&min_id=$2" ;;
"home") default_curl_opt "$instance_point/timelines/home?$timelines_params" ;;
"home/local") default_curl_opt "$instance_point/timelines/home?local=true&$timelines_params" ;;
"favourites") default_curl_opt "$instance_point/favourites?$timelines_params" ;;
"bookmarks") default_curl_opt "$instance_point/bookmarks?$timelines_params" ;;
"direct") default_curl_opt "$instance_point/timelines/direct?$timelines_params" ;;
"public") default_curl_opt "$instance_point/timelines/public?$timelines_params" ;;
"local") default_curl_opt "$instance_point/timelines/public?local=true&$timelines_params" ;;
esac
}
@ -810,20 +811,21 @@ write_status_menu()
"Edit") $EDITOR tmp_status.md ;;
"Send") status_data_send=$(write_api_status tmp_status.md) ;;
"Add attach")
echo 'Input path to attach (ex. @image.png or @/full/path/to/attach.png)'
read mediaattach
;;
echo 'Input path to attach (ex. @image.png or @/full/path/to/attach.png)'
read mediaattach
;;
"Add recipient")
echo 'Input addr (ex. nick,nick_etc@domain.domain)'
read mentions_reply ;;
echo 'Input addr (ex. nick,nick_etc@domain.domain)'
read mentions_reply
;;
"Change type") content_type=$(echo 'text/plain\ntext/markdown\ntext/html' | fzy) ;;
"Visiblity")
status_visibility=$(echo 'public\nunlisted\nlocal\nprivate\ndirect\nlist' | fzy)
;;
status_visibility=$(echo 'public\nunlisted\nlocal\nprivate\ndirect\nlist' | fzy)
;;
"Reset")
echo > tmp_status.md
mentions_reply=
;;
echo > tmp_status.md
mentions_reply=
;;
"Back") sub_menu_lvl=$(expr $level - 1) ;;
"Main menu") sub_menu_lvl=0 ;;
esac
@ -853,9 +855,9 @@ notif_menu()
case "$menu_choice" in
"Main menu") sub_menu_lvl=0 ;;
"Read")
notif_api_read "$(echo "$json" | jj 0.id)"
json=$(notif_api_get_all)
;;
notif_api_read "$(echo "$json" | jj 0.id)"
json=$(notif_api_get_all)
;;
"Refresh") json=$(notif_api_get_all) ;;
"$clrnotif") notif_api_remove_all && json=$(notif_api_get_all) ;;
esac
@ -927,13 +929,13 @@ while true; do
empty=0
case $(echo 'Recently used\nChoice from list\nManual input' | fzy) in
"Recently used")
if [ -s $instance_hist ]; then
touch $instance_hist && instance=$(cat $instance_hist | fzy)
else
echo 'No recently used instances...'
empty=1
fi
;;
if [ -s $instance_hist ]; then
touch $instance_hist && instance=$(cat $instance_hist | fzy)
else
echo 'No recently used instances...'
empty=1
fi
;;
"Choice from list") instance=$(jj -l -i config.json public_list_instances | sed 's/"//g' | fzy) ;;