mirror of
https://github.com/ysoftdevs/oauth-playground-server.git
synced 2026-03-29 21:41:55 +02:00
Device Login redesign
This commit is contained in:
@@ -1,85 +1,34 @@
|
|||||||
<!DOCTYPE html>
|
{#include base}
|
||||||
<html lang="en">
|
{#title}Login{/title}
|
||||||
<head>
|
<div class="container">
|
||||||
<meta charset="UTF-8">
|
<div class="row">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<div class="col s12 m6 offset-m3">
|
||||||
<title>Login Page</title>
|
<div class="card">
|
||||||
<style>
|
<div class="card-content">
|
||||||
body {
|
<span class="card-title center-align">Login</span>
|
||||||
font-family: Arial, sans-serif;
|
{#if error == "invalid_code"}
|
||||||
background-color: #f4f4f4;
|
<div class="error-popup" id="error-popup">Invalid code</div>
|
||||||
margin: 0;
|
{/if}
|
||||||
padding: 0;
|
<p>Enter code displayed on the device</p>
|
||||||
display: flex;
|
<form action="/auth" method="post">
|
||||||
justify-content: center;
|
<input type="hidden" name="sessionId" value="{sessionId}">
|
||||||
align-items: center;
|
<div class="row">
|
||||||
height: 100vh;
|
<div class="input-field col s12">
|
||||||
}
|
<input id="code" name="code" type="text" class="validate" required>
|
||||||
|
<label for="code">User code</label>
|
||||||
.login-container {
|
</div>
|
||||||
background-color: #fff;
|
</div>
|
||||||
padding: 20px;
|
<div class="row">
|
||||||
border-radius: 5px;
|
<div class="col s12 center-align">
|
||||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
<button class="btn waves-effect waves-light" type="submit">
|
||||||
}
|
Login
|
||||||
|
</button>
|
||||||
.login-container h2 {
|
</div>
|
||||||
text-align: center;
|
</div>
|
||||||
}
|
</form>
|
||||||
|
</div>
|
||||||
.form-group {
|
</div>
|
||||||
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%;
|
|
||||||
background-color: #007BFF;
|
|
||||||
color: #fff;
|
|
||||||
border: none;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-button:hover {
|
|
||||||
background-color: #0056b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-popup {
|
|
||||||
background-color: #ff6b6b;
|
|
||||||
color: #fff;
|
|
||||||
padding: 10px;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 5px;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="login-container">
|
|
||||||
<h2>Login</h2>
|
|
||||||
{#if error == "invalid_code"}
|
|
||||||
<div class="error-popup" id="error-popup">Invalid code</div>
|
|
||||||
{/if}
|
|
||||||
<form action="" method="post">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="code">User code:</label>
|
|
||||||
<input type="text" id="code" name="code" required>
|
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="login-button">Login</button>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
{/include}
|
||||||
</html>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user