From d2bc7e6c6b27ed01385f9338fb1483a725de3f8d Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Thu, 22 Aug 2024 10:40:13 +0300 Subject: [PATCH] add info about target disk and fs --- locales/en_US.json | 3 +++ src/installation_summary_page/mod.rs | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/locales/en_US.json b/locales/en_US.json index f046d8e..b0acd44 100644 --- a/locales/en_US.json +++ b/locales/en_US.json @@ -106,6 +106,9 @@ "install_confirm_detail_partition_method_type_subtitle_automatic": "Automatic", "install_confirm_detail_partition_method_type_subtitle_manual_luks": "Manual w/ LUKS", "install_confirm_detail_partition_method_type_subtitle_manual": "Manual", + "install_confirm_detail_partition_method_automatic_target_title": "Automatic Partitioning Target Disk", + "install_confirm_detail_partition_method_automatic_target_subtitle": "{DISK} (WILL BE WIPED CLEAN!)", + "install_confirm_detail_partition_method_automatic_target_fs_title": "Automatic Partitioning Target Disk Filesystem", "mounted_on_detail": " mounted on ", "install_target_detail": "Install Target:", "install_confirm_button_label": "Confirm & Install PikaOS" diff --git a/src/installation_summary_page/mod.rs b/src/installation_summary_page/mod.rs index 8880629..8c795be 100644 --- a/src/installation_summary_page/mod.rs +++ b/src/installation_summary_page/mod.rs @@ -82,6 +82,10 @@ pub fn installation_summary_page( #[strong] partition_method_automatic_luks_enabled_refcell, #[strong] + partition_method_automatic_target_fs_refcell, + #[strong] + partition_method_automatic_target_refcell, + #[strong] partition_method_manual_luks_enabled_refcell, move|_, action_arg| { @@ -138,6 +142,23 @@ pub fn installation_summary_page( .build(); install_confirm_detail_partition_method_type.add_css_class("property"); installation_summary_row_viewport_listbox.append(&install_confirm_detail_partition_method_type); + // + if &*partition_method_type_refcell.borrow().as_str() == "automatic" { + let install_confirm_detail_partition_method_automatic_target = adw::ActionRow::builder() + .title(t!("install_confirm_detail_partition_method_automatic_target_title")) + .subtitle(strfmt::strfmt(&t!("install_confirm_detail_partition_method_automatic_target_subtitle"), &std::collections::HashMap::from([("DISK".to_string(), partition_method_automatic_target_refcell.borrow().as_str())])).unwrap()) + .build(); + install_confirm_detail_partition_method_automatic_target.add_css_class("property"); + installation_summary_row_viewport_listbox.append(&install_confirm_detail_partition_method_automatic_target); + // + let install_confirm_detail_partition_method_automatic_target_fs = adw::ActionRow::builder() + .title(t!("install_confirm_detail_partition_method_automatic_target_fs_title")) + .subtitle(partition_method_automatic_target_fs_refcell.borrow().to_uppercase()) + .build(); + install_confirm_detail_partition_method_automatic_target_fs.add_css_class("property"); + installation_summary_row_viewport_listbox.append(&install_confirm_detail_partition_method_automatic_target_fs); + // + } } } )