remove having to press enter in menus and OTP input
This commit is contained in:
parent
b23c354a9a
commit
754c1e0751
12
bml-cli
12
bml-cli
@ -527,7 +527,7 @@ echo "5 - Services"
|
||||
echo "6 - Settings"
|
||||
echo ""
|
||||
printf 'Please Input: '
|
||||
read -r MENU
|
||||
read -n 1 -r MENU
|
||||
|
||||
if [ "$MENU" = "1" ]
|
||||
then
|
||||
@ -585,7 +585,7 @@ contacts_menu(){
|
||||
echo "x - Go back"
|
||||
echo ""
|
||||
printf 'Please Input: '
|
||||
read -r CONTACTS
|
||||
read -n 1 -r CONTACTS
|
||||
|
||||
if [ "$CONTACTS" = "1" ] || ["$CONTACTS" = "transfer" ]
|
||||
then
|
||||
@ -629,7 +629,7 @@ change_password(){
|
||||
echo "1 - Mobile"
|
||||
echo "2 - Email"
|
||||
echo ""
|
||||
read -p "Please input: " OTPCHANNEL
|
||||
read -n 1 -p "Please input: " OTPCHANNEL
|
||||
|
||||
if [ "$OTPCHANNEL" = "1" ] || [ "$OTPCHANNEL" = "mobile" ]
|
||||
then
|
||||
@ -678,7 +678,7 @@ change_password(){
|
||||
--data-raw channel=$OTPCHANNEL > /dev/null
|
||||
|
||||
echo ${lightgreen}OTP sent to ${yellow}${ECHOOTPCHANNEL}${reset}
|
||||
read -p 'Enter OTP: ' OTP
|
||||
read -n 6 -p 'Enter OTP: ' OTP
|
||||
CHANGEPASSWORD=$(curl -s -b $COOKIE $BML_URL/user/changepassword \
|
||||
--data-raw currentPassword=$OLD_PASSWORD \
|
||||
--data-raw newPassword=$NEW_PASSWORD \
|
||||
@ -726,7 +726,7 @@ settings(){
|
||||
echo "3 - Change Password"
|
||||
echo ""
|
||||
printf 'Please Input: '
|
||||
read -r SETTINGS
|
||||
read -n 1 -r SETTINGS
|
||||
|
||||
if [ "$SETTINGS" = "1" ]
|
||||
then
|
||||
@ -769,7 +769,7 @@ init_login(){
|
||||
display_banner && check_connection #& animate "Checking Internet Connection"
|
||||
source $CONFIG
|
||||
source $CREDENTIALS
|
||||
display_banner && os_detect #& animate "Detecting Operating System"
|
||||
display_banner && os_detect #& animate "Detecting Operating System"
|
||||
display_banner && init_login
|
||||
userinfo
|
||||
display_banner && display_welcome && display_userinfo && main_menu
|
||||
|
Loading…
x
Reference in New Issue
Block a user