Add custom themes

This commit is contained in:
Geomitron
2024-07-11 23:10:34 -05:00
parent 2e08dec589
commit cb6e51be24
12 changed files with 347 additions and 37 deletions

View File

@@ -1,5 +1,7 @@
import { app, dialog, OpenDialogOptions, shell } from 'electron'
import fsExtra from 'fs-extra'
import { ThemeColors } from '../../src-shared/interfaces/theme.interface.js'
import { mainWindow } from '../main.js'
/**
@@ -48,3 +50,11 @@ export function showFile(filePath: string) {
export async function getPlatform() {
return process.platform
}
export async function getThemeColors(path: string) {
try {
return await fsExtra.readJson(path) as ThemeColors
} catch (err) {
return null
}
}