mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-28 09:11:27 +00:00
Reformat code
This commit is contained in:
parent
2536388308
commit
4d0535fa09
|
@ -454,7 +454,7 @@ statuses_render()
|
||||||
echo '[NSFW]'
|
echo '[NSFW]'
|
||||||
fi
|
fi
|
||||||
echo "$status" | jj -r content | delqse | html_to_txt_render
|
echo "$status" | jj -r content | delqse | html_to_txt_render
|
||||||
attachments=$(echo "$status" | jj -l media_attachments.#.remote_url | delq)
|
attachments=$(echo "$status" | jj -l 'media_attachments.#.remote_url' | delq)
|
||||||
menuattachments=
|
menuattachments=
|
||||||
if [ -n "$attachments" ]; then
|
if [ -n "$attachments" ]; then
|
||||||
echo "#EXTINF:-1, $uri" >> attachments.m3u8
|
echo "#EXTINF:-1, $uri" >> attachments.m3u8
|
||||||
|
@ -469,7 +469,10 @@ statuses_render()
|
||||||
while [ "$next" -eq 0 ]; do
|
while [ "$next" -eq 0 ]; do
|
||||||
per_status_menu=$(echo "Next$menuattachments"$s_f_menu"\nFavorite\nBookmark\nReply\nBack" | fzy)
|
per_status_menu=$(echo "Next$menuattachments"$s_f_menu"\nFavorite\nBookmark\nReply\nBack" | fzy)
|
||||||
case "$per_status_menu" in
|
case "$per_status_menu" in
|
||||||
"Next") next=1; clear ;;
|
"Next")
|
||||||
|
next=1
|
||||||
|
clear
|
||||||
|
;;
|
||||||
"Media")
|
"Media")
|
||||||
for one_media in $attachments; do
|
for one_media in $attachments; do
|
||||||
mpv "$one_media"
|
mpv "$one_media"
|
||||||
|
@ -480,7 +483,10 @@ statuses_render()
|
||||||
"Favorite") favorite_api_status "$id_status" ;;
|
"Favorite") favorite_api_status "$id_status" ;;
|
||||||
"Bookmark") bookmark_api_status "$id_status" ;;
|
"Bookmark") bookmark_api_status "$id_status" ;;
|
||||||
"Reply") reply_mode "$id_status" ;;
|
"Reply") reply_mode "$id_status" ;;
|
||||||
"Back") next=1; force_stop=1 ;;
|
"Back")
|
||||||
|
next=1
|
||||||
|
force_stop=1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
if [ "$force_stop" -eq 1 ]; then break; fi
|
if [ "$force_stop" -eq 1 ]; then break; fi
|
||||||
|
@ -856,12 +862,12 @@ switchinstance='Switch instance'
|
||||||
Exit='Exit'
|
Exit='Exit'
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if [ -n "$auth" ]; then
|
if [ -n "$auth" ]; then
|
||||||
main_menu=$(echo "$menu_write_status\n$menu_timeline\n$notif\n$my_account\n$switchinstance\n$Exit" | fzy)
|
main_menu=$(echo "$menu_write_status\n$menu_timeline\n$notif\n$my_account\n$switchinstance\n$Exit" | fzy)
|
||||||
else
|
else
|
||||||
main_menu=$(echo "$authmake\n$menu_timeline\n$switchinstance\n$Exit" | fzy)
|
main_menu=$(echo "$authmake\n$menu_timeline\n$switchinstance\n$Exit" | fzy)
|
||||||
fi
|
fi
|
||||||
case $main_menu in
|
case $main_menu in
|
||||||
"$menu_write_status") write_status_menu ;;
|
"$menu_write_status") write_status_menu ;;
|
||||||
"$menu_timeline")
|
"$menu_timeline")
|
||||||
timeline=$(echo 'home\nhome/local\nfavourites\nbookmarks\ndirect\nlocal\npublic' | fzy)
|
timeline=$(echo 'home\nhome/local\nfavourites\nbookmarks\ndirect\nlocal\npublic' | fzy)
|
||||||
|
@ -886,7 +892,8 @@ case $main_menu in
|
||||||
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) ;;
|
||||||
|
|
||||||
|
@ -906,8 +913,9 @@ case $main_menu in
|
||||||
fi
|
fi
|
||||||
clear
|
clear
|
||||||
make_login
|
make_login
|
||||||
fi ;;
|
fi
|
||||||
|
;;
|
||||||
"$authmake") auth_api_get_token ;;
|
"$authmake") auth_api_get_token ;;
|
||||||
"$Exit") exit 0 ;;
|
"$Exit") exit 0 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue