Config system
This commit is contained in:
14
src/types/NormalConfig.ts
Normal file
14
src/types/NormalConfig.ts
Normal 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
|
||||
}
|
||||
}
|
||||
6
src/types/SettingsType.ts
Normal file
6
src/types/SettingsType.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export class SettingsType {
|
||||
constructor (
|
||||
public checkForNewVersionOnLoad: boolean = true,
|
||||
public useWineOnUnixWhenNeeded: boolean = false
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user