#238: Remove hash from URL with JS instead of full redirect

This commit is contained in:
2024-11-14 22:20:46 +01:00
parent bdb6dd0d54
commit 85d64f23eb
2 changed files with 13 additions and 9 deletions

View File

@ -60,18 +60,17 @@ async function newPasswordFunc() {
return
}
/**
* @TODO: #238, this wont work if we redirect to the login page
* Find a way to just "close" this screen instead of redirecting
*/
gameStore.addNotification({
title: 'Success',
message: 'Password changed successfully'
})
window.location.href = '/'
window.history.replaceState(null, '', window.location.pathname)
emit('switchToLogin')
}
function cancelNewPassword() {
window.location.href = '/'
window.history.replaceState(null, '', windowlocation.pathname)
emit('switchToLogin')
}
</script>