parent
45ff06af84
commit
068153abb8
6 changed files with 44 additions and 59 deletions
@ -1,9 +0,0 @@ |
|||||||
<!-- Copyright © 2023 Entreprise SkamKraft --> |
|
||||||
|
|
||||||
<div class="my-modal"> |
|
||||||
<p class="modal-title">Login success</p> |
|
||||||
<div> |
|
||||||
<button id="ok" class="btn btn-val">Continue</button> |
|
||||||
<button id="forget_login" class="btn btn-cancel">Forget agent</button> |
|
||||||
</div> |
|
||||||
</div> |
|
@ -1,10 +0,0 @@ |
|||||||
<!-- Copyright © 2023 Entreprise SkamKraft --> |
|
||||||
|
|
||||||
<div class="my-modal"> |
|
||||||
<p class="modal-title">Login success</p> |
|
||||||
<p class="show-token"></p> |
|
||||||
<div> |
|
||||||
<button id="ok" class="btn btn-val">Continue</button> |
|
||||||
<button id="forget_reg" class="btn btn-cancel">Forget agent</button> |
|
||||||
</div> |
|
||||||
</div> |
|
@ -1,10 +1,18 @@ |
|||||||
|
import { AgentBuilder, My } from "../skama_code/api/agent.js"; |
||||||
|
import { Auth } from "../skama_code/auth/auth.js"; |
||||||
import menu_mod from "./menu_mod.js"; |
import menu_mod from "./menu_mod.js"; |
||||||
|
|
||||||
export default function home(temp_engine) { |
export default function home(temp_engine) { |
||||||
console.log("test"); |
//Auto login
|
||||||
temp_engine.after_render(menu_mod); |
const auth = new Auth(); |
||||||
temp_engine.render("templates/home.html"); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
if (auth.relog()) { |
||||||
|
AgentBuilder.get(localStorage.getItem("token"), (agent) => { |
||||||
|
My.agent = agent; |
||||||
|
menu_mod(temp_engine); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
temp_engine.after_render(menu_mod); |
||||||
|
temp_engine.render("templates/home.html"); |
||||||
|
} |
||||||
|
@ -1 +1 @@ |
|||||||
Subproject commit 77c805654739b07aeecccb90ee53c9126ff158a0 |
Subproject commit f6c0518ebb6f53be77117d72ac3d4fa56307a37c |
Loading…
Reference in New Issue