Config system

This commit is contained in:
2025-07-21 20:04:21 -07:00
parent b7d07f5b90
commit 669199137e
6 changed files with 98 additions and 5 deletions

14
src/types/NormalConfig.ts Normal file
View File

@@ -0,0 +1,14 @@
import { SettingsType } from './SettingsType'
export class NormalConfig {
constructor (
public version: string,
public settings: SettingsType = new SettingsType()
) {}
static import (data: any) {
const cfg = new NormalConfig(data.version)
Object.assign(cfg.settings, data.settings)
return cfg
}
}

View File

@@ -0,0 +1,6 @@
export class SettingsType {
constructor (
public checkForNewVersionOnLoad: boolean = true,
public useWineOnUnixWhenNeeded: boolean = false
) {}
}