3 changed files with 122 additions and 171 deletions
@ -1,113 +0,0 @@ |
|||
@page |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@using Volo.Abp.Account.Localization |
|||
@model Volo.Abp.Account.Web.Pages.Account.LoginModel |
|||
@inject IHtmlLocalizer<AccountResource> L |
|||
@{ |
|||
ViewData["Title"] = "登录"; |
|||
Layout = null; |
|||
} |
|||
<head> |
|||
<title>统一身份认证中心</title> |
|||
<meta charset="utf-8" /> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" /> |
|||
<link href="~/images/favicon.png" rel="icon" type="image/png"> |
|||
<link href="~/fonts/open_sans_3_4_6_7.css" rel="stylesheet"> |
|||
<link href="~/libs/nucleo/css/nucleo.css" rel="stylesheet" /> |
|||
<link href="~/libs/@@fortawesome/fontawesome-free/css/all.css" rel="stylesheet" /> |
|||
<link type="text/css" href="~/css/argon.min.css" rel="stylesheet"> |
|||
<link type="text/css" href="~/css/site.css" rel="stylesheet"> |
|||
<script src="~/libs/jquery/jquery.js"></script> |
|||
</head> |
|||
<div class="main-content"> |
|||
<nav class="navbar navbar-top navbar-horizontal navbar-expand-md navbar-dark"> |
|||
<div class="container px-4"> |
|||
<a class="navbar-brand" href="/"> |
|||
<img src="~/images/favicon.png" /> |
|||
</a> |
|||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-collapse-main" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> |
|||
<span class="navbar-toggler-icon"></span> |
|||
</button> |
|||
</div> |
|||
</nav> |
|||
|
|||
<div class="header bg-gradient-primary py-7 py-lg-8"> |
|||
<div class="container"> |
|||
<div class="header-body text-center mb-4"> |
|||
<div class="row justify-content-center"> |
|||
<div class="col-lg-5 col-md-6"> |
|||
<h1 class="text-white">统一身份认证中心</h1> |
|||
<p class="text-lead text-light">支持2种认证方式,邮箱密码验证或企业微信验证.</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- 斜线 --> |
|||
<div class="separator separator-bottom separator-skew zindex-100"> |
|||
<svg x="0" y="0" viewBox="0 0 2800 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"> |
|||
<polygon class="fill-default" points="2800 0 2800 100 0 100"></polygon> |
|||
</svg> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="container mt--8 pb-5"> |
|||
<div class="row justify-content-center"> |
|||
<div class="col-lg-5 col-md-7"> |
|||
<div class="card bg-secondary shadow border-0"> |
|||
<div class="card-header bg-transparent pb-5"> |
|||
<div class="text-muted text-center mt-2 mb-3"> |
|||
<small>第三方登录</small> |
|||
</div> |
|||
<div class="btn-wrapper text-center"> |
|||
<a href="#" class="btn btn-neutral btn-icon"> |
|||
<span class="btn-inner--icon"> |
|||
<img src="~/images/icons/wechat.svg"> |
|||
</span> |
|||
<span class="btn-inner--text">企业微信</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="card-body px-lg-5"> |
|||
<form method="post"> |
|||
<div class="form-group mb-3"> |
|||
<div class="input-group input-group-alternative"> |
|||
<div class="input-group-prepend"> |
|||
<span class="input-group-text"> |
|||
<i class="ni ni-email-83"></i> |
|||
</span> |
|||
</div> |
|||
<input asp-for="ReturnUrl" /> |
|||
<input asp-for="ReturnUrlHash" /> |
|||
|
|||
<input asp-for="LoginInput.UserNameOrEmailAddress" class="form-control" /> |
|||
<span asp-validation-for="LoginInput.UserNameOrEmailAddress" class="text-danger"></span> |
|||
</div> |
|||
<span class="invalid-feedback" style="display: block"></span> |
|||
</div> |
|||
<div class="form-group"> |
|||
<div class="input-group input-group-alternative"> |
|||
<div class="input-group-prepend"> |
|||
<span class="input-group-text"> |
|||
<i class="ni ni-lock-circle-open"></i> |
|||
</span> |
|||
</div> |
|||
|
|||
<input asp-for="LoginInput.Password" class="form-control" /> |
|||
<span asp-validation-for="LoginInput.Password" class="text-danger"></span> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div class="text-center"> |
|||
<button class="btn btn-primary my-4" type="submit" data-toggle="tooltip" data-placement="top" name="Action" value="Login">登录</button> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
@ -0,0 +1,33 @@ |
|||
@page "/Account/LoggedOut" |
|||
@model Volo.Abp.Account.Web.Pages.Account.LoggedOutModel |
|||
@using Volo.Abp.Account.Localization |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@inject IHtmlLocalizer<AccountResource> L |
|||
@{ |
|||
ViewData["Title"] = "登出"; |
|||
Layout = null; |
|||
} |
|||
|
|||
<head> |
|||
<title>登出</title> |
|||
<meta charset="utf-8"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"/> |
|||
</head> |
|||
<div> |
|||
@if (Model.PostLogoutRedirectUri != null) |
|||
{ |
|||
<a abp-button="Primary" id="redirectButton" href="@Model.PostLogoutRedirectUri" cname="@Model.ClientName">@L["ReturnToText"]</a> |
|||
} |
|||
@if (Model.SignOutIframeUrl != null) |
|||
{ |
|||
<iframe class="signout logoutiframe" src="@Model.SignOutIframeUrl"></iframe> |
|||
} |
|||
</div> |
|||
<script> |
|||
document.addEventListener('DOMContentLoaded', function (event) { |
|||
|
|||
window.clientName = document.getElementById("redirectButton").getAttribute("cname"); |
|||
window.location = document.getElementById('redirectButton').getAttribute('href'); |
|||
|
|||
}); |
|||
</script> |
|||
@ -1,70 +1,101 @@ |
|||
@page |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@using Volo.Abp.Account.Localization |
|||
@using Volo.Abp.Account.Settings |
|||
@using Volo.Abp.Settings |
|||
@model Volo.Abp.Account.Web.Pages.Account.LoginModel |
|||
@inject IHtmlLocalizer<AccountResource> L |
|||
@inject Volo.Abp.Settings.ISettingProvider SettingProvider |
|||
<div class="card mt-3 shadow-sm rounded"> |
|||
<div class="card-body p-5"> |
|||
<h4>@L["Login"]</h4> |
|||
@* @if (await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled)) *@ |
|||
@* { *@ |
|||
@* <strong> *@ |
|||
@* @L["AreYouANewUser"] *@ |
|||
@* <a href="@Url.Page("./Register", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})" class="text-decoration-none">@L["Register"]</a> *@ |
|||
@* </strong> *@ |
|||
@* } *@ |
|||
@if (Model.EnableLocalLogin) |
|||
{ |
|||
<form method="post" class="mt-4"> |
|||
<div class="form-group"> |
|||
<label asp-for="LoginInput.UserNameOrEmailAddress"></label> |
|||
<input asp-for="LoginInput.UserNameOrEmailAddress" class="form-control"/> |
|||
|
|||
@{ |
|||
ViewData["Title"] = L["Login"]; |
|||
Layout = null; |
|||
} |
|||
<head> |
|||
<title>@L["Login"]</title> |
|||
<meta charset="utf-8" /> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" /> |
|||
<link href="~/images/favicon.png" rel="icon" type="image/png"> |
|||
<link href="~/fonts/open_sans_3_4_6_7.css" rel="stylesheet"> |
|||
<link href="~/libs/nucleo/css/nucleo.css" rel="stylesheet" /> |
|||
<link href="~/libs/@@fortawesome/fontawesome-free/css/all.css" rel="stylesheet" /> |
|||
<link type="text/css" href="~/css/argon.min.css" rel="stylesheet"> |
|||
<link type="text/css" href="~/css/site.css" rel="stylesheet"> |
|||
<script src="~/libs/jquery/jquery.js"></script> |
|||
</head> |
|||
<div class="main-content"> |
|||
<nav class="navbar navbar-top navbar-horizontal navbar-expand-md navbar-dark"> |
|||
<div class="container px-4"> |
|||
<a class="navbar-brand" href="/"> |
|||
<img src="~/images/favicon.png" /> |
|||
</a> |
|||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-collapse-main" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> |
|||
<span class="navbar-toggler-icon"></span> |
|||
</button> |
|||
</div> |
|||
</nav> |
|||
|
|||
<div class="header bg-gradient-primary py-7 py-lg-8"> |
|||
<div class="container"> |
|||
<div class="header-body text-center mb-4"> |
|||
<div class="row justify-content-center"> |
|||
<div class="col-lg-5 col-md-6"> |
|||
<h1 class="text-white">@L["Login"]</h1> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- 斜线 --> |
|||
<div class="separator separator-bottom separator-skew zindex-100"> |
|||
<svg x="0" y="0" viewBox="0 0 2800 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"> |
|||
<polygon class="fill-default" points="2800 0 2800 100 0 100"></polygon> |
|||
</svg> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="container mt--8 pb-5"> |
|||
<div class="row justify-content-center"> |
|||
<div class="col-lg-5 col-md-7"> |
|||
<div class="card bg-secondary shadow border-0"> |
|||
<div class="card-header bg-transparent pb-5"> |
|||
</div> |
|||
<div class="card-body px-lg-5"> |
|||
<form method="post"> |
|||
<div class="form-group mb-3"> |
|||
<div class="input-group input-group-alternative"> |
|||
<div class="input-group-prepend"> |
|||
<span class="input-group-text"> |
|||
<i class="ni ni-email-83"></i> |
|||
</span> |
|||
</div> |
|||
<input asp-for="ReturnUrl" /> |
|||
<input asp-for="ReturnUrlHash" /> |
|||
<input asp-for="LoginInput.UserNameOrEmailAddress" class="form-control" /> |
|||
<span asp-validation-for="LoginInput.UserNameOrEmailAddress" class="text-danger"></span> |
|||
</div> |
|||
<span class="invalid-feedback" style="display: block"></span> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label asp-for="LoginInput.Password"></label> |
|||
<input asp-for="LoginInput.Password" class="form-control"/> |
|||
<div class="input-group input-group-alternative"> |
|||
<div class="input-group-prepend"> |
|||
<span class="input-group-text"> |
|||
<i class="ni ni-lock-circle-open"></i> |
|||
</span> |
|||
</div> |
|||
|
|||
<input asp-for="LoginInput.Password" class="form-control" /> |
|||
<span asp-validation-for="LoginInput.Password" class="text-danger"></span> |
|||
</div> |
|||
<abp-row> |
|||
<abp-column> |
|||
<abp-input asp-for="LoginInput.RememberMe" class="mb-4"/> |
|||
</abp-column> |
|||
@* <abp-column class="text-right"> *@ |
|||
@* <a href="@Url.Page("./ForgotPassword", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})">@L["ForgotPassword"]</a> *@ |
|||
@* </abp-column> *@ |
|||
</abp-row> |
|||
<abp-button type="submit" button-type="Primary" name="Action" value="Login" class="btn-block btn-lg mt-3">@L["Login"]</abp-button> |
|||
@if (Model.ShowCancelButton) |
|||
{ |
|||
<abp-button type="submit" button-type="Secondary" formnovalidate="formnovalidate" name="Action" value="Cancel" class="btn-block btn-lg mt-3">@L["Cancel"]</abp-button> |
|||
} |
|||
</form> |
|||
} |
|||
|
|||
@if (Model.VisibleExternalProviders.Any()) |
|||
{ |
|||
<div class="mt-2"> |
|||
<h5>@L["OrLoginWith"]</h5> |
|||
<form asp-page="./Login" asp-page-handler="ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" asp-route-returnUrlHash="@Model.ReturnUrlHash" method="post"> |
|||
@foreach (var provider in Model.VisibleExternalProviders) |
|||
{ |
|||
<button type="submit" class="btn btn-primary m-1" name="provider" value="@provider.AuthenticationScheme" title="@L["LogInUsingYourProviderAccount", provider.DisplayName]">@provider.DisplayName</button> |
|||
} |
|||
</form> |
|||
</div> |
|||
} |
|||
|
|||
@if (!Model.EnableLocalLogin && !Model.VisibleExternalProviders.Any()) |
|||
{ |
|||
<div class="alert alert-warning"> |
|||
<strong>@L["InvalidLoginRequest"]</strong> |
|||
@L["ThereAreNoLoginSchemesConfiguredForThisClient"] |
|||
<div class="text-center"> |
|||
<button class="btn btn-primary my-4" type="submit" data-toggle="tooltip" data-placement="top" name="Action" value="Login">@L["Login"]</button> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
|
|||
Loading…
Reference in new issue