1
0
Fork 0
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:
binwiederhier 2022-12-25 22:29:55 -05:00
parent 7ae8049438
commit 2fb4bd4975
12 changed files with 897 additions and 793 deletions
web/src/app

View file

@ -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();
}