mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05:00
bootstrap 4 styling
This commit is contained in:
parent
3d9d193bda
commit
a29b1a6dfa
@ -25,13 +25,20 @@ namespace Billing.Controllers
|
|||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> Index(LoginModel model)
|
public async Task<IActionResult> Index(LoginModel model)
|
||||||
{
|
{
|
||||||
var result = await _signInManager.PasswordlessSignInAsync(model.Email);
|
if(ModelState.IsValid)
|
||||||
if(!result.Succeeded)
|
|
||||||
{
|
{
|
||||||
return View("Error");
|
var result = await _signInManager.PasswordlessSignInAsync(model.Email);
|
||||||
|
if(result.Succeeded)
|
||||||
|
{
|
||||||
|
return RedirectToAction("Index", "Home");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ModelState.AddModelError(string.Empty, "Account not found.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return RedirectToAction("Index", "Home");
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IActionResult> Confirm(string email, string token)
|
public async Task<IActionResult> Confirm(string email, string token)
|
||||||
|
@ -10,16 +10,16 @@
|
|||||||
"profiles": {
|
"profiles": {
|
||||||
"IIS Express": {
|
"IIS Express": {
|
||||||
"commandName": "IISExpress",
|
"commandName": "IISExpress",
|
||||||
"launchBrowser": false,
|
"launchBrowser": true,
|
||||||
"launchUrl": "",
|
"launchUrl": "http://localhost:44518",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Billing": {
|
"Billing": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": false,
|
"launchBrowser": true,
|
||||||
"launchUrl": "",
|
"launchUrl": "http://localhost:44519",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
@{
|
@model LoginModel
|
||||||
|
@{
|
||||||
ViewData["Title"] = "Login";
|
ViewData["Title"] = "Login";
|
||||||
}
|
}
|
||||||
|
|
||||||
@model LoginModel
|
<div class="row justify-content-md-center">
|
||||||
|
<div class="col-4">
|
||||||
<div class="row">
|
<p>Please enter your email address below to log in.</p>
|
||||||
<div class="col-xs-8 col-xs-offset-2">
|
<form asp-action="" method="post">
|
||||||
<h1 class="text-center">Login</h1>
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
<form asp-action="" method="post" class="form-horizontal">
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Email" class="col-sm-3">Email Address: </label>
|
<label asp-for="Email" class="sr-only">Email Address</label>
|
||||||
<div class="col-sm-9">
|
<input asp-for="Email" type="email" class="form-control" placeholder="ex. john@example.com"
|
||||||
<input asp-for="Email" class="form-control" />
|
required autofocus>
|
||||||
</div>
|
<span asp-validation-for="Email" class="invalid-feedback"></span>
|
||||||
|
<small class="form-text text-muted">We'll email you a secure login link.</small>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
<button class="btn btn-primary btn-block" type="submit">Continue</button>
|
||||||
<div asp-validation-summary="All"></div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,38 +5,35 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>@ViewData["Title"] | Bitwarden Billing Portal</title>
|
<title>@ViewData["Title"] | Bitwarden Billing Portal</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
|
||||||
<link rel="stylesheet" href="~/styles/site.css">
|
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||||
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"
|
||||||
|
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
|
||||||
|
<link rel="stylesheet" href="~/styles/billing.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<a class="navbar-brand" href="#"><i class="fa fa-lg fa-fw fa-shield"></i> Billing</a>
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse"
|
||||||
<span class="sr-only">Toggle navigation</span>
|
aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="icon-bar"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
<span class="icon-bar"></span>
|
</button>
|
||||||
<span class="icon-bar"></span>
|
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||||
</button>
|
<ul class="navbar-nav mr-auto">
|
||||||
<a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">Bitwarden Billing</a>
|
<li class="nav-item active">
|
||||||
</div>
|
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
|
||||||
<div class="navbar-collapse collapse">
|
</li>
|
||||||
<ul class="nav navbar-nav">
|
<li class="nav-item">
|
||||||
<li><a asp-area="" asp-controller="Home" asp-action="Index">Home</a></li>
|
<a class="nav-link" href="#">Link</a>
|
||||||
<li><a asp-area="" asp-controller="Login" asp-action="Index">Login</a></li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="container body-content">
|
|
||||||
@RenderBody()
|
|
||||||
<hr />
|
|
||||||
<footer>
|
|
||||||
<p>© 2018 - 8bit Solutions LLC</p>
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"></script>
|
<main role="main" class="container">
|
||||||
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"></script>
|
@RenderBody()
|
||||||
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
6
src/Billing/wwwroot/styles/billing.css
Normal file
6
src/Billing/wwwroot/styles/billing.css
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
.custom-select.input-validation-error ~ .invalid-feedback,
|
||||||
|
.custom-select.input-validation-error ~ .invalid-tooltip,
|
||||||
|
.form-control.input-validation-error ~ .invalid-feedback,
|
||||||
|
.form-control.input-validation-error ~ .invalid-tooltip {
|
||||||
|
display: block;
|
||||||
|
}
|
@ -1,35 +0,0 @@
|
|||||||
body {
|
|
||||||
padding-top: 50px;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Wrapping element */
|
|
||||||
/* Set some basic padding to keep content from hitting the edges */
|
|
||||||
.body-content {
|
|
||||||
padding-left: 15px;
|
|
||||||
padding-right: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Carousel */
|
|
||||||
.carousel-caption p {
|
|
||||||
font-size: 20px;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Make .svg files in the carousel display properly in older browsers */
|
|
||||||
.carousel-inner .item img[src$=".svg"] {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* QR code generator */
|
|
||||||
#qrCode {
|
|
||||||
margin: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Hide/rearrange for smaller screens */
|
|
||||||
@media screen and (max-width: 767px) {
|
|
||||||
/* Hide captions */
|
|
||||||
.carousel-caption {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user