Consents page redesign

This commit is contained in:
konarfil
2023-09-26 12:47:15 +02:00
parent 5b14211214
commit 31de1f88fe

View File

@@ -4,88 +4,77 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title> <title>Login Page</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<style> <style>
body { body {
font-family: Arial, sans-serif;
background-color: #f4f4f4; background-color: #f4f4f4;
margin: 0;
padding: 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100vh; height: 100vh;
} }
.login-container { .btn {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.login-container h2 {
text-align: center;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
font-weight: bold;
display: block;
}
.form-group input {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
.login-button {
width: 100%; width: 100%;
background-color: #007BFF; background-color: #007BFF;
color: #fff; }
.btn:hover {
background-color: #0056b3
}
.collection {
border: none; border: none;
padding: 10px;
border-radius: 5px;
cursor: pointer;
} }
.login-button:hover { .collection-item {
background-color: #0056b3; border: none;
}
.error-popup {
background-color: #ff6b6b;
color: #fff;
padding: 10px;
text-align: center;
border-radius: 5px;
margin-top: 10px;
} }
</style> </style>
</head> </head>
<body> <body>
<div class="login-container"> <div class="container">
<h2>Consents</h2> <div class="row">
<p>Hello <strong>{user.login}</strong></p> <div class="col s12 m6 offset-m3">
<div class="card">
<p>You are authorizing to <strong>{client.description}</strong>, which requests the following permissions from you:</p> <div class="card-content">
<span class="card-title center-align">Consents</span>
<form action="/auth/consent" method="post"> <h6>Hello <strong>{user.login}</strong></h6>
<input type="hidden" name="sessionId" value="{sessionId}"> <p>You are authorizing to <strong>{client.description}</strong>, which requests the following permissions from you:</p>
<ul> <form action="/auth/consent" method="post">
{#each scopes} <input type="hidden" name="sessionId" value="{sessionId}">
<li> <div class="row">
<label><input type="checkbox" name="scope" value="{it}" checked>{it}</label> <div class="input-field col s12">
</li> <ul class="collection">
{/each} {#each scopes}
</ul> <li class="collection-item">
<label>
<button type="submit" class="login-button">Confirm</button> <input type="checkbox" name="scope" value="{it}" />
</form> <span>{it</span>
</label>
</li>
{/each}
</ul>
</div>
</div>
<div class="row">
<div class="col s12 center-align">
<button class="btn waves-effect waves-light" type="submit">
Confirm
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div> </div>
</body> </body>
</html> </html>