aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-tauri/src/github/release_notes.rs15
-rw-r--r--src-tauri/src/mod_management/legacy.rs13
-rw-r--r--src-vue/src/i18n/lang/pl.json9
3 files changed, 28 insertions, 9 deletions
diff --git a/src-tauri/src/github/release_notes.rs b/src-tauri/src/github/release_notes.rs
index 6db5b617..16b65183 100644
--- a/src-tauri/src/github/release_notes.rs
+++ b/src-tauri/src/github/release_notes.rs
@@ -58,14 +58,17 @@ pub async fn get_newest_flightcore_version() -> Result<FlightCoreVersion, String
#[tauri::command]
pub async fn check_is_flightcore_outdated() -> Result<bool, String> {
let newest_flightcore_release = get_newest_flightcore_version().await?;
+ // Parse version number excluding leading `v`
+ let newest_version = semver::Version::parse(&newest_flightcore_release.tag_name[1..]).unwrap();
- // Get version of installed FlightCore...
- let version = env!("CARGO_PKG_VERSION");
- // ...and format it
- let version = format!("v{}", version);
+ // Get version of installed FlightCore
+ let current_version = env!("CARGO_PKG_VERSION");
+ let current_version = semver::Version::parse(current_version).unwrap();
- // TODO: This shouldn't be a string compare but promper semver compare
- let is_outdated = version != newest_flightcore_release.tag_name;
+ #[cfg(debug_assertions)]
+ let is_outdated = current_version < newest_version;
+ #[cfg(not(debug_assertions))]
+ let is_outdated = current_version != newest_version;
// If outdated, check how new the update is
if is_outdated {
diff --git a/src-tauri/src/mod_management/legacy.rs b/src-tauri/src/mod_management/legacy.rs
index 91463250..2a5228fc 100644
--- a/src-tauri/src/mod_management/legacy.rs
+++ b/src-tauri/src/mod_management/legacy.rs
@@ -88,7 +88,7 @@ pub fn parse_installed_mods(
}
};
// Get Thunderstore mod string if it exists
- let thunderstore_mod_string = match parsed_mod_json.thunderstore_mod_string {
+ let mut thunderstore_mod_string = match parsed_mod_json.thunderstore_mod_string {
// Attempt legacy method for getting Thunderstore string first
Some(ts_mod_string) => Some(ts_mod_string),
// Legacy method failed
@@ -100,6 +100,17 @@ pub fn parse_installed_mods(
// Get directory path
let mod_directory = directory.to_str().unwrap().to_string();
+ // This is a stupid way to show a legacy installed mod as outdated by simply giving back a wrong version number
+ if thunderstore_mod_string.is_some() {
+ // Parse the string
+ let mut parsed_string: ParsedThunderstoreModString =
+ thunderstore_mod_string.clone().unwrap().parse().unwrap();
+ // Set version number to `0.0.0`
+ parsed_string.version = "0.0.0".to_string();
+ // And store new string back in original variable
+ thunderstore_mod_string = Some(parsed_string.to_string())
+ }
+
let ns_mod = NorthstarMod {
name: parsed_mod_json.name,
version: parsed_mod_json.version,
diff --git a/src-vue/src/i18n/lang/pl.json b/src-vue/src/i18n/lang/pl.json
index c9c632b7..f13d9ae3 100644
--- a/src-vue/src/i18n/lang/pl.json
+++ b/src-vue/src/i18n/lang/pl.json
@@ -107,11 +107,16 @@
"reinstall_text": "Proszę czekać",
"reinstall_success": "Pomyślnie przeinstalowano Northstar",
"title": "Okno naprawy FlightCore",
- "warning": "To okno zawiera różne funkcje do naprawy typowych problemów z Northstar i FlightCore."
+ "warning": "To okno zawiera różne funkcje do naprawy typowych problemów z Northstar i FlightCore.",
+ "disable_modsettings": "Wyłącz moda ModSettings",
+ "disable_modsettings_success": "Wyłączono moda ModSettings"
}
},
"nb_ts_mods_per_page_desc1": "Ma to wpływ na wydajność wyświetlania podczas przeglądania modów Thunderstore.",
- "open_game_folder": "Otwórz folder"
+ "open_game_folder": "Otwórz folder",
+ "show_deprecated_mods_desc2": "Ostrożnie, mody są zazwyczaj oznaczone jako przestarzałe nie bez powodu.",
+ "show_deprecated_mods": "Pokaż przestarzałe mody Thunderstore",
+ "show_deprecated_mods_desc1": "Pozwala to zobaczyć przestarzałe mody w kolekcji modów online."
},
"notification": {
"game_folder": {