Add fstab rows

This commit is contained in:
Ward from fusion-voyager-3 2024-08-22 21:51:27 +03:00
parent 10a3497a0c
commit 0b53bb9222
2 changed files with 22 additions and 2 deletions

View File

@ -115,6 +115,8 @@
"install_confirm_detail_partition_method_manual_crypttab_entry_title": "Manual Crypttab Entry",
"install_confirm_detail_partition_method_manual_crypttab_entry_subtitle_auto": "{LUKS_NAME} Unlocked Automatically With Root Unlock",
"install_confirm_detail_partition_method_manual_crypttab_entry_subtitle_manual": "{LUKS_NAME} Unlocked Manually Via Password On System Startup",
"install_confirm_detail_partition_method_manual_fstab_entry_title": "Manual FSTAB Entry",
"install_confirm_detail_partition_method_manual_fstab_entry_subtitle": "{PART_NAME} ({PART_SIZE} {PART_FS}) Mounted On ({MOUNTPOINT})",
"mounted_on_detail": " mounted on ",
"install_target_detail": "Install Target:",
"install_confirm_button_label": "Confirm & Install PikaOS"

View File

@ -86,12 +86,14 @@ pub fn installation_summary_page(
#[strong]
partition_method_automatic_target_refcell,
#[strong]
partition_method_manual_luks_enabled_refcell,
#[strong]
partition_method_automatic_seperation_refcell,
#[strong]
partition_method_automatic_ratio_refcell,
#[strong]
partition_method_manual_fstab_entry_array_refcell,
#[strong]
partition_method_manual_luks_enabled_refcell,
#[strong]
partition_method_manual_crypttab_entry_array_refcell,
move|_, action_arg|
{
@ -235,6 +237,22 @@ pub fn installation_summary_page(
installation_summary_row_viewport_listbox.append(&install_confirm_detail_partition_method_manual_crypttab_entry);
}
}
for fstab_entry in partition_method_manual_fstab_entry_array_refcell.borrow().iter() {
let install_confirm_detail_partition_method_manual_fstab_entry = adw::ActionRow::builder()
.title(t!("install_confirm_detail_partition_method_manual_fstab_entry_title"))
.subtitle(strfmt::strfmt(
&t!("install_confirm_detail_partition_method_manual_fstab_entry_subtitle"),
&std::collections::HashMap::from([
("PART_NAME".to_string(), fstab_entry.partition.part_name.as_str()),
("PART_SIZE".to_string(), fstab_entry.partition.part_size_pretty.as_str()),
("PART_FS".to_string(), fstab_entry.partition.part_fs.as_str()),
("MOUNTPOINT".to_string(), fstab_entry.mountpoint.as_str()),
])
).unwrap())
.build();
install_confirm_detail_partition_method_manual_fstab_entry.add_css_class("property");
installation_summary_row_viewport_listbox.append(&install_confirm_detail_partition_method_manual_fstab_entry);
}
}
_ => panic!()
}