A full-featured download manager.
fix(updater): serialize installs and guard cross-volume updates (#2433)
Dr_rOotcea4fa4e2bef
diff --git a/e2e/app-update-simulator.spec.ts b/e2e/app-update-simulator.spec.tsindex 1c4d0cbd..74eea4ae 100644--- a/e2e/app-update-simulator.spec.ts+++ b/e2e/app-update-simulator.spec.ts@@ -112,7 +112,11 @@ test.describe('development update simulator', () => {await expect(installButton).toBeVisible()await expect(installButton.locator('..')).toContainText('Beta')const closed = app.waitForEvent('close')- await installButton.click()+ await installButton.dblclick()+ await expect(+ page.getByRole('button', { name: 'Installing…' })+ ).toBeDisabled()+ await expect(channel).toBeDisabled()await closedapp = undefined} finally {diff --git a/src/main/core/app-update-service.test.ts b/src/main/core/app-update-service.test.tsindex 23101e76..af9fcaf2 100644--- a/src/main/core/app-update-service.test.ts+++ b/src/main/core/app-update-service.test.ts@@ -88,7 +88,8 @@ describe('createAppUpdateService', () => {expect(updater.checkForUpdates).toHaveBeenCalledOnce()expect(updater.downloadUpdate).toHaveBeenCalledOnce()expect(updater.quitAndInstall).toHaveBeenCalledOnce()- expect(updater.channel).toBe('beta')+ expect(service.getChannel()).toBe('beta')+ expect(updater.channel).toBe('latest')})it('preserves unsupported direct builds', async () => {diff --git a/src/main/core/app-update-service.ts b/src/main/core/app-update-service.tsindex 16838683..80490848 100644--- a/src/main/core/app-update-service.ts+++ b/src/main/core/app-update-service.ts@@ -21,6 +21,7 @@ interface CreateAppUpdateServiceOptions {supported: booleanloadUpdater: () => Promise<Updater>getManagedMessage: () => string+ getInstallBlockReason?: () => AppUpdateState['manualInstallReason']}/** Windows packages never load the application updater, including sideloaded tests. */@@ -41,6 +42,7 @@ export async function createAppUpdateService(channel: options.channel,updater: await options.loadUpdater(),supported: options.supported,+ getInstallBlockReason: options.getInstallBlockReason,})}diff --git a/src/main/core/development-update-simulator.test.ts b/src/main/core/development-update-simulator.test.tsindex 2f591e72..1d4dac73 100644--- a/src/main/core/development-update-simulator.test.ts+++ b/src/main/core/development-update-simulator.test.ts@@ -58,7 +58,7 @@ describe('DevelopmentUpdateSimulator', () => {)})- it('prepares update quit before requesting application shutdown', () => {+ it('prepares update quit before requesting application shutdown', async () => {const calls: string[] = []const simulator = createSimulator(() => {calls.push('quit')@@ -66,6 +66,8 @@ describe('DevelopmentUpdateSimulator', () => {simulator.on('before-quit-for-update', () => calls.push('prepare'))simulator.quitAndInstall()+ expect(calls).toEqual([])+ await Promise.resolve()expect(calls).toEqual(['prepare', 'quit'])})diff --git a/src/main/core/development-update-simulator.ts b/src/main/core/development-update-simulator.tsindex a435e024..c8034e5f 100644--- a/src/main/core/development-update-simulator.ts+++ b/src/main/core/development-update-simulator.ts@@ -71,8 +71,13 @@ export class DevelopmentUpdateSimulator implements Updater {}quitAndInstall(): void {- this.emit('before-quit-for-update')- this.onQuitAndInstall()+ // Native macOS preparation continues after the install command returns.+ // Keep that interval visible so the simulator exercises repeated clicks.+ void this.delay(1000).then(() => {+ this.emit('update-downloaded', this.updateInfo())+ this.emit('before-quit-for-update')+ this.onQuitAndInstall()+ })}private updateInfo(): { version: string; releaseName: string } {diff --git a/src/main/core/update-manager.test.ts b/src/main/core/update-manager.test.tsindex e6fbc215..ed5d988b 100644--- a/src/main/core/update-manager.test.ts+++ b/src/main/core/update-manager.test.ts@@ -124,6 +124,7 @@ describe('UpdateManager', () => {'downloading','downloading','downloaded',+ 'installing',])expect(updater.checkForUpdates).toHaveBeenCalledOnce()expect(updater.downloadUpdate).toHaveBeenCalledOnce()@@ -150,6 +151,114 @@ describe('UpdateManager', () => {expect(updater.quitAndInstall).toHaveBeenCalledOnce()})+ it('starts installation once despite repeated clicks and native preparation events', async () => {+ updater.fire('update-downloaded', { version: '2.0.1' })+ vi.mocked(updater.quitAndInstall).mockImplementation(() => {+ // MacUpdater begins Squirrel verification only after the install click.+ updater.fire('checking-for-update')+ updater.fire('update-available', { version: '2.0.1' })+ updater.fire('download-progress', { percent: 50 })+ updater.fire('update-downloaded', { version: '2.0.1' })+ })++ manager.install()+ manager.install()+ await manager.check()+ await manager.download()+ manager.setChannel('beta')+ manager.install()++ expect(manager.getState()).toMatchObject({+ phase: 'installing',+ availableVersion: '2.0.1',+ })+ expect(manager.getChannel()).toBe('beta')+ expect(updater.channel).toBe('latest')+ expect(updater.quitAndInstall).toHaveBeenCalledOnce()+ expect(updater.checkForUpdates).not.toHaveBeenCalled()+ expect(updater.downloadUpdate).not.toHaveBeenCalled()+ })++ it.each(['synchronous', 'asynchronous'] as const)(+ 'keeps a %s install failure from reusing pending native callbacks',+ async (mode) => {+ updater.fire('update-downloaded', { version: '2.0.1' })+ const error = new Error('native installer failed')+ if (mode === 'synchronous')+ vi.mocked(updater.quitAndInstall).mockImplementation(() => {+ throw error+ })+ manager.install()+ if (mode === 'asynchronous') updater.fire('error', error)+ // Late native events must not replace the failure with another action.+ updater.fire('update-downloaded', { version: '2.0.1' })+ manager.install()+ await manager.download()+ await manager.check()++ expect(manager.getState()).toMatchObject({+ phase: 'error',+ availableVersion: '2.0.1',+ manualInstallReason: 'install-failed',+ error: { message: error.message },+ })+ expect(updater.quitAndInstall).toHaveBeenCalledOnce()+ expect(updater.downloadUpdate).not.toHaveBeenCalled()+ expect(updater.checkForUpdates).not.toHaveBeenCalled()+ }+ )++ it('keeps cross-volume updates discoverable without invoking the native installer', async () => {+ const guarded = new UpdateManager({+ eventBus,+ updater,+ currentVersion: '2.0.0',+ channel: 'stable',+ getInstallBlockReason: () => 'cross-volume',+ })+ await guarded.check()+ updater.fire('update-available', { version: '2.0.1' })+ expect(guarded.getState()).toMatchObject({+ phase: 'available',+ manualInstallReason: 'cross-volume',+ })+ await guarded.download()+ updater.fire('update-downloaded', { version: '2.0.1' })+ guarded.install()+ expect(updater.checkForUpdates).toHaveBeenCalledOnce()+ expect(updater.downloadUpdate).not.toHaveBeenCalled()+ expect(updater.quitAndInstall).not.toHaveBeenCalled()+ })++ it('rechecks the installation location after download and fails closed on inspection errors', async () => {+ const policy = vi+ .fn<() => 'cross-volume' | undefined>()+ .mockReturnValue(undefined)+ const guarded = new UpdateManager({+ eventBus,+ updater,+ currentVersion: '2.0.0',+ channel: 'stable',+ getInstallBlockReason: policy,+ })+ updater.fire('update-available', { version: '2.0.1' })+ await guarded.download()+ updater.fire('update-downloaded', { version: '2.0.1' })+ policy.mockImplementation(() => {+ throw new Error('volume disconnected')+ })+ guarded.install()+ expect(updater.quitAndInstall).not.toHaveBeenCalled()+ expect(guarded.getState()).toMatchObject({+ phase: 'downloaded',+ manualInstallReason: 'location-unavailable',+ })+ policy.mockReturnValue(undefined)+ guarded.install()+ expect(updater.quitAndInstall).toHaveBeenCalledOnce()+ expect(guarded.getState().manualInstallReason).toBeUndefined()+ })+it('rejects download without an available version', async () => {await expect(manager.download()).rejects.toThrow('No update is available to download'diff --git a/src/main/core/update-manager.ts b/src/main/core/update-manager.tsindex 48963837..b8cc4588 100644--- a/src/main/core/update-manager.ts+++ b/src/main/core/update-manager.ts@@ -1,4 +1,5 @@import type { EventBus } from '@core/events/event-bus'+import { getLogger } from '@core/logger'import { type EventChannel, Events } from '@shared/protocol/events'import type {AppUpdateProgress,@@ -32,6 +33,7 @@ export interface UpdateManagerOptions {* `dir` builds and dev runs have none). Defaults to true.*/supported?: boolean+ getInstallBlockReason?: () => AppUpdateState['manualInstallReason']}// Map autoUpdater event names → EventBus event channels. Keeping the@@ -48,6 +50,8 @@ const EVENT_BRIDGE: Array<[string, EventChannel]> = [['error', Events.UpdateError],]+const log = getLogger('app-update')+export class UpdateManager {private readonly eventBus: EventBusprivate readonly updater: Updater@@ -56,12 +60,16 @@ export class UpdateManager {private state: AppUpdateStateprivate checkPromise: Promise<unknown> | null = nullprivate downloadPromise: Promise<unknown> | null = null+ private installRequested = false+ private manualInstallReason: AppUpdateState['manualInstallReason']+ private readonly getInstallBlockReason?: UpdateManagerOptions['getInstallBlockReason']constructor(options: UpdateManagerOptions) {this.eventBus = options.eventBusthis.updater = options.updaterthis.supported = options.supported !== falsethis.channel = options.channel+ this.getInstallBlockReason = options.getInstallBlockReasonthis.state = {phase: this.supported ? 'idle' : 'unsupported',currentVersion: options.currentVersion,@@ -98,6 +106,9 @@ export class UpdateManager {...this.state,progress: this.state.progress ? { ...this.state.progress } : undefined,error: this.state.error ? { ...this.state.error } : undefined,+ ...(this.manualInstallReason+ ? { manualInstallReason: this.manualInstallReason }+ : {}),}}@@ -108,6 +119,9 @@ export class UpdateManager {setChannel(channel: AppUpdateChannel): void {if (channel === this.channel) returnthis.channel = channel+ // Settings may be persisted by another window during installation. Retain+ // the preference without resetting the backend or unlocking its lifecycle.+ if (this.installRequested) returnif (this.supported) this.configureUpdaterChannel()this.transition({phase: this.supported ? 'idle' : 'unsupported',@@ -122,6 +136,7 @@ export class UpdateManager {)}if (this.checkPromise) return this.checkPromise+ if (this.installRequested) return Promise.resolve(undefined)if (this.state.phase === 'downloading' ||this.state.phase === 'downloaded'@@ -133,6 +148,7 @@ export class UpdateManager {)}+ this.refreshInstallPolicy()this.transition({phase: 'checking',currentVersion: this.state.currentVersion,@@ -156,6 +172,7 @@ export class UpdateManager {)}if (this.downloadPromise) return this.downloadPromise+ if (this.installRequested) return Promise.resolve(undefined)const canDownload =this.state.phase === 'available' ||this.state.phase === 'cancelled' ||@@ -163,6 +180,11 @@ export class UpdateManager {if (!canDownload || !this.state.availableVersion) {return Promise.reject(new Error('No update is available to download'))}+ this.refreshInstallPolicy()+ if (this.manualInstallReason) {+ this.transition({ ...this.state })+ return Promise.resolve(undefined)+ }this.transition({...this.state,@@ -191,13 +213,35 @@ export class UpdateManager {if (!this.supported) {throw new Error('Automatic updates are not supported in this build')}+ if (this.installRequested) returnif (this.state.phase !== 'downloaded') {throw new Error('Update is not ready to install')}- this.updater.quitAndInstall()+ // Recheck immediately before native code can move the installed bundle.+ this.refreshInstallPolicy()+ if (this.manualInstallReason) {+ this.transition({ ...this.state })+ return+ }+ this.installRequested = true+ log.info(+ { version: this.state.availableVersion },+ 'Starting update installation'+ )+ this.transition({ ...this.state, phase: 'installing', error: undefined })+ try {+ this.updater.quitAndInstall()+ } catch (error) {+ this.transitionToError(error)+ }}private consumeUpdaterEvent(source: string, payload: unknown): void {+ // macOS starts a second, native download/verification during installation.+ // Those events must not expose another install or retry action. A native+ // failure may leave pending install callbacks, so retry requires a fresh+ // process or a manual replacement rather than reusing that updater.+ if (this.installRequested && source !== 'error') returnswitch (source) {case 'checking-for-update':if (this.state.phase !== 'checking') {@@ -283,6 +327,11 @@ export class UpdateManager {}private transitionToError(error: unknown): void {+ log.error(+ { err: error, phase: this.state.phase },+ 'Application update failed'+ )+ if (this.installRequested) this.manualInstallReason = 'install-failed'this.transition({...this.state,phase: 'error',@@ -290,6 +339,20 @@ export class UpdateManager {error: { message: errorMessage(error) },})}++ private refreshInstallPolicy(): void {+ try {+ this.manualInstallReason = this.getInstallBlockReason?.()+ } catch {+ this.manualInstallReason = 'location-unavailable'+ }+ if (this.manualInstallReason) {+ log.warn(+ { reason: this.manualInstallReason },+ 'Using manual update installation'+ )+ }+ }}const STRICT_SEMVER_PATTERN =diff --git a/src/main/index.ts b/src/main/index.tsindex 592f6167..4dc93363 100644--- a/src/main/index.ts+++ b/src/main/index.ts@@ -208,6 +208,7 @@ import { resolveDesktopBackgroundPolicy } from './platform/desktop-background-poimport { resolveDistributionContext } from './platform/distribution-context'import { removePathRecursive, renameAtomic } from './platform/fs-helpers'import { setupGraphicsRecovery } from './platform/graphics-recovery-runtime'+import { getMacUpdateInstallBlockReason } from './platform/mac-update-install-policy'import { setupNativeThemeSync } from './platform/native-theme-sync'import { setupPowerManager } from './platform/power-manager'import { createProtocolManager } from './platform/protocol-manager'@@ -2447,6 +2448,13 @@ async function initializeMainProcess(): Promise<void> {channel: settingsManager.getApp().updateChannel,isWindowsPackage: distributionContext.isWindowsPackage,supported: updatesSupported,+ getInstallBlockReason: () =>+ getMacUpdateInstallBlockReason({+ platform: process.platform,+ isPackaged: app.isPackaged,+ execPath: process.execPath,+ temporaryDirectory: app.getPath('temp'),+ }),loadUpdater: async () =>developmentUpdateSimulator ??(await import('electron-updater')).default.autoUpdater,diff --git a/src/main/platform/mac-update-install-policy.test.ts b/src/main/platform/mac-update-install-policy.test.tsnew file mode 100644index 00000000..616b5e9c--- /dev/null+++ b/src/main/platform/mac-update-install-policy.test.ts@@ -0,0 +1,73 @@+import { statSync } from 'node:fs'+import { beforeEach, describe, expect, it, vi } from 'vitest'+import { getMacUpdateInstallBlockReason } from './mac-update-install-policy'++vi.mock('node:fs', () => ({ statSync: vi.fn() }))++const context = {+ platform: 'darwin' as const,+ isPackaged: true,+ execPath: '/Users/test/Applications/Motrix.app/Contents/MacOS/Motrix',+ temporaryDirectory: '/private/var/folders/test/T',+}+const directory = (dev: number) =>+ ({ dev, isDirectory: () => true }) as ReturnType<typeof statSync>++beforeEach(() => {+ vi.mocked(statSync).mockReset().mockReturnValue(directory(1))+})++describe('getMacUpdateInstallBlockReason', () => {+ it.each([+ '/Applications/Motrix.app/Contents/MacOS/Motrix',+ '/Users/test/Applications/Motrix.app/Contents/MacOS/Motrix',+ '/Users/test/Other Apps/Motrix.app/Contents/MacOS/Motrix',+ '/Volumes/Alias/Motrix.app/Contents/MacOS/Motrix',+ ])('allows the same filesystem regardless of the path: %s', (execPath) => {+ expect(+ getMacUpdateInstallBlockReason({ ...context, execPath })+ ).toBeUndefined()+ })++ it('blocks a different filesystem even without a /Volumes prefix', () => {+ vi.mocked(statSync).mockImplementation((location) =>+ directory(location === context.temporaryDirectory ? 1 : 2)+ )+ expect(getMacUpdateInstallBlockReason(context)).toBe('cross-volume')+ })++ it('blocks a bundle mounted separately from its parent', () => {+ vi.mocked(statSync)+ .mockReturnValueOnce(directory(1))+ .mockReturnValueOnce(directory(2))+ expect(getMacUpdateInstallBlockReason(context)).toBe('cross-volume')+ })++ it('fails closed when the bundle or temporary directory is unavailable', () => {+ vi.mocked(statSync).mockImplementation(() => {+ throw new Error('EACCES')+ })+ expect(getMacUpdateInstallBlockReason(context)).toBe('location-unavailable')+ })++ it('does not infer a bundle from an unexpected executable layout', () => {+ expect(+ getMacUpdateInstallBlockReason({+ ...context,+ execPath: '/usr/bin/motrix',+ })+ ).toBe('location-unavailable')+ expect(statSync).not.toHaveBeenCalled()+ })++ it.each([+ { platform: 'win32' as const, isPackaged: true },+ { platform: 'linux' as const, isPackaged: true },+ { platform: 'darwin' as const, isPackaged: false },+ ])('does not inspect other platforms or development runs: %j', (override) => {+ expect(+ getMacUpdateInstallBlockReason({ ...context, ...override })+ ).toBeUndefined()+ expect(statSync).not.toHaveBeenCalled()+ })+})diff --git a/src/main/platform/mac-update-install-policy.ts b/src/main/platform/mac-update-install-policy.tsnew file mode 100644index 00000000..ccbef11a--- /dev/null+++ b/src/main/platform/mac-update-install-policy.ts@@ -0,0 +1,52 @@+import { statSync } from 'node:fs'+import path from 'node:path'+import type { AppUpdateState } from '@shared/types/app-update'++export interface MacUpdateInstallContext {+ platform: NodeJS.Platform+ isPackaged: boolean+ execPath: string+ temporaryDirectory: string+}++/**+ * Squirrel moves the installed app into NSTemporaryDirectory before replacing+ * it. Across volumes this is a copy/delete sequence, not an atomic rename;+ * interruption can leave the installed app missing. Keep these installations+ * on manual updates until the native installer can stage and recover safely.+ * https://github.com/Squirrel/Squirrel.Mac/issues/334+ */+export function getMacUpdateInstallBlockReason(+ context: MacUpdateInstallContext+): AppUpdateState['manualInstallReason'] {+ if (context.platform !== 'darwin' || !context.isPackaged) return undefined++ const executableDirectory = path.dirname(context.execPath)+ const contentsDirectory = path.dirname(executableDirectory)+ const bundleDirectory = path.dirname(contentsDirectory)+ if (+ path.basename(executableDirectory) !== 'MacOS' ||+ path.basename(contentsDirectory) !== 'Contents' ||+ !bundleDirectory.endsWith('.app')+ ) {+ return 'location-unavailable'+ }++ try {+ // stat follows links and compares actual filesystems, not path prefixes.+ // ~/Applications and other directories on the same volume remain valid.+ const bundle = statSync(bundleDirectory)+ const parent = statSync(path.dirname(bundleDirectory))+ const temporary = statSync(context.temporaryDirectory)+ if (!bundle.isDirectory() || !temporary.isDirectory()) {+ return 'location-unavailable'+ }+ if (bundle.dev !== temporary.dev || parent.dev !== bundle.dev) {+ return 'cross-volume'+ }+ return undefined+ } catch {+ // A disconnected or inaccessible volume must not reach quitAndInstall.+ return 'location-unavailable'+ }+}diff --git a/src/renderer/routes/settings/cards/about-dialog.test.tsx b/src/renderer/routes/settings/cards/about-dialog.test.tsxindex fcf90330..5104b77f 100644--- a/src/renderer/routes/settings/cards/about-dialog.test.tsx+++ b/src/renderer/routes/settings/cards/about-dialog.test.tsx@@ -425,8 +425,59 @@ describe('<AboutDialog>', () => {)expect(transport.invoke).toHaveBeenCalledWith(Commands.InstallUpdate)+ expect(screen.getByRole('button', { name: 'Installing…' })).toBeDisabled()})+ it('coalesces rapid install clicks and keeps the channel disabled during installation', async () => {+ renderDialog()+ await emitState({+ phase: 'downloaded',+ currentVersion: packageJson.version,+ availableVersion: '2.0.1',+ })+ await userEvent.dblClick(+ screen.getByRole('button', { name: 'Restart and install' })+ )+ expect(+ vi+ .mocked(transport.invoke)+ .mock.calls.filter(([channel]) => channel === Commands.InstallUpdate)+ ).toHaveLength(1)+ await emitState({+ phase: 'installing',+ currentVersion: packageJson.version,+ availableVersion: '2.0.1',+ })+ expect(screen.getByRole('button', { name: 'Installing…' })).toBeDisabled()+ expect(+ screen.getByRole('combobox', { name: 'Update channel' })+ ).toBeDisabled()+ })++ it.each(['available', 'downloaded'] as const)(+ 'offers manual replacement for a cross-volume %s update',+ async (phase) => {+ renderDialog()+ await emitState({+ phase,+ currentVersion: packageJson.version,+ availableVersion: '2.0.1',+ manualInstallReason: 'cross-volume',+ })+ expect(+ screen.getByRole('link', { name: 'Download manually' })+ ).toHaveAttribute('href', EXTERNAL_URLS.github.releases)+ expect(+ screen.getByText(/Automatic installation across disks/)+ ).toBeInTheDocument()+ expect(+ screen.queryByRole('button', { name: 'Restart and install' })+ ).not.toBeInTheDocument()+ expect(transport.invoke).not.toHaveBeenCalledWith(Commands.DownloadUpdate)+ expect(transport.invoke).not.toHaveBeenCalledWith(Commands.InstallUpdate)+ }+ )+it('surfaces an install command failure without losing the update version', async () => {renderDialog()await emitState({@@ -448,8 +499,13 @@ describe('<AboutDialog>', () => {expect(screen.getByRole('alert')).toHaveTextContent('Update failed: installer launch failed')- await userEvent.click(screen.getByRole('button', { name: 'Retry' }))- expect(transport.invoke).toHaveBeenCalledWith(Commands.DownloadUpdate)+ expect(+ screen.getByRole('link', { name: 'Download manually' })+ ).toHaveAttribute('href', EXTERNAL_URLS.github.releases)+ expect(+ screen.queryByRole('button', { name: 'Retry' })+ ).not.toBeInTheDocument()+ expect(transport.invoke).not.toHaveBeenCalledWith(Commands.DownloadUpdate)})it('keeps a newer update event when the initial snapshot resolves late', async () => {diff --git a/src/renderer/routes/settings/cards/app-update-section.tsx b/src/renderer/routes/settings/cards/app-update-section.tsxindex 75b07779..a8aa1d78 100644--- a/src/renderer/routes/settings/cards/app-update-section.tsx+++ b/src/renderer/routes/settings/cards/app-update-section.tsx@@ -4,9 +4,10 @@ import {RestartIcon,} from '@renderer/components/icons'import { Alert } from '@renderer/components/ui/alert'-import { Button } from '@renderer/components/ui/button'+import { Button, buttonVariants } from '@renderer/components/ui/button'import { Spinner } from '@renderer/components/ui/spinner'import { cn } from '@renderer/lib/utils'+import { EXTERNAL_URLS } from '@shared/external-urls'import type { AppUpdateState } from '@shared/types/app-update'import type { AppUpdateChannel } from '@shared/types/settings'import type { ReactNode } from 'react'@@ -54,7 +55,9 @@ export function AppUpdateSection({ update }: { update: AppUpdateController }) {state.phase === 'unsupported' ||state.phase === 'checking' ||state.phase === 'downloading' ||- state.phase === 'downloaded'+ state.phase === 'downloaded' ||+ state.phase === 'installing' ||+ state.manualInstallReason === 'install-failed'}><UpdateActionButton@@ -116,6 +119,24 @@ function UpdateActionButton({}: UpdateActionButtonProps) {const { t } = useTranslation()+ if (state.manualInstallReason && state.availableVersion) {+ return (+ <a+ href={EXTERNAL_URLS.github.releases}+ target="_blank"+ rel="noopener noreferrer"+ data-slot="button"+ className={cn(+ buttonVariants({ size: 'sm' }),+ 'h-7! gap-1.5 rounded-md! px-2 text-xs shadow-none [&_svg]:size-3.5!'+ )}+ >+ <InstallIcon data-icon="inline-start" aria-hidden="true" />+ {t('settings.about.update.manualDownload')}+ </a>+ )+ }+const progress =state.phase === 'downloading'? Math.min(100, Math.max(0, Math.round(state.progress?.percent ?? 0)))@@ -133,7 +154,9 @@ function UpdateActionButton({)}aria-label={action.accessibleLabel}aria-busy={- state.phase === 'checking' || state.phase === 'downloading'+ state.phase === 'checking' ||+ state.phase === 'downloading' ||+ state.phase === 'installing'? true: undefined}@@ -189,6 +212,13 @@ function updateAction(disabled: true,variant: 'default',}+ case 'installing':+ return {+ label: t('settings.about.update.installing'),+ icon: <Spinner data-icon="inline-start" aria-hidden="true" />,+ disabled: true,+ variant: 'default',+ }case 'downloaded':return {label: t('settings.about.update.restart'),@@ -238,6 +268,8 @@ function statusTitle(})case 'downloaded':return t('settings.about.update.downloadedTitle')+ case 'installing':+ return t('settings.about.update.installing')case 'cancelled':return t('settings.about.update.cancelledTitle')case 'error':@@ -251,6 +283,11 @@ function statusDescription(state: AppUpdateState,t: ReturnType<typeof useTranslation>['t']): string {+ if (state.manualInstallReason && state.availableVersion) {+ return state.manualInstallReason === 'cross-volume'+ ? t('settings.about.update.manualCrossVolume')+ : t('settings.about.update.manualInstall')+ }switch (state.phase) {case 'managed':return t('settings.about.update.managedDescription')@@ -272,6 +309,8 @@ function statusDescription(return t('settings.about.update.downloaded', {version: state.availableVersion,})+ case 'installing':+ return t('settings.about.update.installingDescription')case 'cancelled':return t('settings.about.update.cancelledDescription')case 'error':diff --git a/src/renderer/routes/settings/cards/use-app-update.ts b/src/renderer/routes/settings/cards/use-app-update.tsindex b9f7e14a..bac8be67 100644--- a/src/renderer/routes/settings/cards/use-app-update.ts+++ b/src/renderer/routes/settings/cards/use-app-update.ts@@ -15,6 +15,7 @@ export function useAppUpdate(enabled = true) {const [hasState, setHasState] = useState(false)const [loading, setLoading] = useState(true)const systemManaged = useRef(false)+ const installRequested = useRef(false)useEffect(() => {if (!enabled) return@@ -25,6 +26,9 @@ export function useAppUpdate(enabled = true) {const applyState = (value: unknown) => {const next = value as AppUpdateState+ installRequested.current =+ next.phase === 'installing' ||+ next.manualInstallReason === 'install-failed'// Update authority is fixed for this host. A late event from an older// backend must not restore app-managed actions after a managed snapshot.systemManaged.current ||= isSystemManaged(next)@@ -104,6 +108,9 @@ export function useAppUpdate(enabled = true) {phase: 'error',progress: undefined,error: { message: toMessage(error) },+ ...(command === Commands.InstallUpdate+ ? { manualInstallReason: 'install-failed' as const }+ : {}),})}@@ -117,7 +124,16 @@ export function useAppUpdate(enabled = true) {showControls,check: () => invoke(Commands.CheckForUpdates),download: () => invoke(Commands.DownloadUpdate),- install: () => invoke(Commands.InstallUpdate),+ install: () => {+ if (installRequested.current || !showControls) return Promise.resolve()+ installRequested.current = true+ setState((current) => ({+ ...current,+ phase: 'installing',+ error: undefined,+ }))+ return invoke(Commands.InstallUpdate)+ },}}diff --git a/src/shared/external-urls.ts b/src/shared/external-urls.tsindex 18ddecb0..da93e6f6 100644--- a/src/shared/external-urls.ts+++ b/src/shared/external-urls.ts@@ -20,6 +20,7 @@ export const EXTERNAL_URLS = {repository: 'https://github.com/agalwood/Motrix/',author: 'https://github.com/agalwood/',issues: 'https://github.com/agalwood/Motrix/issues/',+ releases: 'https://github.com/agalwood/Motrix/releases',ffmpegStaticReleases:'https://github.com/motrixapp/ffmpeg-static/releases/latest',},diff --git a/src/shared/locales/ar.json b/src/shared/locales/ar.jsonindex 0ac5c0ae..03da49cb 100644--- a/src/shared/locales/ar.json+++ b/src/shared/locales/ar.json@@ -1895,7 +1895,12 @@"managedDescription": "يُحدَّث إصدار Windows المعبّأ هذا عبر مصدر تثبيته الأصلي. التحديث من داخل التطبيق غير متاح.","unsupportedTitle": "التحديثات التلقائية غير متاحة","upToDate": "الإصدار {{version}} هو أحدث إصدار متاح.",- "upToDateTitle": "لديك أحدث إصدار من Motrix"+ "upToDateTitle": "لديك أحدث إصدار من Motrix",+ "installing": "جارٍ التثبيت…",+ "installingDescription": "جارٍ تجهيز التحديث. ستتم إعادة تشغيل Motrix عندما يصبح جاهزًا.",+ "manualDownload": "تنزيل يدوي",+ "manualInstall": "نزّل الإصدار الجديد، ثم أغلق Motrix واستبدل التطبيق المثبّت.",+ "manualCrossVolume": "التثبيت التلقائي بين الأقراص غير متاح حاليًا. نزّل الإصدار الجديد واستبدل Motrix يدويًا."},"version": "الإصدار {{version}}","webVersionNote": "يحدّث مسؤول النشر إصدار الويب هذا."diff --git a/src/shared/locales/bg.json b/src/shared/locales/bg.jsonindex 32fcd77f..de54c668 100644--- a/src/shared/locales/bg.json+++ b/src/shared/locales/bg.json@@ -1819,7 +1819,12 @@"managedDescription": "Това пакетирано издание за Windows се актуализира чрез първоначалния източник на инсталиране. Актуализациите в приложението не са налични.","unsupportedTitle": "Автоматичните актуализации са недостъпни","upToDate": "Версия {{version}} е най-новото налично издание.",- "upToDateTitle": "Motrix е с най-новата версия"+ "upToDateTitle": "Motrix е с най-новата версия",+ "installing": "Инсталиране…",+ "installingDescription": "Подготовка на актуализацията. Motrix ще се рестартира, когато е готова.",+ "manualDownload": "Изтегляне ръчно",+ "manualInstall": "Изтеглете новата версия, затворете Motrix и заменете инсталираното приложение.",+ "manualCrossVolume": "Автоматичното инсталиране между дискове в момента не е налично. Изтеглете новата версия и заменете Motrix ръчно."},"version": "Версия {{version}}","webVersionNote": "Това уеб издание се обновява от администратора, който го поддържа."diff --git a/src/shared/locales/ca.json b/src/shared/locales/ca.jsonindex 892b7f0f..8cbae4f4 100644--- a/src/shared/locales/ca.json+++ b/src/shared/locales/ca.json@@ -1838,7 +1838,12 @@"managedDescription": "Aquesta edició empaquetada per a Windows s’actualitza des de la font d’instal·lació original. Les actualitzacions des de l’aplicació no estan disponibles.","unsupportedTitle": "Actualitzacions automàtiques no disponibles","upToDate": "La versió {{version}} és l'última disponible.",- "upToDateTitle": "El Motrix està actualitzat"+ "upToDateTitle": "El Motrix està actualitzat",+ "installing": "S’està instal·lant…",+ "installingDescription": "S’està preparant l’actualització. Motrix es reiniciarà quan estigui llesta.",+ "manualDownload": "Baixa manualment",+ "manualInstall": "Baixa la nova versió, tanca Motrix i substitueix l’aplicació instal·lada.",+ "manualCrossVolume": "La instal·lació automàtica entre discs no està disponible actualment. Baixa la nova versió i substitueix Motrix manualment."},"version": "Versió {{version}}","webVersionNote": "L'administrador del desplegament actualitza aquesta edició web."diff --git a/src/shared/locales/de.json b/src/shared/locales/de.jsonindex c6ee76de..13391184 100644--- a/src/shared/locales/de.json+++ b/src/shared/locales/de.json@@ -1438,7 +1438,12 @@"channelStable": "Stabil","channelBeta": "Beta","channelBetaWarning": "Beta-Versionen können weniger stabil sein. Sie erhalten auch neuere stabile Versionen. Beim Zurückwechseln werden keine weiteren Beta-Updates installiert; ein Downgrade erfolgt nicht.",- "channelSaveError": "Der Update-Kanal konnte nicht gespeichert werden. Versuchen Sie es erneut."+ "channelSaveError": "Der Update-Kanal konnte nicht gespeichert werden. Versuchen Sie es erneut.",+ "installing": "Installation…",+ "installingDescription": "Das Update wird vorbereitet. Motrix startet neu, sobald es bereit ist.",+ "manualDownload": "Manuell herunterladen",+ "manualInstall": "Laden Sie die neue Version herunter, beenden Sie Motrix und ersetzen Sie die installierte Anwendung.",+ "manualCrossVolume": "Die automatische Installation zwischen Laufwerken ist derzeit nicht verfügbar. Laden Sie die neue Version herunter und ersetzen Sie Motrix manuell."},"details": {"author": "Autor",diff --git a/src/shared/locales/el.json b/src/shared/locales/el.jsonindex 93d71ac9..4807aa8a 100644--- a/src/shared/locales/el.json+++ b/src/shared/locales/el.json@@ -1819,7 +1819,12 @@"managedDescription": "Αυτή η έκδοση πακέτου για Windows ενημερώνεται μέσω της αρχικής πηγής εγκατάστασης. Οι ενημερώσεις μέσα από την εφαρμογή δεν είναι διαθέσιμες.","unsupportedTitle": "Οι αυτόματες ενημερώσεις δεν είναι διαθέσιμες","upToDate": "Η έκδοση {{version}} είναι η πιο πρόσφατη διαθέσιμη έκδοση.",- "upToDateTitle": "Το Motrix είναι ενημερωμένο"+ "upToDateTitle": "Το Motrix είναι ενημερωμένο",+ "installing": "Εγκατάσταση…",+ "installingDescription": "Προετοιμασία της ενημέρωσης. Το Motrix θα επανεκκινηθεί όταν είναι έτοιμη.",+ "manualDownload": "Μη αυτόματη λήψη",+ "manualInstall": "Κατεβάστε τη νέα έκδοση, κλείστε το Motrix και αντικαταστήστε την εγκατεστημένη εφαρμογή.",+ "manualCrossVolume": "Η αυτόματη εγκατάσταση μεταξύ δίσκων δεν είναι διαθέσιμη προς το παρόν. Κατεβάστε τη νέα έκδοση και αντικαταστήστε το Motrix μη αυτόματα."},"version": "Έκδοση {{version}}","webVersionNote": "Αυτή η έκδοση ιστού ενημερώνεται από τον διαχειριστή της εγκατάστασης."diff --git a/src/shared/locales/en-US.json b/src/shared/locales/en-US.jsonindex 7f412c79..b0df754c 100644--- a/src/shared/locales/en-US.json+++ b/src/shared/locales/en-US.json@@ -1438,7 +1438,12 @@"channelStable": "Stable","channelBeta": "Beta","channelBetaWarning": "Beta may be less stable. You’ll also receive newer stable releases. Switching back stops beta updates without downgrading.",- "channelSaveError": "Couldn’t save the update channel. Try again."+ "channelSaveError": "Couldn’t save the update channel. Try again.",+ "installing": "Installing…",+ "installingDescription": "Preparing the update. Motrix will restart when it is ready.",+ "manualDownload": "Download manually",+ "manualInstall": "Download the new version, quit Motrix, and replace the installed application.",+ "manualCrossVolume": "Automatic installation across disks is currently unavailable. Download the new version and replace Motrix manually."},"details": {"author": "Author",diff --git a/src/shared/locales/es.json b/src/shared/locales/es.jsonindex f47f9cbc..68767e0e 100644--- a/src/shared/locales/es.json+++ b/src/shared/locales/es.json@@ -1452,7 +1452,12 @@"channelStable": "Estable","channelBeta": "Beta","channelBetaWarning": "Las versiones beta pueden ser menos estables. También recibirás las nuevas versiones estables. Al volver al canal estable, dejarás de recibir actualizaciones beta sin instalar una versión anterior.",- "channelSaveError": "No se pudo guardar el canal de actualizaciones. Vuelve a intentarlo."+ "channelSaveError": "No se pudo guardar el canal de actualizaciones. Vuelve a intentarlo.",+ "installing": "Instalando…",+ "installingDescription": "Preparando la actualización. Motrix se reiniciará cuando esté lista.",+ "manualDownload": "Descargar manualmente",+ "manualInstall": "Descarga la nueva versión, cierra Motrix y sustituye la aplicación instalada.",+ "manualCrossVolume": "La instalación automática entre discos no está disponible actualmente. Descarga la nueva versión y sustituye Motrix manualmente."},"details": {"author": "Autor",diff --git a/src/shared/locales/fa.json b/src/shared/locales/fa.jsonindex 3922c025..a936b7d1 100644--- a/src/shared/locales/fa.json+++ b/src/shared/locales/fa.json@@ -1819,7 +1819,12 @@"managedDescription": "این نسخهٔ بستهبندیشدهٔ ویندوز از طریق منبع اصلی نصب بهروزرسانی میشود. بهروزرسانی درون برنامه در دسترس نیست.","unsupportedTitle": "بهروزرسانی خودکار در دسترس نیست","upToDate": "نسخهٔ {{version}} آخرین نسخهٔ موجود است.",- "upToDateTitle": "Motrix بهروز است"+ "upToDateTitle": "Motrix بهروز است",+ "installing": "در حال نصب…",+ "installingDescription": "در حال آمادهسازی بهروزرسانی. Motrix پس از آماده شدن دوباره راهاندازی میشود.",+ "manualDownload": "دانلود دستی",+ "manualInstall": "نسخه جدید را دانلود کنید، Motrix را ببندید و برنامه نصبشده را جایگزین کنید.",+ "manualCrossVolume": "نصب خودکار بین دیسکها در حال حاضر در دسترس نیست. نسخه جدید را دانلود کنید و Motrix را بهصورت دستی جایگزین کنید."},"version": "نسخهٔ {{version}}","webVersionNote": "این نسخهٔ وب را مدیر استقرار آن بهروز میکند."diff --git a/src/shared/locales/fr.json b/src/shared/locales/fr.jsonindex b08aed44..38cb06ed 100644--- a/src/shared/locales/fr.json+++ b/src/shared/locales/fr.json@@ -1838,7 +1838,12 @@"managedDescription": "Cette édition Windows empaquetée se met à jour via sa source d’installation d’origine. Les mises à jour depuis l’application ne sont pas disponibles.","unsupportedTitle": "Mises à jour automatiques indisponibles","upToDate": "La version {{version}} est la dernière version disponible.",- "upToDateTitle": "Motrix est à jour"+ "upToDateTitle": "Motrix est à jour",+ "installing": "Installation…",+ "installingDescription": "Préparation de la mise à jour. Motrix redémarrera dès qu’elle sera prête.",+ "manualDownload": "Télécharger manuellement",+ "manualInstall": "Téléchargez la nouvelle version, quittez Motrix et remplacez l’application installée.",+ "manualCrossVolume": "L’installation automatique entre disques est actuellement indisponible. Téléchargez la nouvelle version et remplacez Motrix manuellement."},"version": "Version {{version}}","webVersionNote": "Cette édition web est mise à jour par l’administrateur de son déploiement."diff --git a/src/shared/locales/hu.json b/src/shared/locales/hu.jsonindex 3c316752..71ce6e4e 100644--- a/src/shared/locales/hu.json+++ b/src/shared/locales/hu.json@@ -1438,7 +1438,12 @@"channelStable": "Stabil","channelBeta": "Béta","channelBetaWarning": "A béta kevésbé stabil lehet. Az újabb stabil kiadásokat is megkapod. A visszaváltás leállítja a béta frissítéseket, de nem állít vissza régebbi verziót.",- "channelSaveError": "A frissítési csatornát nem sikerült menteni. Próbáld újra."+ "channelSaveError": "A frissítési csatornát nem sikerült menteni. Próbáld újra.",+ "installing": "Telepítés…",+ "installingDescription": "A frissítés előkészítése folyamatban van. A Motrix újraindul, amint elkészült.",+ "manualDownload": "Kézi letöltés",+ "manualInstall": "Töltse le az új verziót, zárja be a Motrix alkalmazást, majd cserélje le a telepített alkalmazást.",+ "manualCrossVolume": "A lemezek közötti automatikus telepítés jelenleg nem érhető el. Töltse le az új verziót, és cserélje le kézzel a Motrix alkalmazást."},"details": {"author": "Szerző",diff --git a/src/shared/locales/id.json b/src/shared/locales/id.jsonindex 4f874d93..518ac081 100644--- a/src/shared/locales/id.json+++ b/src/shared/locales/id.json@@ -1424,7 +1424,12 @@"channelStable": "Stabil","channelBeta": "Beta","channelBetaWarning": "Versi beta mungkin kurang stabil. Anda juga akan menerima rilis stabil yang lebih baru. Beralih kembali menghentikan pembaruan beta tanpa menurunkan versi.",- "channelSaveError": "Saluran pembaruan tidak dapat disimpan. Coba lagi."+ "channelSaveError": "Saluran pembaruan tidak dapat disimpan. Coba lagi.",+ "installing": "Memasang…",+ "installingDescription": "Menyiapkan pembaruan. Motrix akan dimulai ulang setelah siap.",+ "manualDownload": "Unduh manual",+ "manualInstall": "Unduh versi baru, tutup Motrix, lalu ganti aplikasi yang terpasang.",+ "manualCrossVolume": "Pemasangan otomatis antar disk saat ini tidak tersedia. Unduh versi baru dan ganti Motrix secara manual."},"details": {"author": "Pembuat",diff --git a/src/shared/locales/it.json b/src/shared/locales/it.jsonindex ba5b01d4..50b67ece 100644--- a/src/shared/locales/it.json+++ b/src/shared/locales/it.json@@ -1452,7 +1452,12 @@"channelStable": "Stabile","channelBeta": "Beta","channelBetaWarning": "Le versioni beta possono essere meno stabili. Riceverai anche le nuove versioni stabili. Tornando al canale stabile, gli aggiornamenti beta si interrompono senza installare una versione precedente.",- "channelSaveError": "Impossibile salvare il canale di aggiornamento. Riprova."+ "channelSaveError": "Impossibile salvare il canale di aggiornamento. Riprova.",+ "installing": "Installazione…",+ "installingDescription": "Preparazione dell’aggiornamento. Motrix si riavvierà quando sarà pronto.",+ "manualDownload": "Scarica manualmente",+ "manualInstall": "Scarica la nuova versione, chiudi Motrix e sostituisci l’applicazione installata.",+ "manualCrossVolume": "L’installazione automatica tra dischi non è attualmente disponibile. Scarica la nuova versione e sostituisci Motrix manualmente."},"details": {"author": "Autore",diff --git a/src/shared/locales/ja.json b/src/shared/locales/ja.jsonindex 866f17fe..9c457e9d 100644--- a/src/shared/locales/ja.json+++ b/src/shared/locales/ja.json@@ -1424,7 +1424,12 @@"channelStable": "安定版","channelBeta": "ベータ版","channelBetaWarning": "ベータ版は動作が不安定な場合があります。新しい安定版も受け取れます。安定版に戻すとベータ版の配信は停止しますが、ダウングレードは行われません。",- "channelSaveError": "アップデートチャンネルを保存できませんでした。もう一度お試しください。"+ "channelSaveError": "アップデートチャンネルを保存できませんでした。もう一度お試しください。",+ "installing": "インストール中…",+ "installingDescription": "更新を準備しています。準備ができると Motrix が再起動します。",+ "manualDownload": "手動でダウンロード",+ "manualInstall": "新しいバージョンをダウンロードし、Motrix を終了してからアプリを置き換えてください。",+ "manualCrossVolume": "現在、異なるディスク間での自動インストールには対応していません。新しいバージョンをダウンロードして Motrix を手動で置き換えてください。"},"details": {"author": "作者",diff --git a/src/shared/locales/ko.json b/src/shared/locales/ko.jsonindex 41a5ebcf..301130d0 100644--- a/src/shared/locales/ko.json+++ b/src/shared/locales/ko.json@@ -1424,7 +1424,12 @@"channelStable": "안정","channelBeta": "베타","channelBetaWarning": "베타는 안정성이 낮을 수 있습니다. 더 새로운 안정 버전도 받게 됩니다. 안정 채널로 돌아가면 버전을 낮추지 않고 베타 업데이트만 중단합니다.",- "channelSaveError": "업데이트 채널을 저장하지 못했습니다. 다시 시도하세요."+ "channelSaveError": "업데이트 채널을 저장하지 못했습니다. 다시 시도하세요.",+ "installing": "설치 중…",+ "installingDescription": "업데이트를 준비하고 있습니다. 준비가 완료되면 Motrix가 다시 시작됩니다.",+ "manualDownload": "수동 다운로드",+ "manualInstall": "새 버전을 다운로드하고 Motrix를 종료한 다음 설치된 앱을 교체하세요.",+ "manualCrossVolume": "현재 다른 디스크 간 자동 설치는 지원되지 않습니다. 새 버전을 다운로드하고 Motrix를 수동으로 교체하세요."},"details": {"author": "제작자",diff --git a/src/shared/locales/nb.json b/src/shared/locales/nb.jsonindex 5cdfd00b..d218afe5 100644--- a/src/shared/locales/nb.json+++ b/src/shared/locales/nb.json@@ -1819,7 +1819,12 @@"managedDescription": "Denne pakkede Windows-utgaven oppdateres via den opprinnelige installasjonskilden. Oppdatering fra appen er ikke tilgjengelig.","unsupportedTitle": "Automatiske oppdateringer er utilgjengelige","upToDate": "Versjon {{version}} er den nyeste tilgjengelige utgaven.",- "upToDateTitle": "Motrix er oppdatert"+ "upToDateTitle": "Motrix er oppdatert",+ "installing": "Installerer…",+ "installingDescription": "Forbereder oppdateringen. Motrix starter på nytt når den er klar.",+ "manualDownload": "Last ned manuelt",+ "manualInstall": "Last ned den nye versjonen, avslutt Motrix og erstatt den installerte appen.",+ "manualCrossVolume": "Automatisk installasjon mellom disker er foreløpig utilgjengelig. Last ned den nye versjonen og erstatt Motrix manuelt."},"version": "Versjon {{version}}","webVersionNote": "Denne nettutgaven oppdateres av administratoren for installasjonen."diff --git a/src/shared/locales/nl.json b/src/shared/locales/nl.jsonindex 5e707850..78f4fe44 100644--- a/src/shared/locales/nl.json+++ b/src/shared/locales/nl.json@@ -1819,7 +1819,12 @@"managedDescription": "Deze verpakte Windows-editie wordt bijgewerkt via de oorspronkelijke installatiebron. Updates vanuit de app zijn niet beschikbaar.","unsupportedTitle": "Automatische updates niet beschikbaar","upToDate": "Versie {{version}} is de nieuwste beschikbare versie.",- "upToDateTitle": "Motrix is up-to-date"+ "upToDateTitle": "Motrix is up-to-date",+ "installing": "Installeren…",+ "installingDescription": "De update wordt voorbereid. Motrix start opnieuw zodra deze klaar is.",+ "manualDownload": "Handmatig downloaden",+ "manualInstall": "Download de nieuwe versie, sluit Motrix af en vervang de geïnstalleerde app.",+ "manualCrossVolume": "Automatische installatie tussen schijven is momenteel niet beschikbaar. Download de nieuwe versie en vervang Motrix handmatig."},"version": "Versie {{version}}","webVersionNote": "Deze webversie wordt bijgewerkt door de beheerder van de installatie."diff --git a/src/shared/locales/pl.json b/src/shared/locales/pl.jsonindex 4e94a90e..4f6ebd73 100644--- a/src/shared/locales/pl.json+++ b/src/shared/locales/pl.json@@ -1466,7 +1466,12 @@"channelStable": "Stabilny","channelBeta": "Beta","channelBetaWarning": "Wersje beta mogą być mniej stabilne. Otrzymasz także nowsze wydania stabilne. Powrót do kanału stabilnego zatrzyma aktualizacje beta bez przywracania starszej wersji.",- "channelSaveError": "Nie udało się zapisać kanału aktualizacji. Spróbuj ponownie."+ "channelSaveError": "Nie udało się zapisać kanału aktualizacji. Spróbuj ponownie.",+ "installing": "Instalowanie…",+ "installingDescription": "Przygotowywanie aktualizacji. Motrix uruchomi się ponownie, gdy będzie gotowa.",+ "manualDownload": "Pobierz ręcznie",+ "manualInstall": "Pobierz nową wersję, zamknij Motrix i zastąp zainstalowaną aplikację.",+ "manualCrossVolume": "Automatyczna instalacja między dyskami jest obecnie niedostępna. Pobierz nową wersję i zastąp Motrix ręcznie."},"details": {"author": "Autor",diff --git a/src/shared/locales/pt-BR.json b/src/shared/locales/pt-BR.jsonindex e3ca234f..70cbfcae 100644--- a/src/shared/locales/pt-BR.json+++ b/src/shared/locales/pt-BR.json@@ -1452,7 +1452,12 @@"channelStable": "Estável","channelBeta": "Beta","channelBetaWarning": "As versões beta podem ser menos estáveis. Você também receberá versões estáveis mais recentes. Voltar ao canal estável interrompe as atualizações beta sem instalar uma versão anterior.",- "channelSaveError": "Não foi possível salvar o canal de atualização. Tente novamente."+ "channelSaveError": "Não foi possível salvar o canal de atualização. Tente novamente.",+ "installing": "Instalando…",+ "installingDescription": "Preparando a atualização. O Motrix será reiniciado quando estiver pronta.",+ "manualDownload": "Baixar manualmente",+ "manualInstall": "Baixe a nova versão, feche o Motrix e substitua o aplicativo instalado.",+ "manualCrossVolume": "A instalação automática entre discos está indisponível no momento. Baixe a nova versão e substitua o Motrix manualmente."},"details": {"author": "Autor",diff --git a/src/shared/locales/ro.json b/src/shared/locales/ro.jsonindex f64bbe2e..2808c482 100644--- a/src/shared/locales/ro.json+++ b/src/shared/locales/ro.json@@ -1838,7 +1838,12 @@"managedDescription": "Această ediție Windows împachetată se actualizează prin sursa de instalare originală. Actualizările din aplicație nu sunt disponibile.","unsupportedTitle": "Actualizările automate nu sunt disponibile","upToDate": "Versiunea {{version}} este cea mai nouă versiune disponibilă.",- "upToDateTitle": "Motrix este la zi"+ "upToDateTitle": "Motrix este la zi",+ "installing": "Se instalează…",+ "installingDescription": "Se pregătește actualizarea. Motrix va reporni când este gata.",+ "manualDownload": "Descarcă manual",+ "manualInstall": "Descarcă noua versiune, închide Motrix și înlocuiește aplicația instalată.",+ "manualCrossVolume": "Instalarea automată între discuri nu este disponibilă momentan. Descarcă noua versiune și înlocuiește Motrix manual."},"version": "Versiunea {{version}}","webVersionNote": "Această ediție web este actualizată de administratorul instalării."diff --git a/src/shared/locales/ru.json b/src/shared/locales/ru.jsonindex 484095b5..e0b8ccef 100644--- a/src/shared/locales/ru.json+++ b/src/shared/locales/ru.json@@ -1466,7 +1466,12 @@"channelStable": "Стабильный","channelBeta": "Бета","channelBetaWarning": "Бета-версии могут работать менее стабильно. Вы также будете получать новые стабильные версии. Возврат к стабильному каналу прекратит получение бета-обновлений, но не понизит установленную версию.",- "channelSaveError": "Не удалось сохранить канал обновлений. Повторите попытку."+ "channelSaveError": "Не удалось сохранить канал обновлений. Повторите попытку.",+ "installing": "Установка…",+ "installingDescription": "Подготовка обновления. Motrix перезапустится, когда оно будет готово.",+ "manualDownload": "Скачать вручную",+ "manualInstall": "Скачайте новую версию, закройте Motrix и замените установленное приложение.",+ "manualCrossVolume": "Автоматическая установка между дисками сейчас недоступна. Скачайте новую версию и замените Motrix вручную."},"details": {"author": "Автор",diff --git a/src/shared/locales/th.json b/src/shared/locales/th.jsonindex 965e3b9c..380f1b0a 100644--- a/src/shared/locales/th.json+++ b/src/shared/locales/th.json@@ -1800,7 +1800,12 @@"managedDescription": "Windows รุ่นแพ็กเกจนี้อัปเดตผ่านแหล่งติดตั้งเดิม ไม่สามารถอัปเดตภายในแอปได้","unsupportedTitle": "การอัปเดตอัตโนมัติไม่พร้อมใช้งาน","upToDate": "เวอร์ชัน {{version}} เป็นรุ่นล่าสุดที่มีให้ใช้งาน",- "upToDateTitle": "Motrix เป็นรุ่นล่าสุดแล้ว"+ "upToDateTitle": "Motrix เป็นรุ่นล่าสุดแล้ว",+ "installing": "กำลังติดตั้ง…",+ "installingDescription": "กำลังเตรียมการอัปเดต Motrix จะเริ่มใหม่เมื่อพร้อม",+ "manualDownload": "ดาวน์โหลดด้วยตนเอง",+ "manualInstall": "ดาวน์โหลดเวอร์ชันใหม่ ปิด Motrix แล้วแทนที่แอปที่ติดตั้งอยู่",+ "manualCrossVolume": "ขณะนี้ยังไม่รองรับการติดตั้งอัตโนมัติข้ามดิสก์ โปรดดาวน์โหลดเวอร์ชันใหม่และแทนที่ Motrix ด้วยตนเอง"},"version": "เวอร์ชัน {{version}}","webVersionNote": "รุ่นเว็บนี้อัปเดตโดยผู้ดูแลการติดตั้ง"diff --git a/src/shared/locales/tr.json b/src/shared/locales/tr.jsonindex 2ae1c0ed..d6f27d71 100644--- a/src/shared/locales/tr.json+++ b/src/shared/locales/tr.json@@ -1438,7 +1438,12 @@"channelStable": "Kararlı","channelBeta": "Beta","channelBetaWarning": "Beta daha az kararlı olabilir. Yeni kararlı sürümleri de alırsınız. Kararlı kanala dönmek, sürümü düşürmeden beta güncellemelerini durdurur.",- "channelSaveError": "Güncelleme kanalı kaydedilemedi. Tekrar deneyin."+ "channelSaveError": "Güncelleme kanalı kaydedilemedi. Tekrar deneyin.",+ "installing": "Yükleniyor…",+ "installingDescription": "Güncelleme hazırlanıyor. Hazır olduğunda Motrix yeniden başlatılacak.",+ "manualDownload": "Elle indir",+ "manualInstall": "Yeni sürümü indirin, Motrix’i kapatın ve yüklü uygulamayı değiştirin.",+ "manualCrossVolume": "Diskler arasında otomatik yükleme şu anda kullanılamıyor. Yeni sürümü indirin ve Motrix’i elle değiştirin."},"details": {"author": "Yazar",diff --git a/src/shared/locales/uk.json b/src/shared/locales/uk.jsonindex db38c4d2..788d6742 100644--- a/src/shared/locales/uk.json+++ b/src/shared/locales/uk.json@@ -1857,7 +1857,12 @@"managedDescription": "Ця пакетна версія для Windows оновлюється через початкове джерело встановлення. Оновлення всередині застосунку недоступні.","unsupportedTitle": "Автоматичні оновлення недоступні","upToDate": "Версія {{version}} — найновіший доступний випуск.",- "upToDateTitle": "Встановлено найновішу версію Motrix"+ "upToDateTitle": "Встановлено найновішу версію Motrix",+ "installing": "Встановлення…",+ "installingDescription": "Підготовка оновлення. Motrix перезапуститься, коли воно буде готове.",+ "manualDownload": "Завантажити вручну",+ "manualInstall": "Завантажте нову версію, закрийте Motrix і замініть встановлений застосунок.",+ "manualCrossVolume": "Автоматичне встановлення між дисками наразі недоступне. Завантажте нову версію та замініть Motrix вручну."},"version": "Версія {{version}}","webVersionNote": "Цю вебверсію оновлює адміністратор розгортання."diff --git a/src/shared/locales/vi.json b/src/shared/locales/vi.jsonindex 9b3549f8..e92319b7 100644--- a/src/shared/locales/vi.json+++ b/src/shared/locales/vi.json@@ -1424,7 +1424,12 @@"channelStable": "Ổn định","channelBeta": "Beta","channelBetaWarning": "Bản beta có thể kém ổn định hơn. Bạn cũng sẽ nhận các bản phát hành ổn định mới hơn. Chuyển về kênh ổn định sẽ ngừng cập nhật beta mà không hạ phiên bản.",- "channelSaveError": "Không thể lưu kênh cập nhật. Hãy thử lại."+ "channelSaveError": "Không thể lưu kênh cập nhật. Hãy thử lại.",+ "installing": "Đang cài đặt…",+ "installingDescription": "Đang chuẩn bị bản cập nhật. Motrix sẽ khởi động lại khi sẵn sàng.",+ "manualDownload": "Tải xuống thủ công",+ "manualInstall": "Tải phiên bản mới, thoát Motrix rồi thay thế ứng dụng đã cài đặt.",+ "manualCrossVolume": "Hiện chưa hỗ trợ cài đặt tự động giữa các ổ đĩa. Hãy tải phiên bản mới và thay thế Motrix theo cách thủ công."},"details": {"author": "Tác giả",diff --git a/src/shared/locales/zh-CN.json b/src/shared/locales/zh-CN.jsonindex 3a1d2993..dc95e71f 100644--- a/src/shared/locales/zh-CN.json+++ b/src/shared/locales/zh-CN.json@@ -1390,7 +1390,12 @@"channelStable": "稳定版","channelBeta": "测试版","channelBetaWarning": "测试版可能不够稳定,也会接收后续稳定版。切回稳定版后不再接收测试版,不会自动降级。",- "channelSaveError": "无法保存更新通道,请重试。"+ "channelSaveError": "无法保存更新通道,请重试。",+ "installing": "正在安装…",+ "installingDescription": "正在准备更新,准备完成后 Motrix 将重新启动。",+ "manualDownload": "手动下载",+ "manualInstall": "请下载新版本,退出 Motrix 后替换已安装的应用。",+ "manualCrossVolume": "目前不支持跨磁盘自动安装更新。请下载新版本并手动替换 Motrix。"},"details": {"author": "作者",diff --git a/src/shared/locales/zh-TW.json b/src/shared/locales/zh-TW.jsonindex 1efa998a..fedfbdbe 100644--- a/src/shared/locales/zh-TW.json+++ b/src/shared/locales/zh-TW.json@@ -1424,7 +1424,12 @@"channelStable": "穩定版","channelBeta": "測試版","channelBetaWarning": "測試版可能不夠穩定,也會接收後續穩定版。切回穩定版後不再接收測試版,不會自動降級。",- "channelSaveError": "無法儲存更新通道。請再試一次。"+ "channelSaveError": "無法儲存更新通道。請再試一次。",+ "installing": "正在安裝…",+ "installingDescription": "正在準備更新,準備完成後 Motrix 將重新啟動。",+ "manualDownload": "手動下載",+ "manualInstall": "請下載新版本,結束 Motrix 後取代已安裝的應用程式。",+ "manualCrossVolume": "目前不支援跨磁碟自動安裝更新。請下載新版本並手動取代 Motrix。"},"details": {"author": "作者",diff --git a/src/shared/types/app-update.ts b/src/shared/types/app-update.tsindex 5c7f56da..42aecd35 100644--- a/src/shared/types/app-update.ts+++ b/src/shared/types/app-update.ts@@ -7,6 +7,7 @@ export type AppUpdatePhase =| 'available'| 'downloading'| 'downloaded'+ | 'installing'| 'cancelled'| 'error'@@ -32,4 +33,9 @@ export interface AppUpdateState {progress?: AppUpdateProgresserror?: AppUpdateErrorcheckedAt?: string+ /** The current installer cannot safely complete an automatic installation. */+ manualInstallReason?:+ | 'cross-volume'+ | 'location-unavailable'+ | 'install-failed'}