feat: add auto-update system with release checking, notification UI, and install-type-aware apply

- Abstract ReleaseProvider interface (Gitea impl, swappable for GitHub/GitLab)
- Background UpdateService with periodic checks, debounce, dismissed version persistence
- Install type detection (installer/portable/docker/dev) with platform-aware asset matching
- Download with progress events, silent NSIS reinstall, portable ZIP/tarball swap scripts
- Version badge pulse animation, dismissible banner with icon buttons, Settings > Updates tab
- Single source of truth: pyproject.toml version via importlib.metadata, CI stamps tag with sed
- API: GET/POST status, check, dismiss, apply, GET/PUT settings
- i18n: en, ru, zh (27+ keys each)
This commit is contained in:
2026-03-25 13:16:18 +03:00
parent d2b3fdf786
commit 382a42755d
30 changed files with 1750 additions and 44 deletions
@@ -109,6 +109,58 @@ h2 {
padding: 2px 8px;
border-radius: 10px;
letter-spacing: 0.03em;
transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
#server-version.has-update {
background: var(--warning-color);
color: #fff;
cursor: pointer;
animation: updatePulse 2s ease-in-out infinite;
}
@keyframes updatePulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4); }
50% { box-shadow: 0 0 0 4px rgba(255, 152, 0, 0); }
}
/* ── Update banner ── */
.update-banner {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
padding: 6px 16px;
background: var(--bg-secondary);
border-bottom: 2px solid var(--primary-color);
color: var(--text-color);
font-size: 0.85rem;
font-weight: 600;
animation: bannerSlideDown 0.3s var(--ease-out);
}
.update-banner-text {
color: var(--primary-color);
}
.update-banner-action {
padding: 4px;
background: transparent;
border: none;
color: var(--text-secondary);
cursor: pointer;
border-radius: var(--radius-sm);
transition: color 0.15s, background 0.15s;
}
.update-banner-action:hover {
color: var(--primary-color);
background: var(--border-color);
}
@keyframes bannerSlideDown {
from { transform: translateY(-100%); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.status-badge {