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