basic manual update stuff + update check bar

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2017-06-03 15:12:46 +01:00
parent 0e6012ad45
commit efc68c078e
5 changed files with 139 additions and 11 deletions

View File

@@ -22,6 +22,13 @@ import { _t } from 'matrix-react-sdk/lib/languageHandler';
import Favico from 'favico.js';
export const updateStateEnum = {
Error: -1,
NotAvailable: 0,
Downloading: 1,
Ready: 2,
};
/**
* Vector-specific extensions to the BasePlatform template
*/
@@ -35,6 +42,7 @@ export default class VectorBasePlatform extends BasePlatform {
// so we'd need to fix that if enabling the animation.
this.favicon = new Favico({animation: 'none'});
this._updateFavicon();
this.updatable = true;
}
getHumanReadableName(): string {
@@ -80,13 +88,21 @@ export default class VectorBasePlatform extends BasePlatform {
startUpdater() {
}
/**
* Whether we can call checkForUpdate on this platform build
*/
canSelfUpdate(): boolean {
return this.updatable;
}
/**
* Check for the availability of an update to the version of the
* app that's currently running.
* If an update is available, this function should dispatch the
* 'new_version' action.
* @returns Promise<updateStateEnum>
*/
pollForUpdate() {
checkForUpdate(): Promise<number> {
}
/**