parent
cf26b842e0
commit
bbe340e691
3 changed files with 18 additions and 20 deletions
@ -1,27 +1,18 @@ |
|||||||
import menu_mod from "./menu_mod.js"; |
import menu_mod from "./menu_mod.js"; |
||||||
import { My } from "../skama_code/api/agent.js"; |
import { My } from "../skama_code/api/agent.js"; |
||||||
import { Ship } from "../skama_code/api/ship.js"; |
import { AgentBuilder } from "../skama_code/api/agent.js"; |
||||||
|
import { Auth } from "../skama_code/auth/auth.js"; |
||||||
|
|
||||||
export default function home(temp_engine) { |
export default function home(temp_engine) { |
||||||
|
const auth = new Auth() |
||||||
|
|
||||||
|
if (auth.relog()) { |
||||||
|
AgentBuilder.get(localStorage.getItem("token"), (agent) => { |
||||||
|
My.agent = agent; |
||||||
|
menu_mod(temp_engine); |
||||||
|
}) |
||||||
|
} |
||||||
console.log("test"); |
console.log("test"); |
||||||
temp_engine.after_render(menu_mod); |
temp_engine.after_render(menu_mod); |
||||||
temp_engine.render("templates/home.html"); |
temp_engine.render("templates/home.html"); |
||||||
|
|
||||||
// if (My.agent) {
|
|
||||||
// Ship.list((ships) => {
|
|
||||||
// ships[0].orbit(
|
|
||||||
// (response) => console.log(response),
|
|
||||||
// (err) => console.log(err)
|
|
||||||
// );
|
|
||||||
// ships[0].navigate(
|
|
||||||
// "X1-TN14-A2",
|
|
||||||
// (response) => {
|
|
||||||
// console.log(response);
|
|
||||||
// },
|
|
||||||
// (err) => {
|
|
||||||
// console.log(err);
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
} |
} |
||||||
|
Loading…
Reference in New Issue