Skip to content

Commit

Permalink
about
Browse files Browse the repository at this point in the history
  • Loading branch information
wiiznokes committed Nov 9, 2024
1 parent fef6527 commit 1e21ad4
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 22 deletions.
51 changes: 36 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions i18n/en/ui.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ load_temp = load temp
load_speed = load speed
launch_graph_window = Add coordinates
config_saved = Configuration successfully saved
repository = Repository
donate = Donate
issues_tracker = Report an Issue
# Add item description
add_item = Add an item
Expand Down
28 changes: 21 additions & 7 deletions ui/src/settings_drawer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::sync::LazyLock;
use cosmic::{
iced_core::Alignment,
iced_widget::PickList,
widget::{self, button, About, Row, Text},
widget::{self, about::About, button, Row, Text},
Element,
};
use data::{dir_manager::DirManager, settings::AppTheme};
Expand Down Expand Up @@ -64,13 +64,27 @@ fn update_delay(dir_manager: &DirManager) -> Element<'_, AppMsg> {

static ABOUT: LazyLock<About> = LazyLock::new(|| {
About::default()
.set_application_name(APP)
.set_application_icon(APP_ID)
.set_license_type("GPL-3.0-only")
.set_developer_name("wiiznokes")
.set_repository_url("https://github.com/wiiznokes/fan-control")
.name(APP)
.icon(APP_ID)
.license("GPL-3.0-only")
.author("wiiznokes")
.links([
(
fl!("repository"),
"https://github.com/wiiznokes/fan-control",
),
(
fl!("donate"),
"https://www.paypal.com/donate/?hosted_button_id=HV84HZ4G63HQ6",
),
(
fl!("issues_tracker"),
"https://github.com/wiiznokes/fan-control/issues",
),
])
.developers([("wiiznokes", "wiiznokes2@gmail.com")])
});

pub fn about() -> Element<'static, AppMsg> {
widget::about(&ABOUT, |url| AppMsg::OpenUrl(url)).into()
widget::about(&ABOUT, AppMsg::OpenUrl)
}

0 comments on commit 1e21ad4

Please sign in to comment.