mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Implements authentication system
This commit is contained in:
1 parent
38829d64ff
commit
a6dcf65d1c
103 files changed
+2983
-454
No files matched your search
@@ -0,0 +1,91 @@
|
||||
@*
|
||||
/auth/change-password/
|
||||
*@
|
||||
|
||||
@using Lumina.Presentation.Web.Common.Models.UsersManagement
|
||||
@using Lumina.Presentation.Web.Common.Services
|
||||
|
||||
@inject IUrlService _urlService
|
||||
|
||||
@model ChangePasswordRequestModel
|
||||
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
<div class="shine-effect"></div>
|
||||
<form asp-controller="Auth" asp-action="ChangePassword" method="post" id="change-password-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="text" name="username" autocomplete="username" value="@User.Identity!.Name" hidden />
|
||||
<div class="form-container">
|
||||
<!-- Current Password -->
|
||||
<div class="form-row" id="div-current-password">
|
||||
<div class="form-label">
|
||||
<label asp-for="CurrentPassword">Current Password</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="CurrentPassword" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">DescriptionCurrentPassword</small>
|
||||
</div>
|
||||
<!-- New Password -->
|
||||
<div class="form-row" id="div-new-password">
|
||||
<div class="form-label">
|
||||
<label asp-for="NewPassword">New Password</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="NewPassword" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">DescriptionNewPassword</small>
|
||||
</div>
|
||||
<!-- New Password Confirm-->
|
||||
<div class="form-row" id="div-new-password-confirm">
|
||||
<div class="form-label">
|
||||
<label asp-for="NewPasswordConfirm">New Password Confirm</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="NewPasswordConfirm" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">DescriptionNewPasswordConfirm</small>
|
||||
</div>
|
||||
<div class="form-row" id="div-change-password-submit" style="justify-content: center;">
|
||||
<button type="submit" class="confirm-button h-22px w-150px">Change Password</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- section registration success -->
|
||||
<div class="text-center w-100">
|
||||
<p id="change-password-success" class="text-light-one w-100 hidden">Password Changed</p>
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
<script type="text/javascript" defer>
|
||||
document.getElementById('change-password-form').addEventListener('submit', async (event) => {
|
||||
event.preventDefault();
|
||||
const form = event.target;
|
||||
const txtCurrentPassword = form.querySelector('[name="CurrentPassword"]');
|
||||
const txtNewPassword = form.querySelector('[name="NewPassword"]');
|
||||
const txtNewPasswordConfirm = form.querySelector('[name="NewPasswordConfirm"]');
|
||||
|
||||
const changePasswordSuccess = document.getElementById('change-password-success');
|
||||
const divCurrentPassword = document.getElementById('div-current-password');
|
||||
const divNewPassword = document.getElementById('div-new-password');
|
||||
const divNewPasswordConfirm = document.getElementById('div-new-password-confirm');
|
||||
const divChangePasswordSubmit = document.getElementById('div-change-password-submit');
|
||||
|
||||
const formData = {
|
||||
CurrentPassword: txtCurrentPassword.value,
|
||||
NewPassword: txtNewPassword.value,
|
||||
NewPasswordConfirm: txtNewPasswordConfirm.value
|
||||
};
|
||||
const data = await callApiPostAsync('@_urlService.GetAbsoluteUrl("ChangePassword", "Auth")', formData);
|
||||
if (data && data.isPasswordChanged === true) {
|
||||
changePasswordSuccess.classList.replace('hidden', 'block');
|
||||
divCurrentPassword.classList.add('hidden');
|
||||
divNewPassword.classList.add('hidden');
|
||||
divNewPasswordConfirm.classList.add('hidden');
|
||||
divChangePasswordSubmit.classList.add('hidden');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -34,11 +34,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<button id="btnRecoverPassword" type="button" class="abort-button h-22px w-150px" data-link="@Url.Action("RecoverPassword", "Auth")">Recover Password</button>
|
||||
<button id="btnLogin" type="submit" class="confirm-button h-22px w-100px">Login</button>
|
||||
<button id="btn-recover-password" type="button" class="abort-button h-22px w-150px" data-link="@_urlService.GetAbsoluteUrl("RecoverPassword", "Auth")">Recover Password</button>
|
||||
<button id="btn-login" type="submit" class="confirm-button h-22px w-100px">Login</button>
|
||||
</div>
|
||||
<!-- 2FA -->
|
||||
<div class="form-row mt-10 hidden" id="divTotpCode">
|
||||
<div class="form-row mt-10 hidden" id="div-totp-code">
|
||||
<div class="form-label">
|
||||
<label asp-for="TotpCode">Totp Code</label>
|
||||
</div>
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<button type="submit" id="btnValidateTotp" class="confirm-button h-22px w-100px hidden">Validate Code</button>
|
||||
<button type="submit" id="btn-validate-totp" class="confirm-button h-22px w-100px hidden">Validate Code</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -60,17 +60,17 @@
|
||||
const txtUsername = form.querySelector('[name="Username"]');
|
||||
const txtPassword = form.querySelector('[name="Password"]');
|
||||
const txtTotpCode = form.querySelector('[name="TotpCode"]');
|
||||
const divTotpCode = document.getElementById('divTotpCode');
|
||||
const btnLogin = document.getElementById('btnLogin');
|
||||
const btnRecoverPassword = document.getElementById('btnRecoverPassword');
|
||||
const btnValidateTotp = document.getElementById('btnValidateTotp');
|
||||
const divTotpCode = document.getElementById('div-totp-code');
|
||||
const btnLogin = document.getElementById('btn-login');
|
||||
const btnRecoverPassword = document.getElementById('btn-recover-password');
|
||||
const btnValidateTotp = document.getElementById('btn-validate-totp');
|
||||
const formData = {
|
||||
Username: txtUsername.value,
|
||||
Password: txtPassword.value,
|
||||
TotpCode: txtTotpCode.value
|
||||
};
|
||||
const data = await callApiPostAsync('/auth/login', formData);
|
||||
if (data && data.isTotpRequired) {
|
||||
const data = await callApiPostAsync('@_urlService.GetAbsoluteUrl("Login", "Auth")', formData);
|
||||
if (data && data.isTotpRequired === true) {
|
||||
txtUsername.disabled = true;
|
||||
txtPassword.disabled = true;
|
||||
btnLogin.disabled = true;
|
||||
@@ -82,7 +82,7 @@
|
||||
else if (data)
|
||||
window.location.href = data;
|
||||
});
|
||||
document.getElementById('btnRecoverPassword').addEventListener('click', () => {
|
||||
document.getElementById('btn-recover-password').addEventListener('click', () => {
|
||||
window.location.href = '@_urlService.GetAbsoluteUrl("RecoverPassword", "Auth")';
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
@*
|
||||
/auth/recover-password/
|
||||
*@
|
||||
|
||||
@using Lumina.Presentation.Web.Common.Models.UsersManagement
|
||||
@using Lumina.Presentation.Web.Common.Services
|
||||
|
||||
@inject IUrlService _urlService
|
||||
|
||||
@model RecoverPasswordRequestModel
|
||||
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
<div class="shine-effect"></div>
|
||||
<form asp-controller="Auth" asp-action="RecoverPassword" method="post" id="recover-password-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="form-container">
|
||||
<!-- Username -->
|
||||
<div class="form-row" id="div-username">
|
||||
<div class="form-label">
|
||||
<label asp-for="Username">Username</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input asp-for="Username" autocomplete="username" class="enlightenment-input" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- 2FA -->
|
||||
<div class="form-row" id="div-totp-code">
|
||||
<div class="form-label">
|
||||
<label asp-for="TotpCode">Totp Code</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="number" asp-for="TotpCode" autocomplete="one-time-code" class="enlightenment-input" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<button id="btn-login" type="button" class="abort-button h-22px w-100px">Back To Login</button>
|
||||
<button type="submit" id="btn-validate-totp" class="confirm-button h-22px w-100px">Validate Code</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- section registration success -->
|
||||
<div class="text-center w-100">
|
||||
<p id="recover-password-success" class="text-light-one w-100 hidden">Password Temporarily Reset</p>
|
||||
<button id="btn-redirect-login" type="submit" class="confirm-button h-22px w-80px hidden" data-link="@_urlService.GetAbsoluteUrl("Login", "Auth")">Login</button>
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
<script type="text/javascript" defer>
|
||||
document.getElementById('recover-password-form').addEventListener('submit', async (event) => {
|
||||
event.preventDefault();
|
||||
const form = event.target;
|
||||
const txtUsername = form.querySelector('[name="Username"]');
|
||||
const txtTotpCode = form.querySelector('[name="TotpCode"]');
|
||||
const recoverPasswordSuccess = document.getElementById('recover-password-success');
|
||||
const btnRedirectLogin = document.getElementById('btn-redirect-login');
|
||||
const btnLogin = document.getElementById('btn-login');
|
||||
const btnValidateTotp = document.getElementById('btn-validate-totp');
|
||||
const divUsername = document.getElementById('div-username');
|
||||
const divTotpCode = document.getElementById('div-totp-code');
|
||||
|
||||
const formData = {
|
||||
Username: txtUsername.value,
|
||||
TotpCode: txtTotpCode.value
|
||||
};
|
||||
const data = await callApiPostAsync('@_urlService.GetAbsoluteUrl("RecoverPassword", "Auth")', formData);
|
||||
if (data && data.isPasswordReset === true) {
|
||||
divUsername.classList.add('hidden');
|
||||
btnValidateTotp.classList.add('hidden');
|
||||
btnLogin.classList.add('hidden');
|
||||
divTotpCode.classList.add('hidden');
|
||||
btnRedirectLogin.classList.replace('hidden', 'inline');
|
||||
recoverPasswordSuccess.classList.replace('hidden', 'block');
|
||||
}
|
||||
});
|
||||
document.getElementById('btn-login').addEventListener('click', () => {
|
||||
window.location.href = '@_urlService.GetAbsoluteUrl("Login", "Auth")';
|
||||
});
|
||||
document.getElementById('btn-redirect-login').addEventListener('click', () => {
|
||||
window.location.href = '@_urlService.GetAbsoluteUrl("Login", "Auth")';
|
||||
});
|
||||
</script>
|
||||
}
|
||||
+19
-16
@@ -1,18 +1,21 @@
|
||||
@*
|
||||
/account/register/
|
||||
/auth/register/
|
||||
*@
|
||||
|
||||
@using Lumina.Presentation.Web.Common.Models.UsersManagement
|
||||
@using Lumina.Presentation.Web.Common.Services
|
||||
|
||||
@{
|
||||
string? registrationType = ViewData["RegistrationType"] as string;
|
||||
}
|
||||
|
||||
@inject IUrlService _urlService
|
||||
|
||||
@model RegisterRequestModel
|
||||
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
<div class="shine-effect"></div>
|
||||
<form asp-controller="Account" asp-action="Register" method="post" id="register-account-form" class="inline">
|
||||
<form asp-controller="Auth" asp-action="Register" method="post" id="register-account-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<!-- section for determining registration type (regular user/admin) -->
|
||||
<input type="hidden" name="RegistrationType" value="@registrationType" />
|
||||
@@ -57,7 +60,7 @@
|
||||
<small class="form-label text-disabled form-description">DescriptionPasswordConfirm</small>
|
||||
</div>
|
||||
<!-- 2FA -->
|
||||
<input type="hidden" id="hiddenUseTwoFa" name="use2fa" value="true">
|
||||
<input type="hidden" id="hidden-use-two-fa" name="use2fa" value="true">
|
||||
<div class="form-row">
|
||||
<div class="form-field">
|
||||
<label class="enlightenment-checkbox-label">
|
||||
@@ -69,7 +72,7 @@
|
||||
<small class="form-label text-disabled form-description">Description2Fa</small>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<span id="register2FaAttention" class="invalid-feedback w-95 text-center hidden">Password recovery is allowed only if two factor authentication is enabled!</span>
|
||||
<span id="register-two-fa-attention" class="invalid-feedback w-95 text-center hidden">Password recovery is allowed only if two factor authentication is enabled!</span>
|
||||
</div>
|
||||
<div class="form-row" style="justify-content: center;">
|
||||
<button type="submit" class="confirm-button h-22px w-100px">Register</button>
|
||||
@@ -78,10 +81,10 @@
|
||||
</form>
|
||||
<!-- section registration success -->
|
||||
<div class="text-center w-100">
|
||||
<p id="registerSuccess" class="text-light-one w-100 hidden">Account Created</p>
|
||||
<img id="totpImage" class="w-200px h-200px h-align-m mx-auto mt-10 hidden" />
|
||||
<p id="totpMessage" class="text-light-one w-100 hidden">Scan Totp Code</p>
|
||||
<a id="redirectButton" asp-controller="Account" asp-action="Login" class="confirm-button f-14 pt-0 pb-0 h-22px w-80px mt-10 mb-10 mx-auto hidden">Login</a>
|
||||
<p id="register-success" class="text-light-one w-100 hidden">Account Created</p>
|
||||
<img id="totp-image" class="w-200px h-200px h-align-m mx-auto mt-10 hidden" />
|
||||
<p id="totp-message" class="text-light-one w-100 hidden">Scan Totp Code</p>
|
||||
<button id="btn-login" type="button" class="confirm-button h-22px w-80px hidden" data-link="@_urlService.GetAbsoluteUrl("Login", "Auth")">Login</button>
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
@@ -93,10 +96,10 @@
|
||||
const txtPassword = form.querySelector('[name="Password"]');
|
||||
const txtPasswordConfirm = form.querySelector('[name="PasswordConfirm"]');
|
||||
const chkUse2FA = form.querySelector('[name="Use2fa"]');
|
||||
const registerSuccess = document.getElementById('registerSuccess');
|
||||
const redirectButton = document.getElementById('redirectButton');
|
||||
const totpMessage = document.querySelector('#totpMessage');
|
||||
const totpImage = document.querySelector('#totpImage');
|
||||
const registerSuccess = document.getElementById('register-success');
|
||||
const btnLogin = document.getElementById('btn-login');
|
||||
const totpMessage = document.querySelector('#totp-message');
|
||||
const totpImage = document.querySelector('#totp-image');
|
||||
const formData = {
|
||||
Username: txtUsername.value,
|
||||
Password: txtPassword.value,
|
||||
@@ -104,14 +107,14 @@
|
||||
Use2fa: chkUse2FA.checked,
|
||||
RegistrationType: form.querySelector('[name="RegistrationType"]').value
|
||||
};
|
||||
const data = await callApiPostAsync('/account/register', formData);
|
||||
const data = await callApiPostAsync('@_urlService.GetAbsoluteUrl("Register", "Auth")', formData);
|
||||
if (data) {
|
||||
txtUsername.value = '';
|
||||
txtPassword.value = '';
|
||||
txtPasswordConfirm.value = '';
|
||||
form.classList.replace('inline', 'hidden');
|
||||
registerSuccess.classList.replace('hidden', 'inline');
|
||||
redirectButton.classList.replace('hidden', 'block');
|
||||
btnLogin.classList.replace('hidden', 'block');
|
||||
if (chkUse2FA.checked) {
|
||||
totpMessage.classList.remove('hidden');
|
||||
totpMessage.classList.add('block');
|
||||
@@ -124,11 +127,11 @@
|
||||
});
|
||||
document.querySelector('[name="Use2fa"]').addEventListener('change', function () {
|
||||
const isChecked = this.checked;
|
||||
document.querySelector('#register2FaAttention').classList.replace(
|
||||
document.getElementById('#register-two-fa-attention').classList.replace(
|
||||
isChecked ? 'inline' : 'hidden',
|
||||
isChecked ? 'hidden' : 'inline'
|
||||
);
|
||||
document.querySelector('#hiddenUseTwoFa').value = isChecked.toString();
|
||||
document.getElementById('#hidden-use-two-fa').value = isChecked.toString();
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
@using Lumina.Presentation.Web.Common.Enums.Notifications
|
||||
@using Lumina.Presentation.Web.Common.Exceptions
|
||||
@using Lumina.Presentation.Web.Common.Models.FileSystemManagement
|
||||
@using Lumina.Presentation.Web.Common.Models.UI
|
||||
@using Microsoft.AspNetCore.Components
|
||||
@using System.Text.Json
|
||||
@using System.Text
|
||||
|
||||
@@ -1,31 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - Lumina</title>
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/button.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/checkbox.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/combobox.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/file-system-browser.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/file-system-tree-view-node.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/navigation-menu.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/notification.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/textbox.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/Lumina.Presentation.Web.styles.css" asp-append-version="true" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<header>
|
||||
@await Html.PartialAsync("_NavMenu")
|
||||
</header>
|
||||
<main role="main">
|
||||
<article>
|
||||
@RenderBody()
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - Lumina</title>
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/button.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/checkbox.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/combobox.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/file-system-browser.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/file-system-tree-view-node.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/navigation-menu.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/notification.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/textbox.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/Lumina.Presentation.Web.styles.css" asp-append-version="true" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<header>
|
||||
@await Html.PartialAsync("_NavMenu")
|
||||
</header>
|
||||
<main role="main" style="@(User?.Identity?.IsAuthenticated == false ? "bottom: 0px;" : string.Empty)">
|
||||
<article>
|
||||
@RenderBody()
|
||||
<div id="modal-background-article"></div>
|
||||
</article>
|
||||
</main>
|
||||
</article>
|
||||
</main>
|
||||
@if (User?.Identity?.IsAuthenticated == true)
|
||||
|
||||
{
|
||||
<!--Audio player-->
|
||||
<div class="audio-player-container">
|
||||
<video controls
|
||||
@@ -33,15 +36,16 @@
|
||||
height="50" width="600">
|
||||
<source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
|
||||
</video>
|
||||
<a id="audio-player-full-height-toggle">Toggle Full Height</a>
|
||||
<a id="audio-player-close">Toggle Visibility</a>
|
||||
<a id="audio-player-full-height-toggle">Toggle Full Height</a>
|
||||
<a id="audio-player-close">Toggle Visibility</a>
|
||||
</div>
|
||||
</div>
|
||||
<!--Modal grid background-->
|
||||
<div id="modal-background-menu"></div>
|
||||
}
|
||||
</div>
|
||||
<!--Modal grid background-->
|
||||
<div id="modal-background-menu"></div>
|
||||
|
||||
<script defer src="~/js/notifications.js" asp-append-version="true"></script>
|
||||
<script defer src="~/js/site.js" asp-append-version="true"></script>
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
</body>
|
||||
<script defer src="~/js/notifications.js" asp-append-version="true"></script>
|
||||
<script defer src="~/js/site.js" asp-append-version="true"></script>
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +1,7 @@
|
||||
@using Lumina.Presentation.Web.Common.Services
|
||||
|
||||
@inject IUrlService _urlService
|
||||
|
||||
<input type="checkbox" id="hamburger-input" class="burger-shower" />
|
||||
<label id="hamburger-menu" for="hamburger-input">
|
||||
<span></span>
|
||||
@@ -9,45 +13,59 @@
|
||||
Account
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="account/login"><span>Login</span></a></li>
|
||||
<li><a href="account/logout"><span>Logout</span></a></li>
|
||||
<li><a href="account/register"><span>Register</span></a></li>
|
||||
<li><a href="account"><span>My Account</span></a></li>
|
||||
</ul>
|
||||
<div class="mobile-menu-heading">
|
||||
Tools
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="tools/options"><span>Options</span></a></li>
|
||||
</ul>
|
||||
<div class="mobile-menu-heading">
|
||||
Library
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="library/manage"><span>Manage libraries</span></a></li>
|
||||
<li><a href="library/manage/item"><span>Add media library</span></a></li>
|
||||
</ul>
|
||||
<div class="mobile-menu-heading">
|
||||
Written Content
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="library/written-content-library/books-library/books" class="nav-link"><span>Books</span></a></li>
|
||||
<li><a href="library/written-content/magazines"><span>Magazines</span></a></li>
|
||||
</ul>
|
||||
<div class="mobile-menu-heading">
|
||||
Audio
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="library/audio/music"><span>Music</span></a></li>
|
||||
<li><a href="library/audio/interviews"><span>Interviews</span></a></li>
|
||||
</ul>
|
||||
<div class="mobile-menu-heading">
|
||||
Video
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="library/video/movies"><span>Movies</span></a></li>
|
||||
<li><a href="library/video/tvshows"><span>TV Shows</span></a></li>
|
||||
@if (User?.Identity?.IsAuthenticated == false)
|
||||
{
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("Login", "Auth")"><span>Login</span></a></li>
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("Login", "Auth")"><span>Recover Password</span></a></li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("Logout", "Auth")"><span>Logout</span></a></li>
|
||||
}
|
||||
@if (User?.Identity?.IsAuthenticated == true)
|
||||
{
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("Login", "Auth")"><span>Register</span></a></li>
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("Login", "Auth")"><span>Change Password</span></a></li>
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("Login", "Auth")"><span>Profile</span></a></li>
|
||||
}
|
||||
</ul>
|
||||
@if (User?.Identity?.IsAuthenticated == true)
|
||||
{
|
||||
<div class="mobile-menu-heading">
|
||||
Tools
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="tools/options"><span>Options</span></a></li>
|
||||
</ul>
|
||||
<div class="mobile-menu-heading">
|
||||
Library
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="library/manage"><span>Manage libraries</span></a></li>
|
||||
<li><a href="library/manage/item"><span>Add media library</span></a></li>
|
||||
</ul>
|
||||
<div class="mobile-menu-heading">
|
||||
Written Content
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="library/written-content-library/books-library/books" class="nav-link"><span>Books</span></a></li>
|
||||
<li><a href="library/written-content/magazines"><span>Magazines</span></a></li>
|
||||
</ul>
|
||||
<div class="mobile-menu-heading">
|
||||
Audio
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="library/audio/music"><span>Music</span></a></li>
|
||||
<li><a href="library/audio/interviews"><span>Interviews</span></a></li>
|
||||
</ul>
|
||||
<div class="mobile-menu-heading">
|
||||
Video
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="library/video/movies"><span>Movies</span></a></li>
|
||||
<li><a href="library/video/tvshows"><span>TV Shows</span></a></li>
|
||||
</ul>
|
||||
}
|
||||
<div class="mobile-menu-heading">
|
||||
Help
|
||||
</div>
|
||||
@@ -64,48 +82,62 @@
|
||||
<input type="radio" id="account-menu" name="menu">
|
||||
<label for="account-menu">Account</label>
|
||||
<ul>
|
||||
<li><a href="account/login">Login</a></li>
|
||||
<li><a href="account/logout">Logout</a></li>
|
||||
<li><a href="account/register">Register</a></li>
|
||||
<li><a href="account">My Account</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li tabindex="0">
|
||||
<input type="radio" id="tools-menu" name="menu">
|
||||
<label for="tools-menu">Tools</label>
|
||||
<ul>
|
||||
<li><a href="tools/options">Options</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li tabindex="0">
|
||||
<input type="radio" id="library-menu" name="menu">
|
||||
<label for="library-menu">Library</label>
|
||||
<ul>
|
||||
<li tabindex="0"><a href="library/manage">Manage libraries</a></li>
|
||||
<li tabindex="0"><a href="library/manage/item">Add new library</a></li>
|
||||
<li class="has-submenu" tabindex="0">
|
||||
<label>Written Content</label>
|
||||
<ul>
|
||||
<li><a href="library/written-content-library/books-library/books" class="nav-link">Books</a></li>
|
||||
<li><a href="library/written-content/magazines">Magazines</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has-submenu" tabindex="0">
|
||||
<label>Audio</label>
|
||||
<ul>
|
||||
<li><a href="library/audio/music">Music</a></li>
|
||||
<li><a href="library/audio/interviews">Interviews</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has-submenu" tabindex="0">
|
||||
<label>Video</label>
|
||||
<ul>
|
||||
<li><a href="library/video/movies">Movies</a></li>
|
||||
<li><a href="library/video/tvshows">TV Shows</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@if (User?.Identity?.IsAuthenticated == false)
|
||||
{
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("Login", "Auth")">Login</a></li>
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("RecoverPassword", "Auth")">Recover Password</a></li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("Logout", "Auth")">Logout</a></li>
|
||||
}
|
||||
@if (User?.Identity?.IsAuthenticated == true)
|
||||
{
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("Register", "Auth")">Register</a></li>
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("ChangePassword", "Auth")">Change Password</a></li>
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("Profile", "Auth")">Profile</a></li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
@if (User?.Identity?.IsAuthenticated == true)
|
||||
{
|
||||
<li tabindex="0">
|
||||
<input type="radio" id="tools-menu" name="menu">
|
||||
<label for="tools-menu">Tools</label>
|
||||
<ul>
|
||||
<li><a href="tools/options">Options</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li tabindex="0">
|
||||
<input type="radio" id="library-menu" name="menu">
|
||||
<label for="library-menu">Library</label>
|
||||
<ul>
|
||||
<li tabindex="0"><a href="library/manage">Manage libraries</a></li>
|
||||
<li tabindex="0"><a href="library/manage/item">Add new library</a></li>
|
||||
<li class="has-submenu" tabindex="0">
|
||||
<label>Written Content</label>
|
||||
<ul>
|
||||
<li><a href="library/written-content-library/books-library/books" class="nav-link">Books</a></li>
|
||||
<li><a href="library/written-content/magazines">Magazines</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has-submenu" tabindex="0">
|
||||
<label>Audio</label>
|
||||
<ul>
|
||||
<li><a href="library/audio/music">Music</a></li>
|
||||
<li><a href="library/audio/interviews">Interviews</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has-submenu" tabindex="0">
|
||||
<label>Video</label>
|
||||
<ul>
|
||||
<li><a href="library/video/movies">Movies</a></li>
|
||||
<li><a href="library/video/tvshows">TV Shows</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
<li tabindex="0">
|
||||
<input type="radio" id="help-menu" name="menu">
|
||||
<label for="help-menu">Help</label>
|
||||
|
||||
Reference in new issue
Block a user