Conectar dialog by kind of source; plain-language canvas; login page and guard; loading indicators as the old app; survival curves of her clinical scenarios in the CaMa record
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import { Component, input } from '@angular/core';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
|
||||
/** What a page or a figure shows while its data comes, as the old app did: a progress bar
|
||||
* named for what loads, "Cargando …" in words, and for a figure the place it will take. */
|
||||
@Component({
|
||||
selector: 'app-loading',
|
||||
imports: [MatProgressBarModule],
|
||||
template: `
|
||||
<mat-progress-bar mode="indeterminate" [attr.aria-label]="'Cargando ' + what()" />
|
||||
<p class="state" role="status">{{ text() || 'Cargando ' + what() + '…' }}</p>
|
||||
@if (figure()) {
|
||||
<div class="skeleton" aria-hidden="true"></div>
|
||||
}
|
||||
`,
|
||||
styles: `
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
:host(.figure) {
|
||||
min-height: 12rem;
|
||||
}
|
||||
.state {
|
||||
color: var(--color-text-secondary);
|
||||
font-size: 0.875rem;
|
||||
margin: 8px 0;
|
||||
}
|
||||
.skeleton {
|
||||
background: var(--color-border);
|
||||
border-radius: 10px;
|
||||
flex: 1;
|
||||
min-height: 10rem;
|
||||
opacity: 0.35;
|
||||
}
|
||||
`,
|
||||
host: { '[class.figure]': 'figure()' },
|
||||
})
|
||||
export class Loading {
|
||||
/** What is loading, in words: "los indicadores", "la figura". */
|
||||
readonly what = input.required<string>();
|
||||
/** The whole line instead ("Calculando los indicadores…"). */
|
||||
readonly text = input('');
|
||||
/** A figure's skeleton under the bar. */
|
||||
readonly figure = input(false);
|
||||
}
|
||||
Reference in New Issue
Block a user