feat(ui): OLED dark mode variant (#1560)
This commit is contained in:
+7
-1
@@ -1,4 +1,10 @@
|
||||
<div class="author-card" [class.selected]="isSelected" role="button" tabindex="0" (click)="onCardClick($event)" (keydown.enter)="onCardClick($event)">
|
||||
<div
|
||||
class="author-card surface-card-outline"
|
||||
[class.selected]="isSelected"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="onCardClick($event)"
|
||||
(keydown.enter)="onCardClick($event)">
|
||||
<div class="cover-container">
|
||||
@if (hasPhoto) {
|
||||
<img
|
||||
|
||||
@@ -108,7 +108,10 @@
|
||||
tooltipPosition="top">
|
||||
<i class="pi pi-cog"></i>
|
||||
</a>
|
||||
<p-popover #seriesCollapseOverlay [dismissable]="true" appendTo="body">
|
||||
<p-popover
|
||||
#seriesCollapseOverlay
|
||||
[dismissable]="true"
|
||||
appendTo="body">
|
||||
<div class="display-settings-popover">
|
||||
<div class="display-settings-section">
|
||||
<div class="display-settings-checkbox-row">
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="book-card"
|
||||
<div class="book-card surface-card-outline"
|
||||
[class.selected]="isSelected()"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: color-mix(in srgb, var(--color-primary) 8%, transparent);
|
||||
background: var(--color-active-surface);
|
||||
color: var(--color-primary);
|
||||
|
||||
.command-palette-item-icon {
|
||||
|
||||
+11
@@ -42,6 +42,17 @@
|
||||
</p-select>
|
||||
</div>
|
||||
|
||||
@if (showOledDarkModeToggle()) {
|
||||
<div class="theme-toggle-row">
|
||||
<label class="field-label" for="oled-dark-mode">{{ 'settingsView.theme.oledDarkMode' | transloco }}</label>
|
||||
<p-toggleswitch
|
||||
inputId="oled-dark-mode"
|
||||
[ngModel]="oledDarkMode()"
|
||||
(ngModelChange)="configService.setOledDarkMode($event)">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="form-field">
|
||||
<label class="field-label" for="app-theme">{{ 'layout.theme.theme' | transloco }}</label>
|
||||
<p-select
|
||||
|
||||
+11
@@ -154,6 +154,17 @@ fieldset.form-field {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.theme-toggle-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
|
||||
.field-label {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-actions {
|
||||
margin-top: 0.5rem;
|
||||
|
||||
|
||||
+7
-5
@@ -3,6 +3,7 @@ import {Button} from 'primeng/button';
|
||||
import {AbstractControl, FormBuilder, FormGroup, FormsModule, ReactiveFormsModule, ValidationErrors, ValidatorFn, Validators} from '@angular/forms';
|
||||
import {InputText} from 'primeng/inputtext';
|
||||
import {Password} from 'primeng/password';
|
||||
import {ToggleSwitch} from 'primeng/toggleswitch';
|
||||
import {User, UserService, UserUpdateRequest} from '../user-management/user.service';
|
||||
import {MessageService} from 'primeng/api';
|
||||
import {DynamicDialogRef} from 'primeng/dynamicdialog';
|
||||
@@ -17,8 +18,6 @@ import {
|
||||
AppTheme,
|
||||
CUSTOM_PRIMARY_OPTIONS,
|
||||
CustomPrimary,
|
||||
DEFAULT_APP_THEME,
|
||||
DEFAULT_CUSTOM_PRIMARY,
|
||||
} from '../../../shared/model/app-state.model';
|
||||
|
||||
export const passwordMatchValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {
|
||||
@@ -41,6 +40,7 @@ export const passwordMatchValidator: ValidatorFn = (control: AbstractControl): V
|
||||
InputText,
|
||||
Password,
|
||||
Select,
|
||||
ToggleSwitch,
|
||||
TranslocoDirective,
|
||||
TranslocoPipe,
|
||||
],
|
||||
@@ -66,10 +66,12 @@ export class UserProfileDialogComponent {
|
||||
private readonly t = inject(TranslocoService);
|
||||
private readonly destroyRef = inject(DestroyRef);
|
||||
protected readonly activeLang = toSignal(this.t.langChanges$, {initialValue: this.t.getActiveLang()});
|
||||
protected readonly selectedThemePreference = computed(() => this.configService.appState().themePreference ?? DEFAULT_APP_THEME);
|
||||
protected readonly selectedAppearancePreference = computed(() => this.configService.appState().appearancePreference ?? 'system');
|
||||
protected readonly selectedThemePreference = computed(() => this.configService.appState().themePreference);
|
||||
protected readonly selectedAppearancePreference = computed(() => this.configService.appState().appearancePreference);
|
||||
protected readonly oledDarkMode = computed(() => this.configService.appState().oledDarkMode);
|
||||
protected readonly showOledDarkModeToggle = computed(() => this.configService.effectiveAppearance() === 'dark');
|
||||
protected readonly selectedCustomPrimary = computed<CustomPrimary>(
|
||||
() => this.configService.appState().customPrimary ?? DEFAULT_CUSTOM_PRIMARY,
|
||||
() => this.configService.appState().customPrimary,
|
||||
);
|
||||
protected readonly customPrimaryOptions = CUSTOM_PRIMARY_OPTIONS;
|
||||
protected readonly themeOptions = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user