-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
121 lines (89 loc) · 3.52 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html>
<!--Create By Maxime Tournier-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="module/iziToast.min.css">
<script src="module/iziToast.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://site-assets.fontawesome.com/releases/v6.4.2/css/all.css">
<link rel="stylesheet" href="module/index.css">
<link rel="stylesheet" href="module/navbar.css">
</head>
<body id="login">
<nav style="-webkit-app-region: drag">
<img src="asset/logo.png" width="20px" style="margin-left: 10px">
<p id="title">TyroServ Launcher</p>
<div class="nav-buttons">
<button id="minimize"><i class="fa-light fa-window-minimize"></i></button>
<!-- <button id="maximize"><i class="fa-light fa-square"></i></button>-->
<button id="close"><i class="fa-light fa-xmark"></i></button>
</div>
</nav>
<div class="login-page">
<div class="form" id="form">
<img class="block-rodonite" src="asset/block/rhodonite.png"/>
<h2>Compte Useritium</h2>
<input type="text" placeholder="Email" id="email" />
<input type="password" placeholder="Mot de passe" id="password" />
<button id="connection">Se connecter</button>
<div class="down-form">
<a target="_blank" href="https://tyrolium.fr">Mots de passe oublier</a>
<a href="">S'inscrire</a>
</div>
<img class="block-tyrolium" src="asset/block/tyrolium.png"/>
</div>
</div>
<script src="authUseritium.js"></script>
<script>
const ipc = require("electron").ipcRenderer;
const { ipcRenderer } = require('electron');
// RECONNECTION AUTOMATIQUE
ipcRenderer.send("getCacheFile");
ipcRenderer.on("cacheFile", (event, cacheFile) => {
// console.log(cacheFile);
authUseritiumToken(cacheFile.username, cacheFile.token);
});
var connectionbtn = document.getElementById("connection");
connectionbtn.addEventListener("click", e => {
let email = document.getElementById("email").value
let pass = document.getElementById("password").value
if(email && pass){
authUseritium(email, pass);
}
});
function formFirst(){
let email = document.getElementById("email").value
let pass = document.getElementById("password").value
let pseudo = document.getElementById("pseudo").value
if(email && pass && pseudo){
authFirstConnexion(pseudo, email, pass);
}
}
function notif(status, why){
if(status == "true"){
iziToast.success({
title: 'OK',
message: why,
});
// playbtn.disabled = true;
}
if(status == "err"){
iziToast.error({
title: 'Erreur',
message: why,
})
// playbtn.disabled = false;
}
if(status == "info"){
iziToast.info({
title: 'Info',
message: why,
})
// playbtn.disabled = false;
}
}
</script>
<script src="module/navbar.js"></script>
</body>
</html>