mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-11 19:48:21 +08:00
Opt: Auto refresh page when connection lost
This commit is contained in:
2
gui.py
2
gui.py
@@ -885,6 +885,8 @@ if __name__ == "__main__":
|
|||||||
lang.reload()
|
lang.reload()
|
||||||
|
|
||||||
def index():
|
def index():
|
||||||
|
# Auto refresh page when connection lost
|
||||||
|
run_js('WebIO._state.CurrentSession.on_session_close(()=>{setTimeout(()=>location.reload(), 5000)})')
|
||||||
if args.key != '' and not login(args.key):
|
if args.key != '' and not login(args.key):
|
||||||
logger.warning(f"{info.user_ip} login failed.")
|
logger.warning(f"{info.user_ip} login failed.")
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|||||||
Reference in New Issue
Block a user