feat(update): show release notes + version-card layout in update notice

The update notice dialog now mirrors what GitHub publishes: side-by-side
Installed → Latest version cards (the new one accent-tinted to draw the
eye) and a scrollable release-notes panel under them. Light markdown
rendering covers `##` headings, bullet lists, and inline bold/code
markers — enough for the GitHub release body format we ship.

- update_check::check_for_update() returns UpdateInfo { version, body };
  body is parsed from the releases API JSON with a tiny custom
  string-field extractor (\n / \" / \u handling) so we keep the
  serde_json-free dependency footprint.
- Window grows from 480x240 to 560x460 and becomes resizable to make
  room for the notes scroller.
- Layout tightens: header bottom padding drops 14 → 6, notes heading
  10, and the notes block is wrapped in a Fill-height container so it
  claims every leftover pixel — no more dead space between heading and
  footer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Hakan 2026-05-22 12:55:37 +03:00
commit 2357b39a1d
5 changed files with 255 additions and 53 deletions

View file

@ -3688,16 +3688,20 @@ impl H7CAD {
}
}
Message::UpdateCheckResult(latest) => {
let Some(version) = latest else {
let Some(info) = latest else {
return Task::none();
};
self.update_notice_version = Some(version);
self.update_notice_version = Some(info.version);
self.update_notice_body = Some(info.body);
if let Some(id) = self.update_notice_window {
return window::gain_focus(id);
}
let (id, task) = window::open(window::Settings {
size: iced::Size::new(480.0, 240.0),
resizable: false,
// Sized for the new release-notes panel — wide enough
// for typical GitHub release headlines, tall enough for
// a meaningful scroll preview without dwarfing the app.
size: iced::Size::new(560.0, 460.0),
resizable: true,
..Default::default()
});
self.update_notice_window = Some(id);