revert(ui): returned back patch-related settings in first run window
This commit is contained in:
parent
5f7aece21d
commit
8057fedac1
1 changed files with 15 additions and 0 deletions
|
@ -24,6 +24,7 @@ pub struct DefaultPathsApp {
|
|||
game_global: PathBuf,
|
||||
game_china: PathBuf,
|
||||
components: PathBuf,
|
||||
patch: PathBuf,
|
||||
temp: PathBuf
|
||||
}
|
||||
|
||||
|
@ -36,6 +37,7 @@ pub enum Folders {
|
|||
GameGlobal,
|
||||
GameChina,
|
||||
Components,
|
||||
Patch,
|
||||
Temp
|
||||
}
|
||||
|
||||
|
@ -179,6 +181,17 @@ impl SimpleAsyncComponent for DefaultPathsApp {
|
|||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Components)
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("patch-folder"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
set_activatable: true,
|
||||
|
||||
#[watch]
|
||||
set_subtitle: model.patch.to_str().unwrap(),
|
||||
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Patch)
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("temp-folder"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
|
@ -275,6 +288,7 @@ impl SimpleAsyncComponent for DefaultPathsApp {
|
|||
game_global: CONFIG.game.path.global.clone(),
|
||||
game_china: CONFIG.game.path.china.clone(),
|
||||
components: CONFIG.components.path.clone(),
|
||||
patch: CONFIG.patch.path.clone(),
|
||||
|
||||
#[allow(clippy::or_fun_call)]
|
||||
temp: CONFIG.launcher.temp.clone().unwrap_or(std::env::temp_dir())
|
||||
|
@ -405,6 +419,7 @@ impl DefaultPathsApp {
|
|||
config.game.path.global = self.game_global.clone();
|
||||
config.game.path.china = self.game_china.clone();
|
||||
config.components.path = self.components.clone();
|
||||
config.patch.path = self.patch.clone();
|
||||
config.launcher.temp = Some(self.temp.clone());
|
||||
|
||||
Config::update_raw(config)
|
||||
|
|
Loading…
Reference in a new issue