added logout

This commit is contained in:
Shihaam Abdul Rahman 2021-05-01 14:07:30 +05:00
parent f918452f14
commit 7e2193c130
3 changed files with 42 additions and 4 deletions

View File

@ -1 +1,5 @@
rm $CREDENTIALS
rm $COOKIE
echo "Cleaning up.."
sleep 0.4
exit

View File

@ -40,9 +40,9 @@ elif [ "$MENU" = "5" ]
elif [ "$MENU" = "6" ]
then
echo "WIP"
sleep 2
source mainmenu.sh
source settingsmenu.sh
# sleep 2
# source mainmenu.sh
source settings-menu.sh
elif [ "$MENU" = "clear" ]
then
clear

34
settings-menu.sh Normal file
View File

@ -0,0 +1,34 @@
echo ""
echo "Settings"
echo ""
echo "1 - Logout and Delete saved credentials"
echo "2 - Change Password"
echo "3 - Go Back"
echo ""
printf 'Please Input: '
read -r SETTINGS
if [ "$SETTINGS" = "1" ]
then
source logout.sh
elif [ "$SETTINGS" = "2" ]
then
source changepassword.sh
elif [ "$SETTINGS" = "back" ]
then
source mainmenu.sh
elif [ "$SETTINGS" = "clear" ]
then
sleep 0.2
clear
source settings-menu.sh
elif [ "$SETTINGS" = "exit" ]
then
echo "Cleaning up.."
rm $COOKIE
sleep 0.2
exit
else
echo ${red}Invalid input:${yellow} $SETTINGS ${reset} 1>&2
source SETTINGSmenu.sh
fi