mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-11-21 20:36:01 +03:00
feat(ui): fixed app version display in changelog
This commit is contained in:
parent
032e6be582
commit
3b8ec10938
1 changed files with 10 additions and 13 deletions
|
@ -1,12 +1,19 @@
|
|||
use relm4::prelude::*;
|
||||
use gtk::prelude::*;
|
||||
|
||||
use crate::APP_VERSION;
|
||||
use anime_launcher_sdk::VERSION as SDK_VERSION;
|
||||
use anime_launcher_sdk::anime_game_core::VERSION as CORE_VERSION;
|
||||
|
||||
use crate::*;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
pub static ref APP_VERSION: String = if crate::APP_DEBUG && !crate::APP_VERSION.contains('-') {
|
||||
format!("{}-dev", crate::APP_VERSION)
|
||||
} else {
|
||||
crate::APP_VERSION.to_string()
|
||||
};
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct AboutDialog {
|
||||
visible: bool
|
||||
|
@ -33,17 +40,7 @@ impl SimpleComponent for AboutDialog {
|
|||
set_issue_url: "https://github.com/an-anime-team/an-anime-game-launcher/issues",
|
||||
|
||||
set_license_type: gtk::License::Gpl30,
|
||||
|
||||
set_version: &{
|
||||
// Debug build & build's version doesn't contain any suffix (-dev, -beta, etc)
|
||||
if crate::APP_DEBUG && !APP_VERSION.contains('-') {
|
||||
format!("{APP_VERSION}-dev")
|
||||
}
|
||||
|
||||
else {
|
||||
APP_VERSION.to_string()
|
||||
}
|
||||
},
|
||||
set_version: &APP_VERSION,
|
||||
|
||||
set_developers: &[
|
||||
"Nikita Podvirnyy https://github.com/krypt0nn"
|
||||
|
@ -79,7 +76,7 @@ impl SimpleComponent for AboutDialog {
|
|||
format!("cairo: {}", gtk::cairo::version_string()),
|
||||
].join("\n"),
|
||||
|
||||
set_release_notes_version: APP_VERSION,
|
||||
set_release_notes_version: &APP_VERSION,
|
||||
set_release_notes: &[
|
||||
"<p>Added</p>",
|
||||
|
||||
|
|
Loading…
Reference in a new issue