mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
fix config stuff
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user