mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2024-11-22 21:02:44 +03:00
feat(ui): added components index path selection to initial setup
This commit is contained in:
parent
578f475ab8
commit
2427faa089
8 changed files with 36 additions and 14 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -76,7 +76,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anime-launcher-sdk"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
dependencies = [
|
||||
"anime-game-core",
|
||||
"anyhow",
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 6565e300309a89f859fd62d2b626ca84675d9ae8
|
||||
Subproject commit 219d0f7704e18d74a9205163ffbb7d1718291ea4
|
|
@ -37,6 +37,7 @@ runners-folder = Runners-Ordner
|
|||
dxvks-folder = DXVKs-Ordner
|
||||
wine-prefix-folder = Wine prefix-Ordner
|
||||
game-installation-folder = Spiel-Installationsordner
|
||||
components-index = Komponentenverzeichnis
|
||||
patch-folder = Patch-Ordner
|
||||
temp-folder = Temp-Ordner
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ runners-folder = Runners folder
|
|||
dxvks-folder = DXVKs folder
|
||||
wine-prefix-folder = Wine prefix folder
|
||||
game-installation-folder = Game installation folder
|
||||
components-index = Components index
|
||||
patch-folder = Patch folder
|
||||
temp-folder = Temp folder
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ runners-folder = Emplacement des runners
|
|||
dxvks-folder = Emplacement des versions de DXVK
|
||||
wine-prefix-folder = Emplacement du préfix wine
|
||||
game-installation-folder = Emplacement d'installation du jeu
|
||||
components-index = Indice des composants
|
||||
patch-folder = Emplacement du patch
|
||||
temp-folder = Dossier temporaire
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ runners-folder = Папка версий Wine
|
|||
dxvks-folder = Папка версий DXVK
|
||||
wine-prefix-folder = Папка префикса Wine
|
||||
game-installation-folder = Путь установки игры
|
||||
components-index = Индекс компонентов
|
||||
patch-folder = Папка скачивания патча
|
||||
temp-folder = Временная папка
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ runners-folder = 运行程序文件夹
|
|||
dxvks-folder = DXVK 文件夹
|
||||
wine-prefix-folder = Wine prefix 文件夹
|
||||
game-installation-folder = 游戏安装文件夹
|
||||
components-index = 成分指数
|
||||
patch-folder = 补丁文件夹
|
||||
temp-folder = 临时文件夹
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ pub struct DefaultPathsApp {
|
|||
dxvks: PathBuf,
|
||||
prefix: PathBuf,
|
||||
game: PathBuf,
|
||||
components: PathBuf,
|
||||
patch: PathBuf,
|
||||
temp: PathBuf
|
||||
}
|
||||
|
@ -30,6 +31,7 @@ pub enum Folders {
|
|||
DXVK,
|
||||
Prefix,
|
||||
Game,
|
||||
Components,
|
||||
Patch,
|
||||
Temp
|
||||
}
|
||||
|
@ -145,6 +147,17 @@ impl SimpleAsyncComponent for DefaultPathsApp {
|
|||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Game)
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr("components-index"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
set_activatable: true,
|
||||
|
||||
#[watch]
|
||||
set_subtitle: model.components.to_str().unwrap(),
|
||||
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Components)
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr("patch-folder"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
|
@ -208,6 +221,7 @@ impl SimpleAsyncComponent for DefaultPathsApp {
|
|||
dxvks: CONFIG.game.dxvk.builds.clone(),
|
||||
prefix: CONFIG.game.wine.prefix.clone(),
|
||||
game: CONFIG.game.path.clone(),
|
||||
components: CONFIG.components.path.clone(),
|
||||
patch: CONFIG.patch.path.clone(),
|
||||
|
||||
#[allow(clippy::or_fun_call)]
|
||||
|
@ -237,6 +251,7 @@ impl SimpleAsyncComponent for DefaultPathsApp {
|
|||
self.dxvks = result.join("dxvks");
|
||||
self.prefix = result.join("game");
|
||||
self.game = result.join("game/drive_c/Program Files/Genshin Impact");
|
||||
self.components = result.join("components");
|
||||
self.patch = result.join("patch");
|
||||
self.temp = result.join("temp");
|
||||
|
||||
|
@ -247,6 +262,7 @@ impl SimpleAsyncComponent for DefaultPathsApp {
|
|||
Folders::DXVK => self.dxvks = result,
|
||||
Folders::Prefix => self.prefix = result,
|
||||
Folders::Game => self.game = result,
|
||||
Folders::Components => self.components = result,
|
||||
Folders::Patch => self.patch = result,
|
||||
Folders::Temp => self.temp = result
|
||||
}
|
||||
|
@ -278,6 +294,7 @@ impl DefaultPathsApp {
|
|||
config.game.dxvk.builds = self.dxvks.clone();
|
||||
config.game.wine.prefix = self.prefix.clone();
|
||||
config.game.path = self.game.clone();
|
||||
config.components.path = self.components.clone();
|
||||
config.patch.path = self.patch.clone();
|
||||
config.launcher.temp = Some(self.temp.clone());
|
||||
|
||||
|
|
Loading…
Reference in a new issue