use crate::design::dialogs::dialogs_spinner::show_spinner_dialog;
use crate::design::dialogs::dialogs_spinner::IndicatorType;
pub fn command_pkexec_spinner(
parent: &adw::ApplicationWindow,
command: &str,
title: &str,
text: &str
) {
let full_command = format!("pkexec {}", command);
show_spinner_dialog(parent, title, text, vec![full_command], IndicatorType::Spinner);
}
pub fn commands_pkexec_spinner(
parent: &adw::ApplicationWindow,
commands: &str,
title: &str,
text: &str
) {
let full_command = format!("pkexec sh -c \"{}\"", commands);
show_spinner_dialog(parent, title, text, vec![full_command], IndicatorType::Spinner);
}
pub fn command_pkexec_progressbar(
parent: &adw::ApplicationWindow,
command: &str,
title: &str,
text: &str
) {
let full_command = format!("pkexec {}", command);
show_spinner_dialog(parent, title, text, vec![full_command], IndicatorType::ProgressBar);
}
pub fn commands_pkexec_progressbar(
parent: &adw::ApplicationWindow,
commands: &str,
title: &str,
text: &str
) {
let full_command = format!("pkexec sh -c \"{}\"", commands);
show_spinner_dialog(parent, title, text, vec![full_command], IndicatorType::ProgressBar);
}