Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

集成 CommandPalette 和 ThemePalette #75

Merged
merged 11 commits into from
Mar 11, 2021
Prev Previous commit
Next Next commit
feat: add getColorTheme method
  • Loading branch information
wewoor committed Mar 11, 2021
commit 867d91bd0007afbfe4c33362ec489e49fbcf5ddd
7 changes: 7 additions & 0 deletions src/services/theme/colorThemeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export interface IColorThemeService {
applyTheme(id: string): void;
getThemes(): IColorTheme[];
getThemeById(id: string): void;
/**
* Get the current Color Theme
*/
getColorTheme(): IColorTheme;
}

const BUILT_IN_THEME: IColorTheme = {
Expand All @@ -48,6 +52,9 @@ export class ColorThemeService implements IColorThemeService {
this.colorTheme = colorTheme;
this.init();
}
getColorTheme(): IColorTheme {
return this.colorTheme;
}

public init() {
this.applyTheme(this.colorTheme.id);
Expand Down