add: user account switcher
This commit is contained in:
parent
48e0b02198
commit
20aae5570b
13 changed files with 172 additions and 34 deletions
|
@ -48,6 +48,12 @@
|
|||
]);
|
||||
|
||||
if (res.ok) {
|
||||
// update tokens
|
||||
const new_tokens = ns("me").LOGIN_ACCOUNT_TOKENS;
|
||||
new_tokens[e.target.username.value] = res.message;
|
||||
trigger("me::set_login_account_tokens", [new_tokens]);
|
||||
|
||||
// redirect
|
||||
setTimeout(() => {
|
||||
window.location.href = "/";
|
||||
}, 150);
|
||||
|
|
|
@ -100,6 +100,12 @@
|
|||
]);
|
||||
|
||||
if (res.ok) {
|
||||
// update tokens
|
||||
const new_tokens = ns("me").LOGIN_ACCOUNT_TOKENS;
|
||||
new_tokens[e.target.username.value] = res.message;
|
||||
trigger("me::set_login_account_tokens", [new_tokens]);
|
||||
|
||||
// redirect
|
||||
setTimeout(() => {
|
||||
window.location.href = "/";
|
||||
}, 150);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue