IQY5LHEN34KNUOZ75S5V5LZDZQCZ65LV7YXXRYJMIE6WSXMKFMXAC
HorizontalBox {
vertical-stretch: 1;
VerticalBox {
alignment: start;
preferred-width: 150px;
Text {
text: "channels";
}
Text {
text: "\{root.channel_list}";
}
}
ScrollView {
VerticalBox {
alignment: start;
preferred-width: 500px;
Text {
text: "log";
}
Text {
text: "\{root.changes_log}";
}
}
}
}
}
});
ui.on_request_changes_log({
let ui_handle = ui.as_weak();
move || {
let ui = ui_handle.unwrap();
let log_output = log(
Path::new("/Users/beckerawqatty/.nix-profile/bin/pijul"),
Path::new("/Users/beckerawqatty/Repos/pijul-gui/"),
);
let log = match log_output {
Ok(log) => log,
Err(e) => {
println!("{:?}", e);
return;
}
};
ui.set_changes_log(SharedString::from(&log));
.arg("--no-prompt")
.arg("--repository")
.arg(repo);
let output = cmd.output()?;
check_exit_status(cmd, output.status)?;
Ok(String::from_utf8(output.stdout)?)
}
pub fn log(exe: &std::path::Path, repo: &std::path::Path) -> Result<String, Error> {
let mut cmd = Command::new(exe);
let cmd = cmd
.arg("log")