feat(core): implemented SDK 1.4.0
This commit is contained in:
parent
ec57b8f922
commit
eaaeffb523
4 changed files with 11 additions and 17 deletions
12
Cargo.lock
generated
12
Cargo.lock
generated
|
@ -48,8 +48,8 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anime-game-core"
|
||||
version = "1.9.0"
|
||||
source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.9.0#74f8e4ac00ad60ba5106f386529155b65afa1622"
|
||||
version = "1.10.0"
|
||||
source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.10.0#d30663c31e505f304f392d0058d659ffa9cb36f0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bzip2",
|
||||
|
@ -73,8 +73,8 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anime-launcher-sdk"
|
||||
version = "1.3.0"
|
||||
source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.3.0#e1f864c7fbb5175541c70ed236d7d313ca855538"
|
||||
version = "1.4.0"
|
||||
source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.4.0#1ecc5ec822cd163042b9b50459067c924fcb5828"
|
||||
dependencies = [
|
||||
"anime-game-core",
|
||||
"anyhow",
|
||||
|
@ -1744,9 +1744,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "minreq"
|
||||
version = "2.8.0"
|
||||
version = "2.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb6c6973f78ef55d0e5fc04fdb8f9ad67c87c9e86bca0ff77b6a3102b0eb36b7"
|
||||
checksum = "3de406eeb24aba36ed3829532fa01649129677186b44a49debec0ec574ca7da7"
|
||||
dependencies = [
|
||||
"base64 0.12.3",
|
||||
"log",
|
||||
|
|
|
@ -17,7 +17,7 @@ glib-build-tools = "0.17"
|
|||
|
||||
[dependencies.anime-launcher-sdk]
|
||||
git = "https://github.com/an-anime-team/anime-launcher-sdk"
|
||||
tag = "1.3.0"
|
||||
tag = "1.4.0"
|
||||
features = ["all", "star-rail"]
|
||||
|
||||
# path = "../anime-launcher-sdk" # ! for dev purposes only
|
||||
|
|
|
@ -40,7 +40,7 @@ lazy_static::lazy_static! {
|
|||
/// This one is used to prepare some launcher UI components on start
|
||||
pub static ref CONFIG: Schema = Config::get().expect("Failed to load config");
|
||||
|
||||
pub static ref GAME: Game = Game::new(CONFIG.game.path.for_edition(CONFIG.launcher.edition));
|
||||
pub static ref GAME: Game = Game::new(CONFIG.game.path.for_edition(CONFIG.launcher.edition), CONFIG.launcher.edition);
|
||||
|
||||
/// Path to launcher folder. Standard is `$HOME/.local/share/anime-game-launcher`
|
||||
pub static ref LAUNCHER_FOLDER: PathBuf = launcher_dir().expect("Failed to get launcher folder");
|
||||
|
@ -162,9 +162,6 @@ fn main() {
|
|||
}}
|
||||
", BACKGROUND_FILE.to_string_lossy()));
|
||||
|
||||
// Set game edition
|
||||
CONFIG.launcher.edition.select();
|
||||
|
||||
// Set UI language
|
||||
let lang = CONFIG.launcher.language.parse().expect("Wrong language format used in config");
|
||||
|
||||
|
|
|
@ -230,9 +230,6 @@ impl SimpleAsyncComponent for GeneralApp {
|
|||
_ => unreachable!()
|
||||
};
|
||||
|
||||
// Select new game edition
|
||||
config.launcher.edition.select();
|
||||
|
||||
Config::update(config);
|
||||
|
||||
sender.output(PreferencesAppMsg::UpdateLauncherState);
|
||||
|
@ -265,7 +262,7 @@ impl SimpleAsyncComponent for GeneralApp {
|
|||
#[watch]
|
||||
set_text: &match model.game_diff.as_ref() {
|
||||
Some(diff) => match diff {
|
||||
VersionDiff::Latest(current) |
|
||||
VersionDiff::Latest { version: current, .. } |
|
||||
VersionDiff::Predownload { current, .. } |
|
||||
VersionDiff::Diff { current, .. } |
|
||||
VersionDiff::Outdated { current, .. } => current.to_string(),
|
||||
|
@ -279,7 +276,7 @@ impl SimpleAsyncComponent for GeneralApp {
|
|||
#[watch]
|
||||
set_css_classes: match model.game_diff.as_ref() {
|
||||
Some(diff) => match diff {
|
||||
VersionDiff::Latest(_) => &["success"],
|
||||
VersionDiff::Latest { .. } => &["success"],
|
||||
VersionDiff::Predownload { .. } => &["accent"],
|
||||
VersionDiff::Diff { .. } => &["warning"],
|
||||
VersionDiff::Outdated { .. } => &["error"],
|
||||
|
@ -292,7 +289,7 @@ impl SimpleAsyncComponent for GeneralApp {
|
|||
#[watch]
|
||||
set_tooltip_text: Some(&match model.game_diff.as_ref() {
|
||||
Some(diff) => match diff {
|
||||
VersionDiff::Latest(_) => String::new(),
|
||||
VersionDiff::Latest { .. } => String::new(),
|
||||
VersionDiff::Predownload { current, latest, .. } => tr_args("game-predownload-available", [
|
||||
("old", current.to_string().into()),
|
||||
("new", latest.to_string().into())
|
||||
|
|
Loading…
Reference in a new issue