deux pages master et slave distinctes
This commit is contained in:
3
app.js
3
app.js
@@ -142,7 +142,8 @@ app.post("/auth/check-login", (req, res) => {
|
||||
|
||||
//res.cookie("authorization", userId, { maxAge: 900000, httpOnly: true });
|
||||
|
||||
return res.render('index')
|
||||
let cible = (role == 'P') ? 'master' : 'slave';
|
||||
return res.render(cible);
|
||||
}
|
||||
else {
|
||||
return res.render('login', {
|
||||
|
||||
@@ -32,3 +32,10 @@ nav li a:hover {
|
||||
background-color: #0d6efd !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.boutons {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.bouton {
|
||||
}
|
||||
32
views/master.hbs
Normal file
32
views/master.hbs
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<link rel="stylesheet" href="/styles.css">
|
||||
<link href="/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
</head>
|
||||
<body>
|
||||
{{!-- Navigation links --}}
|
||||
<nav>
|
||||
<a href="/"><h4>Projet MIA</h4></a>
|
||||
</nav>
|
||||
|
||||
{{!-- Body --}}
|
||||
<div class="container mt-4">
|
||||
<div class="mt-4 p-5 bg-primary text-white rounded">
|
||||
<h1>Bravo : connexion réussie</h1>
|
||||
<p>Bienvenue sur le projet MIA...</p>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="container boutons">
|
||||
<div class="bouton"><a href="/master" class="btn btn-primary">Demander l'accès aux caméras</a></div>
|
||||
<div class="bouton"><a href="/slave" class="btn btn-secondary">Démarrer la session</a></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user