@sumaris-net/ngx-components 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sumaris-net.ngx-components.umd.js +30 -10
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/install/install-upgrade-card.component.js +20 -8
- package/fesm2015/sumaris-net.ngx-components.js +19 -7
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -21879,16 +21879,33 @@
|
|
|
21879
21879
|
AppInstallUpgradeCard.prototype.download = function (event, link) {
|
|
21880
21880
|
return __awaiter(this, void 0, void 0, function () {
|
|
21881
21881
|
return __generator(this, function (_a) {
|
|
21882
|
-
|
|
21883
|
-
|
|
21884
|
-
|
|
21882
|
+
switch (_a.label) {
|
|
21883
|
+
case 0:
|
|
21884
|
+
if (!link || !link.url) {
|
|
21885
|
+
console.error('[install-upgrade-card] Missing required argument \'link.url\'');
|
|
21886
|
+
return [2 /*return*/]; // Skip
|
|
21887
|
+
}
|
|
21888
|
+
// Mark link as downloading
|
|
21889
|
+
link.downloading = true;
|
|
21890
|
+
this.markForCheck();
|
|
21891
|
+
_a.label = 1;
|
|
21892
|
+
case 1:
|
|
21893
|
+
_a.trys.push([1, , 3, 4]);
|
|
21894
|
+
return [4 /*yield*/, this.listenDownloadJob(link.url, this.platform.download({
|
|
21895
|
+
uri: link.url,
|
|
21896
|
+
title: link.title,
|
|
21897
|
+
filename: link.filename,
|
|
21898
|
+
mimeType: link.mimeType
|
|
21899
|
+
}))];
|
|
21900
|
+
case 2:
|
|
21901
|
+
_a.sent();
|
|
21902
|
+
return [3 /*break*/, 4];
|
|
21903
|
+
case 3:
|
|
21904
|
+
link.downloading = false;
|
|
21905
|
+
this.markForCheck();
|
|
21906
|
+
return [7 /*endfinally*/];
|
|
21907
|
+
case 4: return [2 /*return*/];
|
|
21885
21908
|
}
|
|
21886
|
-
return [2 /*return*/, this.listenDownloadJob(link.url, this.platform.download({
|
|
21887
|
-
uri: link.url,
|
|
21888
|
-
title: link.title,
|
|
21889
|
-
filename: link.filename,
|
|
21890
|
-
mimeType: link.mimeType
|
|
21891
|
-
}))];
|
|
21892
21909
|
});
|
|
21893
21910
|
});
|
|
21894
21911
|
};
|
|
@@ -22086,10 +22103,13 @@
|
|
|
22086
22103
|
_a.trys.push([1, 3, 4, 5]);
|
|
22087
22104
|
// Mark as downloading
|
|
22088
22105
|
if (!this.downloading) {
|
|
22089
|
-
console.info("[install-upgrade-card]
|
|
22106
|
+
console.info("[install-upgrade-card] Asking platform to download '" + url + "'...");
|
|
22090
22107
|
this.downloading = true;
|
|
22091
22108
|
this.markForCheck();
|
|
22092
22109
|
}
|
|
22110
|
+
else {
|
|
22111
|
+
console.info("[install-upgrade-card] Platform is already downloading!");
|
|
22112
|
+
}
|
|
22093
22113
|
return [4 /*yield*/, job.toPromise()];
|
|
22094
22114
|
case 2:
|
|
22095
22115
|
location = _a.sent();
|