Class: UpdateUtil

UpdateUtil()

Utility class for handling application updates. Provides methods to check for available updates by comparing the current application version (embedded in HTML) with the latest version available on the server (version.txt). All network operations fail silently to support offline usage.

Constructor

new UpdateUtil()

Source:

Methods

(async) checkForUpdates() → {Promise.<boolean>}

Check if an application update is available. Compares the current app version (from hidden input) with the server version (from version.txt). Fails silently on any network errors to support offline usage.
Source:
Returns:
Promise that resolves to true if update is available, false otherwise. Always resolves (never rejects).
Type
Promise.<boolean>

(async) showUpdateDialog(saveCallbackopt, isUpToDateopt) → {Promise.<string>}

Show the update notice dialog to the user. Displays a modal dialog informing the user that an update is available and offering options to reload now or continue with current version.
Parameters:
Name Type Attributes Default Description
saveCallback function <optional>
null Optional callback to explicitly save current state before reload
isUpToDate boolean <optional>
false Whether the user is already up to date
Source:
Returns:
Promise that resolves to 'reload' if user chooses to reload, 'continue' if user chooses to continue, or 'save_failed' if save callback fails. Never rejects.
Type
Promise.<string>