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>