Fixed some stuff earlier and forgot to commit
This commit is contained in:
parent
55f98c6d72
commit
690abbd798
2 changed files with 19 additions and 2 deletions
|
@ -71,7 +71,7 @@ def menu(screen):
|
||||||
while True:
|
while True:
|
||||||
breakkey = screen.getch()
|
breakkey = screen.getch()
|
||||||
if breakkey:
|
if breakkey:
|
||||||
time.sleep(5)
|
time.sleep(2)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
elif key == ord("a"):
|
elif key == ord("a"):
|
||||||
database.screenhandler(screen)
|
database.screenhandler(screen)
|
||||||
|
|
|
@ -510,6 +510,14 @@ def modify_account(screen):
|
||||||
x // 2 - 10,
|
x // 2 - 10,
|
||||||
optionaltxt="Enter new username: ",
|
optionaltxt="Enter new username: ",
|
||||||
)
|
)
|
||||||
|
if quitting:
|
||||||
|
screen.addstr("Going back to account settings...")
|
||||||
|
sleep(3)
|
||||||
|
quitting = False
|
||||||
|
screen.clear()
|
||||||
|
screen.refresh()
|
||||||
|
screenhandler(screen)
|
||||||
|
return
|
||||||
post(
|
post(
|
||||||
f"UPDATE player_details\
|
f"UPDATE player_details\
|
||||||
SET username = '{newuser}'\
|
SET username = '{newuser}'\
|
||||||
|
@ -524,6 +532,14 @@ def modify_account(screen):
|
||||||
newemail = email(
|
newemail = email(
|
||||||
screen, y // 2, x // 2 - 10, optionaltxt="Enter new email: "
|
screen, y // 2, x // 2 - 10, optionaltxt="Enter new email: "
|
||||||
)
|
)
|
||||||
|
if quitting:
|
||||||
|
screen.addstr("Going back to account settings...")
|
||||||
|
sleep(3)
|
||||||
|
quitting = False
|
||||||
|
screen.clear()
|
||||||
|
screen.refresh()
|
||||||
|
screenhandler(screen)
|
||||||
|
return
|
||||||
post(
|
post(
|
||||||
f"UPDATE player_details\
|
f"UPDATE player_details\
|
||||||
SET email = '{newemail}'\
|
SET email = '{newemail}'\
|
||||||
|
@ -698,6 +714,7 @@ def forgotpassword(screen):
|
||||||
"""Forgot password screen + new password"""
|
"""Forgot password screen + new password"""
|
||||||
screen.clear()
|
screen.clear()
|
||||||
screen.refresh()
|
screen.refresh()
|
||||||
|
screen.border()
|
||||||
y, x = screen.getmaxyx()
|
y, x = screen.getmaxyx()
|
||||||
screen.addstr(
|
screen.addstr(
|
||||||
1, x // 2 - 7, "FORGOT PASSWORD", curses.color_pair(3) | curses.A_BOLD
|
1, x // 2 - 7, "FORGOT PASSWORD", curses.color_pair(3) | curses.A_BOLD
|
||||||
|
@ -742,7 +759,7 @@ def forgotpassword(screen):
|
||||||
screen.addstr(y // 2 + 1, 5, "Enter OTP recieved in registered mail address:")
|
screen.addstr(y // 2 + 1, 5, "Enter OTP recieved in registered mail address:")
|
||||||
while True:
|
while True:
|
||||||
screen.refresh()
|
screen.refresh()
|
||||||
enter_otp = input(y // 2 + 1, 47, screen)
|
enter_otp = input(y // 2 + 1, 52, screen)
|
||||||
if quitting:
|
if quitting:
|
||||||
screen.addstr("Going back to account settings...")
|
screen.addstr("Going back to account settings...")
|
||||||
sleep(3)
|
sleep(3)
|
||||||
|
|
Loading…
Reference in a new issue