mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-21 16:20:22 +00:00
trabajando en usuarios
This commit is contained in:
@ -47,3 +47,10 @@ spring.web.resources.chain.enabled=true
|
||||
spring.web.resources.chain.strategy.content.enabled=true
|
||||
spring.web.resources.chain.strategy.content.paths=/assets/**
|
||||
|
||||
|
||||
#
|
||||
# Session timeout
|
||||
#
|
||||
server.servlet.session.timeout=30m
|
||||
|
||||
security.rememberme.key=N`BY^YRVO:/\H$hsKxNq
|
||||
@ -6,4 +6,13 @@ app.cancelar=Cancelar
|
||||
app.guardar=Guardar
|
||||
app.editar=Editar
|
||||
app.eliminar=Eliminar
|
||||
app.imprimir=Imprimir
|
||||
app.imprimir=Imprimir
|
||||
|
||||
app.bienvenido=Bienvenido
|
||||
app.perfil=Perfil
|
||||
app.mensajes=Mensajes
|
||||
app.logout=Cerrar sesión
|
||||
|
||||
app.sidebar.inicio=Inicio
|
||||
app.sidebar.usuarios=Usuarios
|
||||
app.sidebar.configuracion=Configuración
|
||||
@ -1 +1,14 @@
|
||||
login.login=Iniciar sesión
|
||||
login.login=Iniciar sesión
|
||||
login.welcome=Bienvenido
|
||||
login.subtitle=Inicia sesión para continuar:
|
||||
login.email=Correo electrónico
|
||||
login.password=Contraseña
|
||||
login.forgotPassword=¿Olvidaste tu contraseña?
|
||||
login.rememberMe=Recuérdame
|
||||
login.submit=Enviar
|
||||
login.error=Correo electrónico o contraseña incorrectos.
|
||||
login.slogan=imprimelibros.com<br>Especialistas en impresión de libros
|
||||
login.email-placeholder=Introduce tu correo electrónico
|
||||
login.password-placeholder=Introduce tu contraseña
|
||||
login.new-account=¿No tienes una cuenta?
|
||||
login.sign-up=Regístrate
|
||||
@ -3460,7 +3460,7 @@ File: Main Css File
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0.7;
|
||||
opacity: 0.4;
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
@ -12726,16 +12726,18 @@ span.flatpickr-weekday {
|
||||
padding: 2px 16px;
|
||||
}
|
||||
|
||||
/*.auth-bg-cover {
|
||||
/*background: linear-gradient(-45deg, #432874 50%, #984c0c);
|
||||
}*/
|
||||
/* Imagen de fondo completa */
|
||||
.auth-bg-cover {
|
||||
background: url("../images/cover-bg-login.png") center center / cover no-repeat;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* El overlay que tapa la imagen */
|
||||
.auth-bg-cover > .bg-overlay {
|
||||
/*background-image: url("../images/cover-pattern.png");*/
|
||||
background-image: url("../images/cover-bg-login.png");
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
opacity: 1;
|
||||
background-color: transparent;
|
||||
/*background: none !important; /* quítalo si no quieres oscuridad */
|
||||
/* O bien hazlo más sutil, ejemplo: */
|
||||
background: rgba(0,0,0,0.10) !important;
|
||||
}
|
||||
.auth-bg-cover .footer {
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<html th:lang="${#locale.language}" th:with="isAuth=${#authorization.expression('isAuthenticated()')}"
|
||||
th:attrappend="data-layout=${isAuth} ? 'semibox' : 'horizontal'" data-sidebar-visibility="show" data-topbar="light"
|
||||
data-sidebar="light" data-sidebar-size="lg" data-sidebar-image="none" data-preloader="disable"
|
||||
xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
|
||||
xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
|
||||
|
||||
<head>
|
||||
<th:block layout:fragment="pagetitle" />
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
<div th:fragment="_login">
|
||||
<div class="p-lg-5 p-4">
|
||||
<div>
|
||||
<h5 class="text-primary" th:text="#{login.welcome}">¡Bienvenido!</h5>
|
||||
<p class="text-muted" th:text="#{login.subtitle}">Inicie sesión para continuar:</p>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<form th:action="@{/login}" method="post">
|
||||
<!-- CSRF obligatorio -->
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label" th:text="#{login.email}">Correo electrónico</label>
|
||||
<input type="email" class="form-control" id="username" th:placeholder="#{login.email-placeholder}"
|
||||
name="username">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="float-end">
|
||||
<a href="/auth-pass-reset-cover" class="text-muted" th:text="#{login.forgotPassword}">¿Olvidó su
|
||||
contraseña?</a>
|
||||
</div>
|
||||
<label class="form-label" for="password-input" th:text="#{login.password}">Contraseña</label>
|
||||
<div class="position-relative auth-pass-inputgroup mb-3">
|
||||
<input type="password" class="form-control pe-5 password-input"
|
||||
th:placeholder="#{login.password-placeholder}" id="password-input" name="password">
|
||||
<button
|
||||
class="btn btn-link position-absolute end-0 top-0 text-decoration-none text-muted password-addon"
|
||||
type="button" id="password-addon"><i class="ri-eye-fill align-middle"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="remember-me" name="remember-me">
|
||||
<label class="form-check-label" for="remember-me"
|
||||
th:text="#{login.rememberMe}">Recuerdame</label>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<button class="btn btn-secondary w-100" type="submit" th:text="#{login.login}">Iniciar
|
||||
Sesión</button>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="mt-5 text-center">
|
||||
<p class="mb-0">
|
||||
<span th:text="#{login.new-account}">¿No tienes una cuenta?</span>
|
||||
<a th:href="@{/auth-signup-cover}" class="fw-semibold text-primary text-decoration-underline"
|
||||
th:text="#{login.sign-up}">
|
||||
Regístrate
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,12 +1,11 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" lang="en"
|
||||
data-layout="vertical" data-topbar="light" data-sidebar="dark" data-sidebar-size="lg" data-sidebar-image="none"
|
||||
data-preloader="disable">
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
th:lang="${#locale.language}" data-layout="vertical" data-topbar="light" data-sidebar="dark" data-sidebar-size="lg"
|
||||
data-sidebar-image="none" data-preloader="disable">
|
||||
|
||||
<head>
|
||||
<!--page title-->
|
||||
<!-- <div th:replace="partials/title-meta :: title-meta('Sign In')"></div> -->
|
||||
<title>Login - ImprimeLibros</title>
|
||||
<th:block layout:fragment="pagetitle" />
|
||||
|
||||
<!-- Page CSS -->
|
||||
<th:block th:replace="~{imprimelibros/partials/head-css :: head-css}" />
|
||||
@ -23,13 +22,14 @@
|
||||
<div class="card overflow-hidden">
|
||||
<div class="row g-0">
|
||||
<div class="col-lg-6">
|
||||
<div class="p-lg-5 p-4 auth-one-bg h-100">
|
||||
<div class="p-lg-1 p-1 auth-one-bg h-100">
|
||||
<div class="bg-overlay"></div>
|
||||
<div class="position-relative h-100 d-flex flex-column">
|
||||
<div class="position-relative h-100 d-flex flex-column justify-content-end">
|
||||
<div class="mt-auto">
|
||||
|
||||
<p class="fs-15 fst-italic text-center" style="color: lightgray;">imprimelibros.com <br>
|
||||
Los especialistas en impresión de libros</p>
|
||||
<p class="fs-18 fst-italic text-center" style="color: lightgray;"
|
||||
th:utext="#{login.slogan}">
|
||||
imprimelibros.com<br>
|
||||
Especialistas en impresión de libros</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -37,61 +37,9 @@
|
||||
<!-- end col -->
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div class="p-lg-5 p-4">
|
||||
<div>
|
||||
<h5 class="text-primary">Bienvenido!</h5>
|
||||
<p class="text-muted">Inicie sesión para continuar:</p>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<form th:action="@{/login}" method="post">
|
||||
<!-- CSRF obligatorio -->
|
||||
<input type="hidden" th:name="${_csrf.parameterName}"
|
||||
th:value="${_csrf.token}" />
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Usuario</label>
|
||||
<input type="text" class="form-control" id="username"
|
||||
placeholder="Enter username">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="float-end">
|
||||
<a href="/auth-pass-reset-cover" class="text-muted">¿Olvidó su contraseña?</a>
|
||||
</div>
|
||||
<label class="form-label" for="password-input">Contraseña</label>
|
||||
<div class="position-relative auth-pass-inputgroup mb-3">
|
||||
<input type="password" class="form-control pe-5 password-input"
|
||||
placeholder="Enter password" id="password-input">
|
||||
<button
|
||||
class="btn btn-link position-absolute end-0 top-0 text-decoration-none text-muted password-addon"
|
||||
type="button" id="password-addon"><i
|
||||
class="ri-eye-fill align-middle"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value=""
|
||||
id="auth-remember-check">
|
||||
<label class="form-check-label" for="auth-remember-check">Recuerdame</label>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<button class="btn btn-secondary w-100" type="submit">Iniciar
|
||||
Sesión</button>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="mt-5 text-center">
|
||||
<p class="mb-0">¿No tienes una cuenta? <a href="/auth-signup-cover"
|
||||
class="fw-semibold text-primary text-decoration-underline">
|
||||
Regístrate</a> </p>
|
||||
</div>
|
||||
</div>
|
||||
<div th:insert="~{${'imprimelibros/login/_items/' + form} :: ${form}}"></div>
|
||||
</div>
|
||||
|
||||
<!-- end col -->
|
||||
</div>
|
||||
<!-- end row -->
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<img src="/assets/images/logo-sm.png" alt="" height="22">
|
||||
</span>
|
||||
<span class="logo-lg">
|
||||
<img src="/assets/images/logo-dark.png" alt="" height="17">
|
||||
<img src="/assets/images/logo-dark.png" alt="" height="45">
|
||||
</span>
|
||||
</a>
|
||||
<!-- Light Logo-->
|
||||
@ -18,11 +18,12 @@
|
||||
<img src="/assets/images/logo-sm.png" alt="" height="22">
|
||||
</span>
|
||||
<span class="logo-lg">
|
||||
<img src="/assets/images/logo-light.png" alt="" height="17">
|
||||
<img src="/assets/images/logo-light.png" alt="" height="45">
|
||||
</span>
|
||||
</a>
|
||||
<button type="button" class="btn btn-sm p-0 fs-20 header-item float-end btn-vertical-sm-hover"
|
||||
id="vertical-hover">
|
||||
id="vertical-hover"
|
||||
href="/#" data-bs-toggle="tooltip" data-bs-placement="right" title="Expand">
|
||||
<i class="ri-record-circle-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
@ -32,14 +33,24 @@
|
||||
|
||||
<div id="two-column-menu">
|
||||
</div>
|
||||
<li href="/" class="menu-title"><span data-key="t-menu">Menu</span></li>
|
||||
<ul class="navbar-nav" id="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="/">
|
||||
<i class="ri-home-line"></i> <span data-key="t-home">Inicio</span>
|
||||
<i class="ri-home-line"></i> <span th:text="#{app.sidebar.inicio}">Inicio</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- <div th:replace="~{printhub/partials/sidebarMenus/configurationMenu :: configuration}"></div> -->
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="/">
|
||||
<i class="ri-user-line"></i> <span th:text="#{app.sidebar.usuarios}">Usuarios</span>
|
||||
</a>
|
||||
</li>
|
||||
<div th:if="${#authentication.principal.role == 'SUPERADMIN'}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="/">
|
||||
<i class="ri-settings-2-line"></i> <span th:text="#{app.sidebar.configuracion}">Configuración</span>
|
||||
</a>
|
||||
</li>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Sidebar -->
|
||||
|
||||
@ -69,46 +69,31 @@
|
||||
<div class="dropdown ms-sm-3 header-item topbar-user">
|
||||
<button type="button" class="btn" id="page-header-user-dropdown" data-bs-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
<span class="d-flex align-items-center">
|
||||
<img class="rounded-circle header-profile-user"
|
||||
src="/assets/images/users/avatar-1.jpg" alt="Header Avatar">
|
||||
<span class="text-start ms-xl-2">
|
||||
<span class="d-none d-xl-inline-block ms-1 fw-medium user-name-text">Anna
|
||||
Adame</span>
|
||||
<span
|
||||
class="d-none d-xl-block ms-1 fs-12 text-muted user-name-sub-text">Founder</span>
|
||||
</span>
|
||||
<span sec:authorize="isAuthenticated()" class="text-center ms-xl-2">
|
||||
<span class="d-none d-xl-inline-block ms-1 fw-medium user-name-text"
|
||||
th:text="${#authentication.principal.fullname}">Nombre</span>
|
||||
<div th:if="${#authentication.principal.role != 'USER'}">
|
||||
<span class="d-none d-xl-block ms-1 fs-12 text-muted user-name-sub-text"
|
||||
th:text="${#authentication.principal.role}">Rol</span>
|
||||
</div>
|
||||
</span>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<!-- item-->
|
||||
<h6 class="dropdown-header">Welcome Anna!</h6>
|
||||
<h6 class="dropdown-header"><span th:text="#{app.bienvenido}">Bienvenido</span> <span
|
||||
th:text="${#authentication.principal.fullname}">User</span> <span>!</span></h6>
|
||||
<a class="dropdown-item" href="/pages-profile"><i
|
||||
class="mdi mdi-account-circle text-muted fs-16 align-middle me-1"></i> <span
|
||||
class="align-middle">Profile</span></a>
|
||||
class="align-middle" th:text="#{app.perfil}">Perfil</span></a>
|
||||
<a class="dropdown-item" href="/apps-chat"><i
|
||||
class="mdi mdi-message-text-outline text-muted fs-16 align-middle me-1"></i>
|
||||
<span class="align-middle">Messages</span></a>
|
||||
<a class="dropdown-item" href="/apps-tasks-kanban"><i
|
||||
class="mdi mdi-calendar-check-outline text-muted fs-16 align-middle me-1"></i>
|
||||
<span class="align-middle">Taskboard</span></a>
|
||||
<a class="dropdown-item" href="/pages-faqs"><i
|
||||
class="mdi mdi-lifebuoy text-muted fs-16 align-middle me-1"></i> <span
|
||||
class="align-middle">Help</span></a>
|
||||
<span class="align-middle" th:text="#{app.mensajes}">Mensajes</span></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="/pages-profile"><i
|
||||
class="mdi mdi-wallet text-muted fs-16 align-middle me-1"></i> <span
|
||||
class="align-middle">Balance : <b>$5971.67</b></span></a>
|
||||
<a class="dropdown-item" href="/pages-profile-settings"><span
|
||||
class="badge bg-soft-success text-success mt-1 float-end">New</span><i
|
||||
class="mdi mdi-cog-outline text-muted fs-16 align-middle me-1"></i> <span
|
||||
class="align-middle">Settings</span></a>
|
||||
<a class="dropdown-item" href="auth-lockscreen-basic"><i
|
||||
class="mdi mdi-lock text-muted fs-16 align-middle me-1"></i> <span
|
||||
class="align-middle">Lock screen</span></a>
|
||||
<a class="dropdown-item" href="auth-logout-basic"><i
|
||||
class="mdi mdi-logout text-muted fs-16 align-middle me-1"></i> <span
|
||||
class="align-middle" data-key="t-logout">Logout</span></a>
|
||||
<a class="dropdown-item" href="#"
|
||||
onclick="document.getElementById('logoutForm').submit(); return false;">
|
||||
<i class="mdi mdi-logout text-muted fs-16 align-middle me-1"></i>
|
||||
<span class="align-middle" data-key="t-logout" th:text="#{app.logout}">Cerrar sesión</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -122,6 +107,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="logoutForm" th:action="@{/logout}" method="post" class="d-none">
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
||||
</form>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user