Settings Service
class SettingsService
settings.service.ts
import {
Injectable,
Signal,
WritableSignal,
computed,
effect,
inject,
signal,
untracked,
} from '@angular/core';
import { DEFAULT_SETTINGS } from '@jet/constants/default-settings.constant';
import { LocalStorageKey } from '@jet/enums/local-storage-key.enum';
import { ColorSchemeOption } from '@jet/interfaces/color-scheme-option.interface';
import { LanguageOption } from '@jet/interfaces/language-option.interface';
import { Settings } from '@jet/interfaces/settings.interface';
import { LoggerService } from '../logger/logger.service';
import { StorageService } from '../storage/storage.service';
@Injectable({
providedIn: 'root',
})
export class SettingsService {
private readonly _loggerService = inject(LoggerService);
private readonly _storageService = inject(StorageService);
private readonly _settings: WritableSignal<Settings>;
public readonly colorSchemeOption: Signal<ColorSchemeOption>;
public readonly languageOption: Signal<LanguageOption>;
public constructor() {
// Buy to unlock
}
public get settings(): Signal<Settings> {
// Buy to unlock
}
public updateSettings(partialSettings: Partial<Settings>): void {
// Buy to unlock
}
}
Last updated
Was this helpful?