[feat] add website update button to about dialog

This commit is contained in:
dijunkun
2026-10-19 23:27:12 +08:00
parent 8a7de23c7f
commit 086da155f0
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -492,6 +492,7 @@ export component MainWindow inherits Window {
callback cancel-self-hosted-settings;
callback browse-save-path;
callback open-download;
callback open-website;
callback open-afdian-sponsor;
callback open-github-sponsor;
callback open-kofi-sponsor;
@@ -2446,6 +2447,15 @@ export component MainWindow inherits Window {
font-size: 12px; wrap: word-wrap; overflow: elide;
vertical-alignment: center;
}
if root.update-available: WorkbenchButton {
width: max(80px, about-update-button-metrics.preferred-width + 24px);
height: 32px;
primary: true;
text-size: 12px;
text: UiStrings.download;
clicked => { root.open-website(); }
about-update-button-metrics := Text { visible: false; text: UiStrings.download; font-size: 12px; }
}
SettingsButton {
width: max(116px, check-button-metrics.preferred-width + 24px);
text: UiStrings.check-for-updates;