If notifyUser is enabled, the library shows a dialog when an update is downloaded. You can replace the default behavior using onNotifyUser or customize the text using makeUserNotifier().
Using onNotifyUser callback
Pass a function to onNotifyUser in the options. This function receives an IUpdateInfo object containing:
event: The Electron event.releaseNotes: String of release notes.releaseName: Name of the release.releaseDate: Date of the release.updateURL: URL of the update.
Using makeUserNotifier
To keep the default dialog behavior but change the text (title, buttons, etc.), use makeUserNotifier(dialogProps) and pass the result to onNotifyUser.
dialogProps can include:
title: Dialog title (default: 'Application Update').detail: Dialog body text (default: 'A new version has been downloaded...').restartButtonText: Text for the restart button (default: 'Restart').laterButtonText: Text for the later button (default: 'Later').
import { updateElectronApp, makeUserNotifier } from 'update-electron-app';
updateElectronApp({
onNotifyUser: makeUserNotifier({
title: 'Update Available!',
restartButtonText: 'Install Now'
})
});