mirror of
https://github.com/bitwarden/browser
synced 2026-02-28 18:43:26 +00:00
* update extension autofill concerns to use theme object and type over enum * mark ThemeType enum as deprecated * update theming service concerns to use theme object and type over enum
23 lines
825 B
TypeScript
23 lines
825 B
TypeScript
import { Observable, Subscription } from "rxjs";
|
|
|
|
import { Theme } from "@bitwarden/common/platform/enums";
|
|
|
|
/**
|
|
* A service for managing and observing the current application theme.
|
|
*/
|
|
// FIXME: Rename to ThemingService
|
|
export abstract class AbstractThemingService {
|
|
/**
|
|
* The effective theme based on the user configured choice and the current system theme if
|
|
* the configured choice is {@link ThemeTypes.System}.
|
|
*/
|
|
abstract theme$: Observable<Theme>;
|
|
/**
|
|
* Listens for effective theme changes and applies changes to the provided document.
|
|
* @param document The document that should have theme classes applied to it.
|
|
*
|
|
* @returns A subscription that can be unsubscribed from to cancel the application of theme classes.
|
|
*/
|
|
abstract applyThemeChangesTo(document: Document): Subscription;
|
|
}
|