Shorten hash in UI
This commit is contained in:
parent
536a66eff9
commit
e95998c204
2 changed files with 3 additions and 2 deletions
|
|
@ -724,6 +724,7 @@ impl App {
|
|||
let cosmic_theme::Spacing { space_xxs, .. } = self.core().system_theme().cosmic().spacing;
|
||||
let repository = "https://github.com/pop-os/cosmic-edit";
|
||||
let hash = env!("VERGEN_GIT_SHA");
|
||||
let short_hash: String = hash.chars().take(7).collect();
|
||||
let date = env!("VERGEN_GIT_COMMIT_DATE");
|
||||
widget::column::with_children(vec![
|
||||
widget::svg(widget::svg::Handle::from_memory(
|
||||
|
|
@ -739,7 +740,7 @@ impl App {
|
|||
.into(),
|
||||
widget::button::link(fl!(
|
||||
"git-description",
|
||||
hash = hash,
|
||||
hash = short_hash.as_str(),
|
||||
date = date
|
||||
))
|
||||
.on_press(Message::LaunchUrl(format!("{}/commits/{}", repository, hash)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue