G2CHQAOPRFFDCYVNDXMTB5Y5J2FBRREJPMUAJJTVQDSZE3VFLP3QC
export struct ChangeData {
hash: string,
// TODO display all authors
// authors: [string],
author: string,
timestamp: string,
message: string,
}
component ChangeEntry {
in-out property <string> hash;
in-out property <string> author;
in-out property <string> timestamp;
in-out property <string> message;
VerticalBox {
spacing: 0;
Text {
text: "hash \{root.hash}";
}
Text {
text: "author \{root.author}";
}
ui.set_changes_log(SharedString::from(&log));
let log_strs: Vec<ChangeData> = log
.into_iter()
.map(|change| ChangeData {
hash: change.hash.into(),
author: change
.authors
.first()
.unwrap_or(&String::new())
.clone()
.into(),
timestamp: change.timestamp.into(),
message: change.message.into(),
})
.collect();
ui.set_changes_log((&log_strs[..]).into());