mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-05 12:34:34 +02:00
Display name sync
This commit is contained in:
parent
7ae8049438
commit
2fb4bd4975
12 changed files with 897 additions and 793 deletions
web/src/app
|
@ -1,3 +1,5 @@
|
|||
import routes from "../components/routes";
|
||||
|
||||
class Session {
|
||||
store(username, token) {
|
||||
localStorage.setItem("user", username);
|
||||
|
@ -9,6 +11,11 @@ class Session {
|
|||
localStorage.removeItem("token");
|
||||
}
|
||||
|
||||
resetAndRedirect(url) {
|
||||
this.reset();
|
||||
window.location.href = url;
|
||||
}
|
||||
|
||||
exists() {
|
||||
return this.username() && this.token();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue