This commit is contained in:
Mo Bitar
2020-02-09 00:34:14 -06:00
parent b5ec64f102
commit 046f6ca5b9
19 changed files with 919 additions and 635 deletions

View File

@@ -1,13 +1,8 @@
/* eslint-disable prefer-promise-reject-errors */
import { SNAlertManager } from 'snjs';
import { SKAlert } from 'sn-stylekit';
export class AlertManager extends SNAlertManager {
/* @ngInject */
constructor($timeout) {
super();
this.$timeout = $timeout;
}
async alert({
title,
text,
@@ -21,7 +16,7 @@ export class AlertManager extends SNAlertManager {
style: "neutral",
action: async () => {
if(onClose) {
this.$timeout(onClose);
this.deviceInterface.timeout(onClose);
}
resolve(true);
}
@@ -48,7 +43,7 @@ export class AlertManager extends SNAlertManager {
style: "neutral",
action: async () => {
if(onCancel) {
this.$timeout(onCancel);
this.deviceInterface.timeout(onCancel);
}
reject(false);
}
@@ -58,7 +53,7 @@ export class AlertManager extends SNAlertManager {
style: destructive ? "danger" : "info",
action: async () => {
if(onConfirm) {
this.$timeout(onConfirm);
this.deviceInterface.timeout(onConfirm);
}
resolve(true);
}

View File

@@ -16,14 +16,11 @@ export class GodService {
if (this.application.noAccount()) {
return false;
}
const latest = await this.application.getUserVersion();
const updateAvailable = await this.protocolVersion() !== latest;
const updateAvailable = await this.application.protocolService.upgradeAvailable();
if (updateAvailable !== this.securityUpdateAvailable) {
this.securityUpdateAvailable = updateAvailable;
this.$rootScope.$broadcast("security-update-status-changed");
}
return this.securityUpdateAvailable;
}