mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-22 17:41:29 +00:00
Improvments in reply/write menu
This commit is contained in:
parent
b2da8acfeb
commit
792ce471f0
|
@ -365,6 +365,7 @@ timeline_menu()
|
||||||
echo 'Input id'
|
echo 'Input id'
|
||||||
read status_id
|
read status_id
|
||||||
write_status_menu $status_id
|
write_status_menu $status_id
|
||||||
|
indexator=$(expr $max_statuses - 1)
|
||||||
;;
|
;;
|
||||||
"Share")
|
"Share")
|
||||||
echo 'Input id (s - stop)'
|
echo 'Input id (s - stop)'
|
||||||
|
@ -434,8 +435,14 @@ write_status_menu()
|
||||||
replyto=$1
|
replyto=$1
|
||||||
mediaattach=
|
mediaattach=
|
||||||
http_code=
|
http_code=
|
||||||
|
if [ -n "$sub_menu_lvl" ]; then
|
||||||
|
sub_menu_lvl=2
|
||||||
|
level=2
|
||||||
|
else
|
||||||
sub_menu_lvl=1
|
sub_menu_lvl=1
|
||||||
while [ $sub_menu_lvl -eq 1 ]; do
|
level=1
|
||||||
|
fi
|
||||||
|
while [ $sub_menu_lvl -eq $level ]; do
|
||||||
clear
|
clear
|
||||||
echo 'Status:'
|
echo 'Status:'
|
||||||
cat tmp_status.md
|
cat tmp_status.md
|
||||||
|
@ -452,7 +459,7 @@ write_status_menu()
|
||||||
if [ -n "$http_code" ]; then
|
if [ -n "$http_code" ]; then
|
||||||
echo "Send state: $http_code"
|
echo "Send state: $http_code"
|
||||||
fi
|
fi
|
||||||
wrirepostmenu=$(echo "Write\nSend\nAdd attach\nChange type\nVisiblity\nMain menu" | fzy)
|
wrirepostmenu=$(echo "Write\nSend\nAdd attach\nChange type\nVisiblity\nBack\nMain menu" | fzy)
|
||||||
case $wrirepostmenu in
|
case $wrirepostmenu in
|
||||||
"Write") echo > tmp_status.md; $EDITOR tmp_status.md ;;
|
"Write") echo > tmp_status.md; $EDITOR tmp_status.md ;;
|
||||||
"Send") http_code=$(write_api_status "$(cat tmp_status.md)") ;;
|
"Send") http_code=$(write_api_status "$(cat tmp_status.md)") ;;
|
||||||
|
@ -464,6 +471,7 @@ write_status_menu()
|
||||||
"Visiblity")
|
"Visiblity")
|
||||||
status_visibility=$(echo 'public\nunlisted\nlocal\nprivate\ndirect\nlist' | fzy)
|
status_visibility=$(echo 'public\nunlisted\nlocal\nprivate\ndirect\nlist' | fzy)
|
||||||
;;
|
;;
|
||||||
|
"Back") sub_menu_lvl=$(expr $level - 1) ;;
|
||||||
"Main menu") sub_menu_lvl=0 ;;
|
"Main menu") sub_menu_lvl=0 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue