完成修改密码界面并修复了大量bug
This commit is contained in:
@ -146,6 +146,17 @@
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.info-box {
|
||||
width: 300px;
|
||||
padding: 20px;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -162,7 +173,7 @@
|
||||
<a href="#" onclick="(async () => { await Request('logout'); await UpdateUserInfo(); })();">Logout</a>
|
||||
<a href="#" onclick="localStorage.removeItem('session_token'); localStorage.removeItem('outhentication_key'); localStorage.removeItem('operation_count'); window.close();">Close Session</a>
|
||||
<a href="/register">Register</a>
|
||||
<a href="#">Change Password</a>
|
||||
<a href="/passwd">Change Password</a>
|
||||
<a href="#">Admin Panel</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -225,7 +236,9 @@
|
||||
ChangeUsername(nm+" [Admin]");
|
||||
}
|
||||
}
|
||||
UpdateUserInfo();
|
||||
document.addEventListener('SessionReady', async () => {
|
||||
await UpdateUserInfo();
|
||||
});
|
||||
async function TryLogin()
|
||||
{
|
||||
console.log("TryLogin called");
|
||||
@ -238,8 +251,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateUserInfo();
|
||||
window.location.href="/";
|
||||
await UpdateUserInfo();
|
||||
document.querySelector('.content').innerHTML = '<div class="info-box"><h2>Login Success</h2><p>Redirecting to home page in 3 seconds...</p></div>';
|
||||
setTimeout(function(){window.location.href="/";},3000);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user