mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-26 00:55:16 -07:00
fix(updater): handle unsupported macOS app updates
This commit is contained in:
@@ -50,6 +50,8 @@ export function createUpdateDialogPresenter(deps: UpdateDialogPresenterDeps) {
|
||||
showUpdateAvailableDialog(showFocusedMessageBox, version),
|
||||
showUpdateFailedDialog: (message: string) =>
|
||||
showUpdateFailedDialog(showFocusedMessageBox, message),
|
||||
showManualUpdateRequiredDialog: (version: string) =>
|
||||
showManualUpdateRequiredDialog(showFocusedMessageBox, version),
|
||||
showRestartDialog: () => showRestartDialog(showFocusedMessageBox),
|
||||
};
|
||||
}
|
||||
@@ -81,6 +83,19 @@ export async function showRestartDialog(showMessageBox: ShowMessageBox): Promise
|
||||
return result.response === 0 ? 'restart' : 'later';
|
||||
}
|
||||
|
||||
export async function showManualUpdateRequiredDialog(
|
||||
showMessageBox: ShowMessageBox,
|
||||
version: string,
|
||||
): Promise<void> {
|
||||
await showMessageBox({
|
||||
type: 'warning',
|
||||
title: 'SubMiner Updates',
|
||||
message: 'Manual install required',
|
||||
detail: `SubMiner v${version} is available, but this build cannot install app updates automatically. Download and install the latest release, then reopen SubMiner.`,
|
||||
buttons: ['Close'],
|
||||
});
|
||||
}
|
||||
|
||||
export async function showUpdateFailedDialog(
|
||||
showMessageBox: ShowMessageBox,
|
||||
message: string,
|
||||
|
||||
Reference in New Issue
Block a user