mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 14:55:43 +00:00
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:
@@ -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.
|
||||
|
||||
### 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
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function AppUpdater() {
|
||||
const {
|
||||
release, dismissed, setDismissed, changelogOpen, setChangelogOpen,
|
||||
dlState, dlProgress, dlError, countdown,
|
||||
asset, showAurHint, useTauriUpdater, showInstallBtn, pct,
|
||||
asset, showAurHint, showWingetHint, useTauriUpdater, showInstallBtn, pct,
|
||||
handleSkip, handleRestartNow, handleDownload, handleShowFolder,
|
||||
} = useAppUpdater();
|
||||
|
||||
@@ -184,6 +184,12 @@ export default function AppUpdater() {
|
||||
<span className="update-modal-asset-size">{formatBytes(asset.size)}</span>
|
||||
</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' && (
|
||||
<div className="update-modal-progress">
|
||||
<div className="app-updater-progress-bar">
|
||||
|
||||
@@ -196,6 +196,11 @@ export function useAppUpdater() {
|
||||
};
|
||||
|
||||
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
|
||||
// and in-place install — we don't need (and should not show) a DMG asset.
|
||||
const useTauriUpdater = IS_MACOS;
|
||||
@@ -208,7 +213,7 @@ export function useAppUpdater() {
|
||||
return {
|
||||
release, dismissed, setDismissed, changelogOpen, setChangelogOpen,
|
||||
dlState, dlProgress, dlError, countdown,
|
||||
asset, showAurHint, useTauriUpdater, showInstallBtn, pct,
|
||||
asset, showAurHint, showWingetHint, useTauriUpdater, showInstallBtn, pct,
|
||||
handleSkip, handleRestartNow, handleDownload, handleShowFolder,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ export const common = {
|
||||
updaterShowFolder: 'Im Ordner anzeigen',
|
||||
updaterInstallHint: 'Psysonic schließen und das Installationsprogramm manuell ausführen.',
|
||||
updaterAurHint: 'Update über AUR installieren:',
|
||||
updaterWingetHint: 'Oder per WinGet aktualisieren:',
|
||||
updaterErrorMsg: 'Download fehlgeschlagen',
|
||||
updaterInstallNow: 'Jetzt installieren',
|
||||
updaterMacReadyTitle: 'Bereit zur Installation',
|
||||
|
||||
@@ -48,6 +48,7 @@ export const common = {
|
||||
updaterShowFolder: 'Show in Folder',
|
||||
updaterInstallHint: 'Close Psysonic and run the installer manually.',
|
||||
updaterAurHint: 'Install the update via AUR:',
|
||||
updaterWingetHint: 'Or update via WinGet:',
|
||||
updaterErrorMsg: 'Download failed',
|
||||
updaterRetryBtn: 'Retry',
|
||||
updaterInstallNow: 'Install now',
|
||||
|
||||
@@ -47,6 +47,7 @@ export const common = {
|
||||
updaterShowFolder: 'Mostrar en Carpeta',
|
||||
updaterInstallHint: 'Cierra Psysonic y ejecuta el instalador manualmente.',
|
||||
updaterAurHint: 'Instala la actualización vía AUR:',
|
||||
updaterWingetHint: 'O actualiza vía WinGet:',
|
||||
updaterErrorMsg: 'Error de descarga',
|
||||
updaterRetryBtn: 'Reintentar',
|
||||
durationHoursMinutes: '{{hours}}h {{minutes}}m',
|
||||
|
||||
@@ -47,6 +47,7 @@ export const common = {
|
||||
updaterShowFolder: 'Afficher dans le dossier',
|
||||
updaterInstallHint: 'Fermez Psysonic et lancez le programme d\'installation manuellement.',
|
||||
updaterAurHint: 'Installer la mise à jour via AUR :',
|
||||
updaterWingetHint: 'Ou mettez à jour via WinGet :',
|
||||
updaterErrorMsg: 'Échec du téléchargement',
|
||||
updaterRetryBtn: 'Réessayer',
|
||||
durationHoursMinutes: '{{hours}} h {{minutes}} min',
|
||||
|
||||
@@ -48,6 +48,7 @@ export const common = {
|
||||
updaterShowFolder: 'Megjelenítés a mappában',
|
||||
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:',
|
||||
updaterWingetHint: 'Vagy frissíts a WinGeten keresztül:',
|
||||
updaterErrorMsg: 'A letöltés nem sikerült',
|
||||
updaterRetryBtn: 'Újra',
|
||||
updaterInstallNow: 'Telepítés most',
|
||||
|
||||
@@ -48,6 +48,7 @@ export const common = {
|
||||
updaterShowFolder: 'フォルダーに表示',
|
||||
updaterInstallHint: 'Psysonic を閉じて、インストーラーを手動で実行してください。',
|
||||
updaterAurHint: 'AUR からアップデートをインストール:',
|
||||
updaterWingetHint: 'または WinGet で更新:',
|
||||
updaterErrorMsg: 'ダウンロードに失敗しました',
|
||||
updaterRetryBtn: '再試行',
|
||||
updaterInstallNow: '今すぐインストール',
|
||||
|
||||
@@ -47,6 +47,7 @@ export const common = {
|
||||
updaterShowFolder: 'Vis i mappe',
|
||||
updaterInstallHint: 'Lukk Psysonic og kjør installasjonsprogrammet manuelt.',
|
||||
updaterAurHint: 'Installer oppdateringen via AUR:',
|
||||
updaterWingetHint: 'Eller oppdater via WinGet:',
|
||||
updaterErrorMsg: 'Nedlasting mislyktes',
|
||||
updaterRetryBtn: 'Prøv igjen',
|
||||
durationHoursMinutes: '{{hours}} t {{minutes}} min',
|
||||
|
||||
@@ -47,6 +47,7 @@ export const common = {
|
||||
updaterShowFolder: 'Tonen in map',
|
||||
updaterInstallHint: 'Sluit Psysonic en voer het installatieprogramma handmatig uit.',
|
||||
updaterAurHint: 'Update installeren via AUR:',
|
||||
updaterWingetHint: 'Of bijwerken via WinGet:',
|
||||
updaterErrorMsg: 'Downloaden mislukt',
|
||||
updaterRetryBtn: 'Opnieuw proberen',
|
||||
durationHoursMinutes: '{{hours}} u {{minutes}} min',
|
||||
|
||||
@@ -48,6 +48,7 @@ export const common = {
|
||||
updaterShowFolder: 'Pokaż w folderze',
|
||||
updaterInstallHint: 'Zamknij PsySonic i uruchom instalator ręcznie.',
|
||||
updaterAurHint: 'Zainstaluj aktualizację przez AUR:',
|
||||
updaterWingetHint: 'Lub zaktualizuj przez WinGet:',
|
||||
updaterErrorMsg: 'Pobieranie nie powiodło się',
|
||||
updaterRetryBtn: 'Spróbuj ponownie',
|
||||
updaterInstallNow: 'Zainstaluj teraz',
|
||||
|
||||
@@ -48,6 +48,7 @@ export const common = {
|
||||
updaterShowFolder: 'Arată în Folder',
|
||||
updaterInstallHint: 'Închide Psysonic și rulează programul de instalare manual.',
|
||||
updaterAurHint: 'Instalează update-ul prin AUR:',
|
||||
updaterWingetHint: 'Sau actualizează prin WinGet:',
|
||||
updaterErrorMsg: 'Descărcare eșuată',
|
||||
updaterRetryBtn: 'Reîncearcă',
|
||||
updaterInstallNow: 'Instalează acum',
|
||||
|
||||
@@ -48,6 +48,7 @@ export const common = {
|
||||
updaterShowFolder: 'Показать в папке',
|
||||
updaterInstallHint: 'Закройте Psysonic и запустите установщик вручную.',
|
||||
updaterAurHint: 'Установить обновление через AUR:',
|
||||
updaterWingetHint: 'Или обновить через WinGet:',
|
||||
updaterErrorMsg: 'Ошибка загрузки',
|
||||
updaterRetryBtn: 'Повторить',
|
||||
updaterInstallNow: 'Установить сейчас',
|
||||
|
||||
@@ -47,6 +47,7 @@ export const common = {
|
||||
updaterShowFolder: '在文件夹中显示',
|
||||
updaterInstallHint: '请关闭 Psysonic 并手动运行安装程序。',
|
||||
updaterAurHint: '通过 AUR 安装更新:',
|
||||
updaterWingetHint: '或通过 WinGet 更新:',
|
||||
updaterErrorMsg: '下载失败',
|
||||
updaterRetryBtn: '重试',
|
||||
durationHoursMinutes: '{{hours}}小时{{minutes}}分钟',
|
||||
|
||||
@@ -280,6 +280,28 @@
|
||||
.update-modal-aur-alt {
|
||||
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 {
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user