feat: add brand mark component and dashboard page
- Introduced a new `BrandMark` component for branding purposes. - Created a `DashboardPage` component with a responsive layout, including sections for user profile, apartment management, and API demo. - Added styles for the dashboard page to enhance user experience. - Implemented a settings page with theme preferences and session management features. - Developed a sign-in page with branding and user-friendly design. - Established a workspace navigation component for easy access to different sections of the application. - Implemented an `ApartmentService` for managing apartment data with corresponding unit tests. - Created a `ConfigService` for loading application configuration. - Added a `ThemeService` to manage user theme preferences dynamically.
This commit is contained in:
1 parent
3e552cad90
commit
26ab037084
37 files changed
+1877
-1650
No files matched your search
@@ -0,0 +1,195 @@
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
.page-section {
|
||||
animation: page-in 180ms ease-out;
|
||||
}
|
||||
@keyframes page-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(4px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
.page-heading {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.page-heading h1 {
|
||||
margin-bottom: 8px;
|
||||
font-size: clamp(2rem, 7vw, 3.2rem);
|
||||
font-weight: 750;
|
||||
letter-spacing: -0.055em;
|
||||
line-height: 1.02;
|
||||
}
|
||||
.page-heading > div > p:last-child {
|
||||
margin-bottom: 0;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
.status-pill,
|
||||
.role-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
border-radius: 999px;
|
||||
background: var(--surface-accent);
|
||||
color: var(--accent-strong);
|
||||
font-size: 0.76rem;
|
||||
font-weight: 750;
|
||||
}
|
||||
.status-pill {
|
||||
gap: 7px;
|
||||
margin-top: 18px;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
.status-pill span {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
}
|
||||
.dashboard-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 16px;
|
||||
}
|
||||
.feature-card {
|
||||
padding: 22px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 22px;
|
||||
background: var(--surface);
|
||||
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
|
||||
}
|
||||
.feature-card h2 {
|
||||
margin-bottom: 9px;
|
||||
font-size: 1.35rem;
|
||||
letter-spacing: -0.035em;
|
||||
}
|
||||
.feature-card p:not(.eyebrow) {
|
||||
color: var(--text-muted);
|
||||
line-height: 1.55;
|
||||
}
|
||||
.feature-card-primary {
|
||||
display: grid;
|
||||
gap: 18px;
|
||||
border-color: transparent;
|
||||
background: var(--surface-accent);
|
||||
}
|
||||
.feature-card-primary .mat-mdc-button {
|
||||
--mdc-text-button-label-text-color: var(--accent-strong);
|
||||
width: fit-content;
|
||||
padding-inline: 0;
|
||||
font-weight: 750;
|
||||
}
|
||||
.feature-icon {
|
||||
display: grid;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
place-items: center;
|
||||
border-radius: 16px;
|
||||
background: var(--surface);
|
||||
color: var(--accent);
|
||||
}
|
||||
.feature-icon svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.user-profile {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
.large-avatar {
|
||||
display: grid;
|
||||
width: 58px;
|
||||
height: 58px;
|
||||
flex: 0 0 58px;
|
||||
place-items: center;
|
||||
border-radius: 50%;
|
||||
background: var(--surface-accent);
|
||||
color: var(--accent);
|
||||
font-size: 1.25rem;
|
||||
font-weight: 800;
|
||||
}
|
||||
.user-details {
|
||||
min-width: 0;
|
||||
}
|
||||
.user-details h3 {
|
||||
margin-bottom: 3px;
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
.user-email {
|
||||
overflow: hidden;
|
||||
margin-bottom: 11px;
|
||||
font-size: 0.84rem;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.role-chip {
|
||||
padding: 5px 9px;
|
||||
}
|
||||
.api-demo-section {
|
||||
display: grid;
|
||||
gap: 16px;
|
||||
}
|
||||
.api-actions .mat-mdc-outlined-button {
|
||||
--mdc-outlined-button-label-text-color: var(--accent);
|
||||
--mdc-outlined-button-outline-color: var(--border-strong);
|
||||
border-radius: 12px;
|
||||
}
|
||||
.api-response-wrapper {
|
||||
padding: 14px;
|
||||
border-radius: 13px;
|
||||
background: var(--surface-soft);
|
||||
}
|
||||
.api-response-wrapper > span {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
color: var(--text-subtle);
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.api-response-code {
|
||||
color: var(--accent-strong);
|
||||
font-size: 0.83rem;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
@media (min-width: 700px) {
|
||||
.page-heading {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 28px;
|
||||
}
|
||||
.dashboard-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
.feature-card-primary,
|
||||
.api-demo-section {
|
||||
grid-column: span 2;
|
||||
}
|
||||
}
|
||||
@media (min-width: 960px) {
|
||||
.dashboard-grid {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
.feature-card-primary {
|
||||
grid-column: span 2;
|
||||
min-height: 250px;
|
||||
}
|
||||
.user-profile {
|
||||
grid-column: span 1;
|
||||
}
|
||||
.api-demo-section {
|
||||
grid-column: span 3;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
}
|
||||
.api-response-wrapper {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<section class="page-section dashboard-page">
|
||||
<header class="page-heading">
|
||||
<div>
|
||||
<p class="eyebrow">Bonjour {{ username() }}</p>
|
||||
<h1>Tableau de bord</h1>
|
||||
<p>Retrouvez rapidement les actions utiles à votre gestion locative.</p>
|
||||
</div>
|
||||
<span class="status-pill"><span></span>Espace sécurisé</span>
|
||||
</header>
|
||||
<div class="dashboard-grid">
|
||||
<article class="feature-card feature-card-primary">
|
||||
<div class="feature-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">
|
||||
<path d="M4 21V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16M2 21h20" />
|
||||
<path d="M8 8h8M8 12h8M8 16h4" />
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<p class="eyebrow">Votre portefeuille</p>
|
||||
<h2>{{ apartmentCount() }} appartement{{ apartmentCount() > 1 ? 's' : '' }}</h2>
|
||||
<p>Centralisez les informations essentielles de vos biens.</p>
|
||||
</div>
|
||||
<button mat-button type="button" (click)="apartmentsRequested.emit()">
|
||||
Gérer mes appartements
|
||||
</button>
|
||||
</article>
|
||||
<article class="feature-card user-profile">
|
||||
<div class="large-avatar">{{ userInitial() }}</div>
|
||||
<div class="user-details">
|
||||
<p class="eyebrow">Compte actif</p>
|
||||
<h3>{{ username() }}</h3>
|
||||
<p class="user-email">{{ email() }}</p>
|
||||
<span class="role-chip">Bailleur connecté</span>
|
||||
</div>
|
||||
</article>
|
||||
<article class="feature-card api-demo-section">
|
||||
<div>
|
||||
<p class="eyebrow">État du service</p>
|
||||
<h2>Connexion au serveur</h2>
|
||||
<p>Vérifiez que votre espace communique correctement avec le service sécurisé.</p>
|
||||
</div>
|
||||
<div class="api-actions">
|
||||
<button mat-stroked-button type="button" (click)="connectionCheckRequested.emit()">
|
||||
Tester la connexion
|
||||
</button>
|
||||
</div>
|
||||
@if (helloMessage()) {
|
||||
<div class="api-response-wrapper">
|
||||
<span>Réponse du serveur</span><code class="api-response-code">{{ helloMessage() }}</code>
|
||||
</div>
|
||||
}
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Component, input, output } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard-page',
|
||||
imports: [MatButtonModule],
|
||||
templateUrl: './dashboard-page.html',
|
||||
styleUrl: './dashboard-page.css',
|
||||
})
|
||||
export class DashboardPage {
|
||||
readonly username = input.required<string>();
|
||||
readonly email = input.required<string>();
|
||||
readonly userInitial = input.required<string>();
|
||||
readonly apartmentCount = input.required<number>();
|
||||
readonly helloMessage = input.required<string>();
|
||||
readonly apartmentsRequested = output<void>();
|
||||
readonly connectionCheckRequested = output<void>();
|
||||
}
|
||||
Reference in new issue
Block a user