feat(updater): show the WinGet update command in the Windows update modal (#1202)

* feat(updater): show WinGet update command in the Windows update modal

* docs(changelog): WinGet update command in the Windows update dialog
This commit is contained in:
Psychotoxical
2026-06-27 15:56:54 +02:00
committed by GitHub
parent 6d4d82d6a3
commit 604cdd54d6
16 changed files with 53 additions and 2 deletions
+6
View File
@@ -135,6 +135,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Sort a playlist by **Date added** (newest or oldest first), or by title, artist, album and the other columns, from a new sort dropdown in the playlist filter toolbar. The Subsonic API has no per-track "added on" date, so this follows the playlist's own order — servers add new tracks at the end, so newest-first puts your latest additions on top. * Sort a playlist by **Date added** (newest or oldest first), or by title, artist, album and the other columns, from a new sort dropdown in the playlist filter toolbar. The Subsonic API has no per-track "added on" date, so this follows the playlist's own order — servers add new tracks at the end, so newest-first puts your latest additions on top.
### WinGet update command in the update dialog (Windows)
**By [@Psychotoxical](https://github.com/Psychotoxical), PR [#1202](https://github.com/Psychotoxical/psysonic/pull/1202)**
* The Windows update dialog now also shows the WinGet command (`winget upgrade Psysonic`) next to the installer download, so you can update whichever way you installed.
## Changed ## Changed
+7 -1
View File
@@ -13,7 +13,7 @@ export default function AppUpdater() {
const { const {
release, dismissed, setDismissed, changelogOpen, setChangelogOpen, release, dismissed, setDismissed, changelogOpen, setChangelogOpen,
dlState, dlProgress, dlError, countdown, dlState, dlProgress, dlError, countdown,
asset, showAurHint, useTauriUpdater, showInstallBtn, pct, asset, showAurHint, showWingetHint, useTauriUpdater, showInstallBtn, pct,
handleSkip, handleRestartNow, handleDownload, handleShowFolder, handleSkip, handleRestartNow, handleDownload, handleShowFolder,
} = useAppUpdater(); } = useAppUpdater();
@@ -184,6 +184,12 @@ export default function AppUpdater() {
<span className="update-modal-asset-size">{formatBytes(asset.size)}</span> <span className="update-modal-asset-size">{formatBytes(asset.size)}</span>
</div> </div>
)} )}
{dlState === 'idle' && showWingetHint && (
<div className="update-modal-winget">
<div className="update-modal-winget-title">{t('common.updaterWingetHint')}</div>
<code className="update-modal-winget-cmd">winget upgrade Psysonic</code>
</div>
)}
{dlState === 'downloading' && ( {dlState === 'downloading' && (
<div className="update-modal-progress"> <div className="update-modal-progress">
<div className="app-updater-progress-bar"> <div className="app-updater-progress-bar">
+6 -1
View File
@@ -196,6 +196,11 @@ export function useAppUpdater() {
}; };
const showAurHint = IS_LINUX && isArch; const showAurHint = IS_LINUX && isArch;
// Windows can also update through WinGet once a release clears moderation
// (the notice itself is held back for that window, see #1200). Shown next to
// the installer download, not instead of it — not every Windows user
// installed via WinGet.
const showWingetHint = IS_WINDOWS;
// On macOS the Tauri Updater handles architecture, signature verification // On macOS the Tauri Updater handles architecture, signature verification
// and in-place install — we don't need (and should not show) a DMG asset. // and in-place install — we don't need (and should not show) a DMG asset.
const useTauriUpdater = IS_MACOS; const useTauriUpdater = IS_MACOS;
@@ -208,7 +213,7 @@ export function useAppUpdater() {
return { return {
release, dismissed, setDismissed, changelogOpen, setChangelogOpen, release, dismissed, setDismissed, changelogOpen, setChangelogOpen,
dlState, dlProgress, dlError, countdown, dlState, dlProgress, dlError, countdown,
asset, showAurHint, useTauriUpdater, showInstallBtn, pct, asset, showAurHint, showWingetHint, useTauriUpdater, showInstallBtn, pct,
handleSkip, handleRestartNow, handleDownload, handleShowFolder, handleSkip, handleRestartNow, handleDownload, handleShowFolder,
}; };
} }
+1
View File
@@ -48,6 +48,7 @@ export const common = {
updaterShowFolder: 'Im Ordner anzeigen', updaterShowFolder: 'Im Ordner anzeigen',
updaterInstallHint: 'Psysonic schließen und das Installationsprogramm manuell ausführen.', updaterInstallHint: 'Psysonic schließen und das Installationsprogramm manuell ausführen.',
updaterAurHint: 'Update über AUR installieren:', updaterAurHint: 'Update über AUR installieren:',
updaterWingetHint: 'Oder per WinGet aktualisieren:',
updaterErrorMsg: 'Download fehlgeschlagen', updaterErrorMsg: 'Download fehlgeschlagen',
updaterInstallNow: 'Jetzt installieren', updaterInstallNow: 'Jetzt installieren',
updaterMacReadyTitle: 'Bereit zur Installation', updaterMacReadyTitle: 'Bereit zur Installation',
+1
View File
@@ -48,6 +48,7 @@ export const common = {
updaterShowFolder: 'Show in Folder', updaterShowFolder: 'Show in Folder',
updaterInstallHint: 'Close Psysonic and run the installer manually.', updaterInstallHint: 'Close Psysonic and run the installer manually.',
updaterAurHint: 'Install the update via AUR:', updaterAurHint: 'Install the update via AUR:',
updaterWingetHint: 'Or update via WinGet:',
updaterErrorMsg: 'Download failed', updaterErrorMsg: 'Download failed',
updaterRetryBtn: 'Retry', updaterRetryBtn: 'Retry',
updaterInstallNow: 'Install now', updaterInstallNow: 'Install now',
+1
View File
@@ -47,6 +47,7 @@ export const common = {
updaterShowFolder: 'Mostrar en Carpeta', updaterShowFolder: 'Mostrar en Carpeta',
updaterInstallHint: 'Cierra Psysonic y ejecuta el instalador manualmente.', updaterInstallHint: 'Cierra Psysonic y ejecuta el instalador manualmente.',
updaterAurHint: 'Instala la actualización vía AUR:', updaterAurHint: 'Instala la actualización vía AUR:',
updaterWingetHint: 'O actualiza vía WinGet:',
updaterErrorMsg: 'Error de descarga', updaterErrorMsg: 'Error de descarga',
updaterRetryBtn: 'Reintentar', updaterRetryBtn: 'Reintentar',
durationHoursMinutes: '{{hours}}h {{minutes}}m', durationHoursMinutes: '{{hours}}h {{minutes}}m',
+1
View File
@@ -47,6 +47,7 @@ export const common = {
updaterShowFolder: 'Afficher dans le dossier', updaterShowFolder: 'Afficher dans le dossier',
updaterInstallHint: 'Fermez Psysonic et lancez le programme d\'installation manuellement.', updaterInstallHint: 'Fermez Psysonic et lancez le programme d\'installation manuellement.',
updaterAurHint: 'Installer la mise à jour via AUR :', updaterAurHint: 'Installer la mise à jour via AUR :',
updaterWingetHint: 'Ou mettez à jour via WinGet :',
updaterErrorMsg: 'Échec du téléchargement', updaterErrorMsg: 'Échec du téléchargement',
updaterRetryBtn: 'Réessayer', updaterRetryBtn: 'Réessayer',
durationHoursMinutes: '{{hours}} h {{minutes}} min', durationHoursMinutes: '{{hours}} h {{minutes}} min',
+1
View File
@@ -48,6 +48,7 @@ export const common = {
updaterShowFolder: 'Megjelenítés a mappában', updaterShowFolder: 'Megjelenítés a mappában',
updaterInstallHint: 'Zárd be a Psysonicot, és futtasd a telepítőt kézzel.', updaterInstallHint: 'Zárd be a Psysonicot, és futtasd a telepítőt kézzel.',
updaterAurHint: 'Telepítsd a frissítést az AUR-on keresztül:', updaterAurHint: 'Telepítsd a frissítést az AUR-on keresztül:',
updaterWingetHint: 'Vagy frissíts a WinGeten keresztül:',
updaterErrorMsg: 'A letöltés nem sikerült', updaterErrorMsg: 'A letöltés nem sikerült',
updaterRetryBtn: 'Újra', updaterRetryBtn: 'Újra',
updaterInstallNow: 'Telepítés most', updaterInstallNow: 'Telepítés most',
+1
View File
@@ -48,6 +48,7 @@ export const common = {
updaterShowFolder: 'フォルダーに表示', updaterShowFolder: 'フォルダーに表示',
updaterInstallHint: 'Psysonic を閉じて、インストーラーを手動で実行してください。', updaterInstallHint: 'Psysonic を閉じて、インストーラーを手動で実行してください。',
updaterAurHint: 'AUR からアップデートをインストール:', updaterAurHint: 'AUR からアップデートをインストール:',
updaterWingetHint: 'または WinGet で更新:',
updaterErrorMsg: 'ダウンロードに失敗しました', updaterErrorMsg: 'ダウンロードに失敗しました',
updaterRetryBtn: '再試行', updaterRetryBtn: '再試行',
updaterInstallNow: '今すぐインストール', updaterInstallNow: '今すぐインストール',
+1
View File
@@ -47,6 +47,7 @@ export const common = {
updaterShowFolder: 'Vis i mappe', updaterShowFolder: 'Vis i mappe',
updaterInstallHint: 'Lukk Psysonic og kjør installasjonsprogrammet manuelt.', updaterInstallHint: 'Lukk Psysonic og kjør installasjonsprogrammet manuelt.',
updaterAurHint: 'Installer oppdateringen via AUR:', updaterAurHint: 'Installer oppdateringen via AUR:',
updaterWingetHint: 'Eller oppdater via WinGet:',
updaterErrorMsg: 'Nedlasting mislyktes', updaterErrorMsg: 'Nedlasting mislyktes',
updaterRetryBtn: 'Prøv igjen', updaterRetryBtn: 'Prøv igjen',
durationHoursMinutes: '{{hours}} t {{minutes}} min', durationHoursMinutes: '{{hours}} t {{minutes}} min',
+1
View File
@@ -47,6 +47,7 @@ export const common = {
updaterShowFolder: 'Tonen in map', updaterShowFolder: 'Tonen in map',
updaterInstallHint: 'Sluit Psysonic en voer het installatieprogramma handmatig uit.', updaterInstallHint: 'Sluit Psysonic en voer het installatieprogramma handmatig uit.',
updaterAurHint: 'Update installeren via AUR:', updaterAurHint: 'Update installeren via AUR:',
updaterWingetHint: 'Of bijwerken via WinGet:',
updaterErrorMsg: 'Downloaden mislukt', updaterErrorMsg: 'Downloaden mislukt',
updaterRetryBtn: 'Opnieuw proberen', updaterRetryBtn: 'Opnieuw proberen',
durationHoursMinutes: '{{hours}} u {{minutes}} min', durationHoursMinutes: '{{hours}} u {{minutes}} min',
+1
View File
@@ -48,6 +48,7 @@ export const common = {
updaterShowFolder: 'Pokaż w folderze', updaterShowFolder: 'Pokaż w folderze',
updaterInstallHint: 'Zamknij PsySonic i uruchom instalator ręcznie.', updaterInstallHint: 'Zamknij PsySonic i uruchom instalator ręcznie.',
updaterAurHint: 'Zainstaluj aktualizację przez AUR:', updaterAurHint: 'Zainstaluj aktualizację przez AUR:',
updaterWingetHint: 'Lub zaktualizuj przez WinGet:',
updaterErrorMsg: 'Pobieranie nie powiodło się', updaterErrorMsg: 'Pobieranie nie powiodło się',
updaterRetryBtn: 'Spróbuj ponownie', updaterRetryBtn: 'Spróbuj ponownie',
updaterInstallNow: 'Zainstaluj teraz', updaterInstallNow: 'Zainstaluj teraz',
+1
View File
@@ -48,6 +48,7 @@ export const common = {
updaterShowFolder: 'Arată în Folder', updaterShowFolder: 'Arată în Folder',
updaterInstallHint: 'Închide Psysonic și rulează programul de instalare manual.', updaterInstallHint: 'Închide Psysonic și rulează programul de instalare manual.',
updaterAurHint: 'Instalează update-ul prin AUR:', updaterAurHint: 'Instalează update-ul prin AUR:',
updaterWingetHint: 'Sau actualizează prin WinGet:',
updaterErrorMsg: 'Descărcare eșuată', updaterErrorMsg: 'Descărcare eșuată',
updaterRetryBtn: 'Reîncearcă', updaterRetryBtn: 'Reîncearcă',
updaterInstallNow: 'Instalează acum', updaterInstallNow: 'Instalează acum',
+1
View File
@@ -48,6 +48,7 @@ export const common = {
updaterShowFolder: 'Показать в папке', updaterShowFolder: 'Показать в папке',
updaterInstallHint: 'Закройте Psysonic и запустите установщик вручную.', updaterInstallHint: 'Закройте Psysonic и запустите установщик вручную.',
updaterAurHint: 'Установить обновление через AUR:', updaterAurHint: 'Установить обновление через AUR:',
updaterWingetHint: 'Или обновить через WinGet:',
updaterErrorMsg: 'Ошибка загрузки', updaterErrorMsg: 'Ошибка загрузки',
updaterRetryBtn: 'Повторить', updaterRetryBtn: 'Повторить',
updaterInstallNow: 'Установить сейчас', updaterInstallNow: 'Установить сейчас',
+1
View File
@@ -47,6 +47,7 @@ export const common = {
updaterShowFolder: '在文件夹中显示', updaterShowFolder: '在文件夹中显示',
updaterInstallHint: '请关闭 Psysonic 并手动运行安装程序。', updaterInstallHint: '请关闭 Psysonic 并手动运行安装程序。',
updaterAurHint: '通过 AUR 安装更新:', updaterAurHint: '通过 AUR 安装更新:',
updaterWingetHint: '或通过 WinGet 更新:',
updaterErrorMsg: '下载失败', updaterErrorMsg: '下载失败',
updaterRetryBtn: '重试', updaterRetryBtn: '重试',
durationHoursMinutes: '{{hours}}小时{{minutes}}分钟', durationHoursMinutes: '{{hours}}小时{{minutes}}分钟',
+22
View File
@@ -280,6 +280,28 @@
.update-modal-aur-alt { .update-modal-aur-alt {
color: var(--text-muted); color: var(--text-muted);
} }
/* WinGet update hint — shown alongside the Windows installer download, mirrors
the AUR hint styling with a little top gap to separate it from the asset. */
.update-modal-winget {
display: flex;
flex-direction: column;
gap: var(--space-2);
margin-top: var(--space-3);
}
.update-modal-winget-title {
font-size: 13px;
color: var(--text-secondary);
}
.update-modal-winget-cmd {
display: block;
background: var(--bg-glass);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-sm);
padding: 6px 10px;
font-size: 12px;
color: var(--accent);
font-family: monospace;
}
.update-modal-asset-none { .update-modal-asset-none {
padding: 4px 0; padding: 4px 0;
} }