1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

[deps] Autofill: Update prettier to v3 (#7014)

* [deps] Autofill: Update prettier to v3

* prettier formatting updates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
This commit is contained in:
renovate[bot]
2023-11-29 16:15:20 -05:00
committed by GitHub
parent 4ff5f38e89
commit 28de9439be
1145 changed files with 5898 additions and 5612 deletions

View File

@@ -7,7 +7,10 @@ export class ThemeBuilder implements Theme {
return this.configuredTheme != ThemeType.System ? this.configuredTheme : this.systemTheme;
}
constructor(readonly configuredTheme: ThemeType, readonly systemTheme: ThemeType) {}
constructor(
readonly configuredTheme: ThemeType,
readonly systemTheme: ThemeType,
) {}
updateSystemTheme(systemTheme: ThemeType): ThemeBuilder {
return new ThemeBuilder(this.configuredTheme, systemTheme);

View File

@@ -19,14 +19,14 @@ export class ThemingService implements AbstractThemingService {
constructor(
private stateService: StateService,
@Inject(WINDOW) private window: Window,
@Inject(DOCUMENT) private document: Document
@Inject(DOCUMENT) private document: Document,
) {
this.monitorThemeChanges();
}
async monitorThemeChanges(): Promise<void> {
this._theme.next(
new ThemeBuilder(await this.stateService.getTheme(), await this.getSystemTheme())
new ThemeBuilder(await this.stateService.getTheme(), await this.getSystemTheme()),
);
this.monitorConfiguredThemeChanges();
this.monitorSystemThemeChanges();
@@ -47,7 +47,7 @@ export class ThemingService implements AbstractThemingService {
"theme_" + ThemeType.Light,
"theme_" + ThemeType.Dark,
"theme_" + ThemeType.Nord,
"theme_" + ThemeType.SolarizedDark
"theme_" + ThemeType.SolarizedDark,
);
this.document.documentElement.classList.add("theme_" + theme.effectiveTheme);
});
@@ -64,7 +64,7 @@ export class ThemingService implements AbstractThemingService {
protected monitorSystemThemeChanges(): void {
fromEvent<MediaQueryListEvent>(
window.matchMedia("(prefers-color-scheme: dark)"),
"change"
"change",
).subscribe((event) => {
this.updateSystemTheme(event.matches ? ThemeType.Dark : ThemeType.Light);
});