mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-21 19:41:30 +00:00
Added bookmark function and timeline:bookmarks
This commit is contained in:
parent
6609a6d169
commit
e4daec319b
|
@ -467,7 +467,7 @@ statuses_render()
|
|||
next=0
|
||||
force_stop=0
|
||||
while [ "$next" -eq 0 ]; do
|
||||
per_status_menu=$(echo "Next$menuattachments"$s_f_menu"\nFavorite\nReply\nBack" | fzy)
|
||||
per_status_menu=$(echo "Next$menuattachments"$s_f_menu"\nFavorite\nBookmark\nReply\nBack" | fzy)
|
||||
case "$per_status_menu" in
|
||||
"Next") next=1; clear ;;
|
||||
"Media")
|
||||
|
@ -478,6 +478,7 @@ statuses_render()
|
|||
"Share and favorite") share_and_favorite_mode "$id_status" ;;
|
||||
"Share") share_api_status "$id_status" ;;
|
||||
"Favorite") favorite_api_status "$id_status" ;;
|
||||
"Bookmark") bookmark_api_status "$id_status" ;;
|
||||
"Reply") reply_mode "$id_status" ;;
|
||||
"Back") next=1; force_stop=1 ;;
|
||||
esac
|
||||
|
@ -565,6 +566,7 @@ timeline_api()
|
|||
"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" ;;
|
||||
|
@ -695,6 +697,13 @@ favourite_mode()
|
|||
done
|
||||
}
|
||||
|
||||
bookmark_api_status()
|
||||
{
|
||||
mkdir -p -m 711 bookmarks/"$instance"
|
||||
post_request "$instance_point/statuses/$1/bookmark" | jj -p -o "bookmarks/$instance/$1"
|
||||
chmod 600 "bookmarks/$instance/$1"
|
||||
}
|
||||
|
||||
write_api_status()
|
||||
{
|
||||
if [ -n "$mediaattach" ]; then
|
||||
|
@ -854,7 +863,7 @@ fi
|
|||
case $main_menu in
|
||||
"$menu_write_status") write_status_menu ;;
|
||||
"$menu_timeline")
|
||||
timeline=$(echo 'home\nhome/local\nfavourites\ndirect\nlocal\npublic' | fzy)
|
||||
timeline=$(echo 'home\nhome/local\nfavourites\nbookmarks\ndirect\nlocal\npublic' | fzy)
|
||||
timeline_menu
|
||||
;;
|
||||
"$notif") notif_menu ;;
|
||||
|
|
Loading…
Reference in a new issue