OHHHHH OUII SACHA JE JUTEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

main
anulax1225 ago%!(EXTRA string=11 months)
parent 737f12c0da
commit 9e58d2a3df
  1. BIN
      assets/profile/background.png
  2. 25
      css/profile.css
  3. 19
      html/templates/modal_profile.html
  4. 21
      html/templates/profile/profile.html
  5. 18
      js/controllers/profile.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

@ -1,9 +1,17 @@
#modal-profile .cont-profile
{ {
width: 60%; width: 100%;
height: 70%; height: 100%;
display: flex;
align-items: center;
}
#profile
{
width: 50%;
height: 90%;
padding: 10px; padding: 10px;
background-color: rgba(0, 0, 0, 0.521); background-color: rgb(0, 0, 0);
border: none; border: none;
border-radius: 10px; border-radius: 10px;
display: flex; display: flex;
@ -18,12 +26,12 @@
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: center;
} }
.profile-header p .profile-header p
{ {
font-size: 40px; font-size: 60px;
} }
.profile-header button .profile-header button
@ -66,15 +74,14 @@
{ {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around;
width: 80%; width: 80%;
padding: 5px; padding: 5px;
} }
#btn-logout #btn-logout
{ {
width: 60px; width: 50px;
height: 60px; height: 50px;
padding: 0; padding: 0;
border: none; border: none;
background: none; background: none;

@ -1,19 +0,0 @@
<div class="profile-header">
<div></div>
<p class="">Profile</p>
<button id="btn-close"><p>X</p></button>
</div>
<div class="profile-content">
<p class="tb-r">Name</p><p id="name"></p>
<p class="tb-r">Faction</p><p id="faction"></p>
<p class="tb-r">Credits</p><p id="credit"></p>
<p class="tb-r">Head Quaters</p><p id="hq"></p>
<p class="tb-r">Number of ships</p><p id="shipcount"></p>
</div>
<div class="profile-footer">
<button id="btn-logout">
<img src="/assets/menu/logout.png" alt="">
</button>
<button id="btn-token">COPY TOKEN</button>
</div>

@ -0,0 +1,21 @@
<div class="cont-profile">
<div id="profile">
<div class="profile-header">
<p class="">Profile</p>
</div>
<div class="profile-content">
<p class="tb-r">Name</p><p id="name"></p>
<p class="tb-r">Faction</p><p id="faction"></p>
<p class="tb-r">Credits</p><p id="credit"></p>
<p class="tb-r">Head Quaters</p><p id="hq"></p>
<p class="tb-r">Number of ships</p><p id="shipcount"></p>
</div>
<div class="profile-footer">
<button id="btn-logout">
<img src="/assets/menu/logout.png" alt="">
</button>
<button id="btn-token">COPY TOKEN</button>
</div>
</div>
</div>

@ -1,13 +1,11 @@
import { Modal } from "../skama_code/ui/modal.js" import menu_mod from "./menu_mod.js";
import { Auth } from "../skama_code/auth/auth.js" import { Auth } from "../skama_code/auth/auth.js"
import { My } from "../skama_code/commun/my.js" import { My } from "../skama_code/commun/my.js"
import login from "./login.js"; import login from "./login.js";
export default function profile(temp_engine) { export default function profile(temp_engine) {
let modal = new Modal("modal-profile", temp_engine); temp_engine.after_render(() => {
modal.load("templates/modal_profile.html"); $("body").css("background-image", "url('/assets/profile/background.png')")
modal.after_load(() => {
modal.show();
$('#name').append(My.agent.name); $('#name').append(My.agent.name);
$('#faction').append(My.agent.faction); $('#faction').append(My.agent.faction);
$('#credit').append(My.agent.credits); $('#credit').append(My.agent.credits);
@ -17,17 +15,15 @@ export default function profile(temp_engine) {
temp_engine.add_event('#btn-token', 'click', () => { temp_engine.add_event('#btn-token', 'click', () => {
navigator.clipboard.writeText(My.agent.token); navigator.clipboard.writeText(My.agent.token);
alert('Token copied !'); alert('Token copied !');
}) });
temp_engine.add_event('#btn-logout', 'click', () => { temp_engine.add_event('#btn-logout', 'click', () => {
const auth = new Auth(); const auth = new Auth();
auth.unload_token(); auth.unload_token();
login(temp_engine); login(temp_engine);
})
temp_engine.add_event('#btn-close', 'click', () => {
console.log("CLOSINF")
modal.close();
}); });
menu_mod(temp_engine);
}); });
temp_engine.render("/templates/profile/profile.html");
} }
Loading…
Cancel
Save