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,150 @@
|
||||
: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;
|
||||
}
|
||||
.settings-card {
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 22px;
|
||||
background: var(--surface);
|
||||
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
|
||||
}
|
||||
.settings-card h2 {
|
||||
margin-bottom: 9px;
|
||||
font-size: 1.35rem;
|
||||
letter-spacing: -0.035em;
|
||||
}
|
||||
.settings-card p:not(.eyebrow) {
|
||||
color: var(--text-muted);
|
||||
line-height: 1.55;
|
||||
}
|
||||
.settings-copy {
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
padding: 22px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.settings-icon {
|
||||
display: grid;
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
flex: 0 0 46px;
|
||||
place-items: center;
|
||||
border-radius: 16px;
|
||||
background: var(--surface-accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
.settings-icon svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.settings-copy h2 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.settings-copy p:last-child {
|
||||
margin-bottom: 0;
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
.theme-options {
|
||||
display: grid;
|
||||
padding: 8px;
|
||||
}
|
||||
.theme-options mat-radio-button {
|
||||
border-radius: 14px;
|
||||
}
|
||||
.theme-options mat-radio-button:hover {
|
||||
background: var(--surface-soft);
|
||||
}
|
||||
.theme-option-copy {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 12px 8px;
|
||||
}
|
||||
.theme-option-copy strong {
|
||||
color: var(--text);
|
||||
}
|
||||
.theme-option-copy small {
|
||||
margin-top: 3px;
|
||||
color: var(--text-muted);
|
||||
white-space: normal;
|
||||
}
|
||||
.session-settings {
|
||||
margin-top: 16px;
|
||||
}
|
||||
.session-action {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 18px;
|
||||
padding: 22px;
|
||||
}
|
||||
.session-action > div {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex-direction: column;
|
||||
}
|
||||
.session-action strong,
|
||||
.session-action span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.session-action span {
|
||||
margin-top: 3px;
|
||||
color: var(--text-muted);
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
.session-action .mat-mdc-outlined-button {
|
||||
--mdc-outlined-button-label-text-color: var(--danger);
|
||||
--mdc-outlined-button-outline-color: var(--border-strong);
|
||||
border-radius: 12px;
|
||||
}
|
||||
@media (min-width: 700px) {
|
||||
.page-heading {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 28px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 960px) {
|
||||
.settings-card {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
|
||||
}
|
||||
.settings-copy {
|
||||
border-right: 1px solid var(--border);
|
||||
border-bottom: 0;
|
||||
}
|
||||
.session-action {
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<section class="page-section settings-page">
|
||||
<header class="page-heading">
|
||||
<div>
|
||||
<p class="eyebrow">Préférences</p>
|
||||
<h1>Réglages</h1>
|
||||
<p>Adaptez LMNP Organizer à votre façon de travailler.</p>
|
||||
</div>
|
||||
</header>
|
||||
<article class="settings-card" aria-labelledby="appearance-heading">
|
||||
<div class="settings-copy">
|
||||
<span class="settings-icon" aria-hidden="true"
|
||||
><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">
|
||||
<path d="M12 3a9 9 0 1 0 9 9c0-.5-.04-1-.12-1.47A7 7 0 0 1 12 3Z" /></svg
|
||||
></span>
|
||||
<div>
|
||||
<p class="eyebrow">Interface</p>
|
||||
<h2 id="appearance-heading">Apparence</h2>
|
||||
<p>Le réglage est mémorisé uniquement sur cet appareil.</p>
|
||||
</div>
|
||||
</div>
|
||||
<mat-radio-group
|
||||
class="theme-options"
|
||||
aria-label="Thème de l'application"
|
||||
[value]="themePreference()"
|
||||
(change)="themePreferenceChanged.emit($event.value)"
|
||||
>
|
||||
<mat-radio-button value="light"
|
||||
><span class="theme-option-copy"
|
||||
><strong>Clair</strong><small>Une interface lumineuse et douce.</small></span
|
||||
></mat-radio-button
|
||||
>
|
||||
<mat-radio-button value="dark"
|
||||
><span class="theme-option-copy"
|
||||
><strong>Sombre</strong><small>Un contraste réduit en faible lumière.</small></span
|
||||
></mat-radio-button
|
||||
>
|
||||
<mat-radio-button value="system"
|
||||
><span class="theme-option-copy"
|
||||
><strong>Système</strong><small>Suit automatiquement votre appareil.</small></span
|
||||
></mat-radio-button
|
||||
>
|
||||
</mat-radio-group>
|
||||
</article>
|
||||
<article
|
||||
class="settings-card session-settings"
|
||||
data-testid="session-settings"
|
||||
aria-labelledby="session-heading"
|
||||
>
|
||||
<div class="settings-copy">
|
||||
<span class="settings-icon" aria-hidden="true"
|
||||
><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">
|
||||
<circle cx="12" cy="8" r="4" />
|
||||
<path d="M4 21a8 8 0 0 1 16 0" /></svg
|
||||
></span>
|
||||
<div>
|
||||
<p class="eyebrow">Compte</p>
|
||||
<h2 id="session-heading">Session</h2>
|
||||
<p>Gérez la session ouverte sur cet appareil.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="session-action">
|
||||
<div>
|
||||
<strong>{{ username() }}</strong
|
||||
><span>{{ email() }}</span>
|
||||
</div>
|
||||
<button mat-stroked-button type="button" (click)="logoutRequested.emit()">Déconnexion</button>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Component, input, output } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { ThemePreference } from '../../services/theme.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-settings-page',
|
||||
imports: [MatButtonModule, MatRadioModule],
|
||||
templateUrl: './settings-page.html',
|
||||
styleUrl: './settings-page.css',
|
||||
})
|
||||
export class SettingsPage {
|
||||
readonly username = input.required<string>();
|
||||
readonly email = input.required<string>();
|
||||
readonly themePreference = input.required<ThemePreference>();
|
||||
readonly themePreferenceChanged = output<ThemePreference>();
|
||||
readonly logoutRequested = output<void>();
|
||||
}
|
||||
Reference in new issue
Block a user