chore(ui): move theme/language preferences into user profile (#1243)

This commit is contained in:
Alex
2026-05-10 10:33:35 +01:00
committed by GitHub
parent 7de39b8ef4
commit 868e8e6262
15 changed files with 199 additions and 341 deletions
@@ -22,6 +22,71 @@
</div>
<div class="form-container">
<div class="form-section preferences-section">
<h3 class="section-title">
<i class="pi pi-language" aria-hidden="true"></i>
{{ 'settingsView.language.sectionTitle' | transloco }}
</h3>
<p-select
size="small"
[options]="languageOptions"
[ngModel]="activeLang()"
(ngModelChange)="onLanguageChange($event)"
optionLabel="label"
optionValue="value"
appendTo="body"
class="language-select">
</p-select>
</div>
<div class="gradient-divider"></div>
<div class="form-section preferences-section">
<div class="preference-group">
<h3 class="section-title">
<i class="pi pi-palette" aria-hidden="true"></i>
{{ 'settingsView.theme.sectionTitle' | transloco }}
</h3>
<div class="theme-row">
<span class="theme-row-label">{{ 'layout.theme.primary' | transloco }}</span>
<div class="color-swatches">
@for (primaryColor of primaryColors; track primaryColor.name) {
<button
type="button"
[title]="primaryColor.name"
[attr.aria-label]="primaryColor.name"
[attr.aria-pressed]="primaryColor.name === selectedPrimaryColor()"
(click)="updateThemeColor($event, 'primary', primaryColor)"
[ngClass]="{ 'active-color': primaryColor.name === selectedPrimaryColor() }"
[style]="{ 'background-color': primaryColor.name === 'noir' ? 'var(--text-color)' : primaryColor.palette['500'] || 'transparent' }">
</button>
}
</div>
</div>
<div class="theme-row">
<span class="theme-row-label">{{ 'layout.theme.surface' | transloco }}</span>
<div class="color-swatches">
@for (surface of surfaces; track surface.name) {
<button
type="button"
[title]="surface.name"
[attr.aria-label]="surface.name"
[attr.aria-pressed]="selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : surface.name === 'zinc'"
(click)="updateThemeColor($event, 'surface', surface)"
[ngClass]="{ 'active-color': selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : surface.name === 'zinc' }"
[style]="{ 'background-color': surface.name === 'noir' ? 'var(--text-color)' : surface.palette['500'] }">
</button>
}
</div>
</div>
</div>
</div>
<div class="gradient-divider"></div>
<div class="form-section">
<h3 class="section-title">
<i class="pi pi-id-card"></i>