mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-25 11:51:28 +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=
|
||||||
sub_menu_lvl=1
|
if [ -n "$sub_menu_lvl" ]; then
|
||||||
while [ $sub_menu_lvl -eq 1 ]; do
|
sub_menu_lvl=2
|
||||||
|
level=2
|
||||||
|
else
|
||||||
|
sub_menu_lvl=1
|
||||||
|
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