fix config stuff

This commit is contained in:
SpikeHD
2022-05-13 22:55:58 -07:00
parent e95b65f167
commit 939242254e
3 changed files with 24 additions and 20 deletions

View File

@@ -14,10 +14,26 @@ let defaultConfig: Configuration
grasscutter_with_game: false,
grasscutter_path: roamingAppData + '\\cultivation\\grasscutter.jar',
close_action: 0,
startup_launch: false
startup_launch: false,
last_ip: '',
last_port: '',
}
})()
/**
* 'close_action': 0 = close, 1 = tray
*/
export interface Configuration {
toggle_grasscutter: boolean
game_install_path: string
grasscutter_with_game: boolean
grasscutter_path: string
close_action: number
startup_launch: boolean
last_ip: string
last_port: string
}
export async function setConfigOption(key: string, value: any): Promise<void> {
const config = await getConfig()
@@ -91,15 +107,3 @@ async function writeConfigFile(raw: string) {
contents: raw
})
}
/**
* 'close_action': 0 = close, 1 = tray
*/
export interface Configuration {
toggle_grasscutter: boolean
game_install_path: string
grasscutter_with_game: boolean
grasscutter_path: string
close_action: number
startup_launch: boolean
}