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 theme: string = "toposTheme";
public theme: string = "Dracula";
public font: string = "IBM Plex Mono";
public font_size: number = 24;
public universes: Universes;

View File

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