WIP
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user