fix default theme

This commit is contained in:
2023-12-16 12:56:28 +01:00
parent ee732420d6
commit f21faa3798
2 changed files with 8 additions and 2 deletions

View File

@ -136,7 +136,7 @@ export class AppSettings {
*/ */
public vimMode: boolean = false; public vimMode: boolean = false;
public theme: string = "toposTheme"; public theme: string = "Dracula";
public font: string = "IBM Plex Mono"; public font: string = "IBM Plex Mono";
public font_size: number = 24; public font_size: number = 24;
public universes: Universes; public universes: Universes;

View File

@ -210,7 +210,13 @@ export class Editor {
loadUniverserFromUrl(this); loadUniverserFromUrl(this);
// Set the color scheme for the application // Set the color scheme for the application
let available_themes = Object.keys(colors);
if (this.settings.theme in available_themes) {
this.readTheme(this.settings.theme); this.readTheme(this.settings.theme);
} else {
this.settings.theme = "Dracula";
this.readTheme(this.settings.theme);
}
} }
private getBuffer(type: string): any { private getBuffer(type: string): any {