feat(auth): login screen and domain-scoped navigation
Session login against /auth/*, with a guard on every route and an interceptor that returns to the login on 401. The header, the import workspace and both governance panels only offer the account's own domains (auth/dominios.ts), and a batch opens on the account's database. The sign-in screen follows the app's palette: logo above the title, the action button in the shared tokens, and no register or password-recovery rows.
This commit is contained in:
+42
-23
@@ -1,33 +1,52 @@
|
||||
<div class="app-shell" [class.app-shell--workspace]="workspace()" [class.app-shell--indicadores]="!!activeDomain()">
|
||||
<header class="site-header">
|
||||
<div class="site-header__content">
|
||||
<a class="brand" routerLink="/" aria-label="ISSSTELEON, inicio">
|
||||
<img src="assets/branding/isssteleon-logo.png" alt="ISSSTELEON" />
|
||||
</a>
|
||||
@if (activeDomain(); as domain) {
|
||||
<span class="platform-title">{{ title }}</span>
|
||||
@defer (on immediate) {
|
||||
<app-domain-selector [actual]="domain" [otros]="otherDomains()" [labels]="domainLabels" />
|
||||
} @placeholder {
|
||||
<!-- Same size as the selector until its code arrives, so the header does not jump. -->
|
||||
<span class="domain-selector domain-selector--espera" aria-hidden="true">{{ domainLabels[domain] }}</span>
|
||||
}
|
||||
} @else {
|
||||
<nav class="site-header__nav" aria-label="Secciones">
|
||||
<a class="site-header__section" routerLink="/">Análisis de información</a>
|
||||
@if (breadcrumb(); as crumb) {
|
||||
<span class="site-header__crumb" aria-current="page">› {{ crumb }}</span>
|
||||
@if (!sinCromo()) {
|
||||
<header class="site-header">
|
||||
<div class="site-header__content">
|
||||
<a class="brand" routerLink="/" aria-label="ISSSTELEON, inicio">
|
||||
<img src="assets/branding/isssteleon-logo.png" alt="ISSSTELEON" />
|
||||
</a>
|
||||
@if (activeDomain(); as domain) {
|
||||
<span class="platform-title">{{ title }}</span>
|
||||
@if (otherDomains().length) {
|
||||
@defer (on immediate) {
|
||||
<app-domain-selector [actual]="domain" [otros]="otherDomains()" [labels]="domainLabels" />
|
||||
} @placeholder {
|
||||
<!-- Same size as the selector until its code arrives, so the header does not jump. -->
|
||||
<span class="domain-selector domain-selector--espera" aria-hidden="true">{{ domainLabels[domain] }}</span>
|
||||
}
|
||||
} @else {
|
||||
<!-- An account with a single domain has nothing to switch to: the domain is a label. -->
|
||||
<span class="domain-selector domain-selector--espera">{{ domainLabels[domain] }}</span>
|
||||
}
|
||||
</nav>
|
||||
}
|
||||
</div>
|
||||
</header>
|
||||
} @else {
|
||||
<nav class="site-header__nav" aria-label="Secciones">
|
||||
<a class="site-header__section" routerLink="/">Análisis de información</a>
|
||||
@if (breadcrumb(); as crumb) {
|
||||
<span class="site-header__crumb" aria-current="page">› {{ crumb }}</span>
|
||||
}
|
||||
</nav>
|
||||
}
|
||||
@if (usuario(); as sesion) {
|
||||
<button
|
||||
class="site-header__salir"
|
||||
type="button"
|
||||
(click)="salir()"
|
||||
[attr.title]="'Cerrar sesión de ' + sesion.nombre"
|
||||
[attr.aria-label]="'Cerrar sesión de ' + sesion.nombre"
|
||||
>
|
||||
<mat-icon aria-hidden="true">logout</mat-icon>
|
||||
<span class="site-header__salir-nombre">{{ sesion.nombre }}</span>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
</header>
|
||||
}
|
||||
|
||||
<main class="app-main">
|
||||
<router-outlet />
|
||||
</main>
|
||||
|
||||
@if (!workspace()) {
|
||||
@if (!workspace() && !sinCromo()) {
|
||||
<footer class="site-footer">
|
||||
<div class="site-footer__content">
|
||||
<img src="assets/branding/isssteleon-logo.png" alt="ISSSTELEON" />
|
||||
|
||||
Reference in New Issue
Block a user