refine: simplify update notifications

Open known updates directly without redundant searching or found toasts, retain failure and no-update feedback, and render the update dialog close action in red with a destructive hover state.
This commit is contained in:
Sucukdeluxe
2026-08-21 00:14:47 +02:00
parent ccf60db15f
commit e09cbcad8d
4 changed files with 7 additions and 8 deletions
+1 -3
View File
@@ -840,12 +840,10 @@ async function requestUpdateCheck({ forceRefresh = true } = {}) {
if (_updateCheckBusy) return null;
_updateCheckBusy = true;
_syncHeaderUpdateState();
showCopyToast('Suche nach Updates…');
try {
const result = await window.api.checkForUpdate({ forceRefresh });
if (result && result.available) {
showUpdateBanner(result);
showCopyToast('Update gefunden!');
} else if (result && result.error) {
showCopyToast('Updateprüfung fehlgeschlagen');
} else {
@@ -7436,7 +7434,7 @@ function setupListeners() {
if (e.target.id === 'jobLogModal') hideJobLogModal();
});
document.getElementById('headerUpdateBtn')?.addEventListener('click', requestUpdateCheck);
document.getElementById('headerUpdateBtn')?.addEventListener('click', () => requestUpdateCheck({ forceRefresh: false }));
document.getElementById('installUpdateBtn')?.addEventListener('click', installKnownUpdate);
document.getElementById('dismissUpdateBtn')?.addEventListener('click', handleUpdateDismiss);
document.getElementById('updateCloseBtn')?.addEventListener('click', closeUpdateDialog);
-1
View File
@@ -582,7 +582,6 @@
['Speichern vor dem Beenden hat zu lange gedauert', 'Saving before quitting took too long'],
['Stoppt nach aktiven Uploads...', 'Stopping after active uploads...'],
['Suche nach Aktualisierungen…', 'Checking for updates…'],
['Suche nach Updates…', 'Checking for updates…'],
['System wird heruntergefahren in', 'System will shut down in'],
['Übernehmen', 'Apply'],
['Übersprungen', 'Skipped'],
+4 -4
View File
@@ -2405,14 +2405,14 @@ select.hs-input { max-width: none; width: auto; min-width: 140px; }
border: 1px solid transparent;
border-radius: 6px;
background: transparent;
color: var(--text-dim);
color: var(--danger);
cursor: pointer;
}
.update-close-button:hover {
border-color: var(--border);
background: var(--bg-active);
color: var(--text);
border-color: transparent;
background: var(--danger);
color: #000;
}
.update-close-button svg {