diff --git a/html/template.html b/html/template.html index 9821bca..01a3e9f 100644 --- a/html/template.html +++ b/html/template.html @@ -5,9 +5,6 @@
diff --git a/js/controllers/login.js b/js/controllers/login.js index b809da2..8878ced 100644 --- a/js/controllers/login.js +++ b/js/controllers/login.js @@ -24,7 +24,6 @@ export default function login(temp_engine) { auth.done((agent) => { My.agent = agent; - if(auth.store) localStorage.setItem("token", agent.token) home(temp_engine); }) diff --git a/js/controllers/menu_mod.js b/js/controllers/menu_mod.js index 4310621..da5180f 100644 --- a/js/controllers/menu_mod.js +++ b/js/controllers/menu_mod.js @@ -21,11 +21,19 @@ function init_menu(temp_engine) { function loged_links() { $(".nav-links").prepend(` + `); } +function unloged_links() { + $(".nav-links").prepend(` + + + `); +} + function show_stats() { $(".stats").html(`

Agent name : ${My.agent.name}

@@ -41,5 +49,7 @@ export default function menu_mod(temp_engine) { if(My.agent) { show_stats(); loged_links(); + } else { + unloged_links(); } } \ No newline at end of file diff --git a/js/controllers/reg.js b/js/controllers/reg.js index b9931bb..b284dfa 100644 --- a/js/controllers/reg.js +++ b/js/controllers/reg.js @@ -33,7 +33,6 @@ export default function reg(temp_engine) { auth.done((agent) => { My.agent = agent; - if(auth.store) localStorage.setItem("token", agent.token); home(temp_engine); });