@sumaris-net/ngx-components 1.2.1 → 1.2.5
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 +71 -32
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/install/install-upgrade-card.component.js +41 -15
- package/esm2015/src/app/core/services/platform.service.js +14 -5
- package/fesm2015/sumaris-net.ngx-components.js +53 -18
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/install/install-upgrade-card.component.d.ts +2 -0
- package/src/app/core/services/platform.service.d.ts +4 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -80,6 +80,7 @@ import { CacheService, CacheModule } from 'ionic-cache';
|
|
|
80
80
|
import * as i6 from 'ionic-cache/dist/cache.service';
|
|
81
81
|
import * as i9 from '@ionic-native/network/ngx/index';
|
|
82
82
|
import * as i10 from '@ionic-native/splash-screen/ngx/index';
|
|
83
|
+
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
|
83
84
|
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
|
84
85
|
import * as i2$4 from '@angular/cdk/platform';
|
|
85
86
|
import { Platform as Platform$1 } from '@angular/cdk/platform';
|
|
@@ -101,6 +102,7 @@ import * as i14 from '@ionic-native/status-bar/ngx/index';
|
|
|
101
102
|
import * as i15 from '@ionic-native/keyboard/ngx/index';
|
|
102
103
|
import * as i17 from '@ionic-native/in-app-browser/ngx/index';
|
|
103
104
|
import * as i18 from '@ionic-native/downloader/ngx/index';
|
|
105
|
+
import * as i19 from '@awesome-cordova-plugins/file-opener/ngx/index';
|
|
104
106
|
import { ValidatorService, TableDataSource } from '@e-is/ngx-material-table';
|
|
105
107
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
106
108
|
import { NgxJdenticonModule } from 'ngx-jdenticon';
|
|
@@ -14588,7 +14590,7 @@ ConfigService.ctorParameters = () => [
|
|
|
14588
14590
|
|
|
14589
14591
|
const moment$2 = momentImported;
|
|
14590
14592
|
class PlatformService extends StartableService {
|
|
14591
|
-
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
14593
|
+
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader, fileOpener) {
|
|
14592
14594
|
super(platform);
|
|
14593
14595
|
this.platform = platform;
|
|
14594
14596
|
this.cdkPlatform = cdkPlatform;
|
|
@@ -14609,6 +14611,7 @@ class PlatformService extends StartableService {
|
|
|
14609
14611
|
this.splashScreen = splashScreen;
|
|
14610
14612
|
this.browser = browser;
|
|
14611
14613
|
this.downloader = downloader;
|
|
14614
|
+
this.fileOpener = fileOpener;
|
|
14612
14615
|
this._downloadingJobs = new Map();
|
|
14613
14616
|
this._debug = !environment.production;
|
|
14614
14617
|
if (this._debug)
|
|
@@ -14705,6 +14708,10 @@ class PlatformService extends StartableService {
|
|
|
14705
14708
|
window.open(url, target, features, replace);
|
|
14706
14709
|
}
|
|
14707
14710
|
}
|
|
14711
|
+
openFile(filePath, fileMimeType) {
|
|
14712
|
+
console.debug(`[platform] Opening file: ${filePath} (${fileMimeType}) ...`);
|
|
14713
|
+
return this.fileOpener.open(filePath, fileMimeType);
|
|
14714
|
+
}
|
|
14708
14715
|
getDownloadingJob(uri) {
|
|
14709
14716
|
return this._downloadingJobs.get(uri);
|
|
14710
14717
|
}
|
|
@@ -14716,7 +14723,7 @@ class PlatformService extends StartableService {
|
|
|
14716
14723
|
let location$ = this._downloadingJobs.get(request.uri);
|
|
14717
14724
|
if (location$)
|
|
14718
14725
|
return location$;
|
|
14719
|
-
request = Object.assign({ visibleInDownloadsUi: true, notificationVisibility: NotificationVisibility.VisibleNotifyCompleted, title: request.title || request.filename }, request);
|
|
14726
|
+
request = Object.assign(Object.assign({ visibleInDownloadsUi: true, notificationVisibility: NotificationVisibility.VisibleNotifyCompleted, title: request.title || request.filename }, request), { destinationInExternalPublicDir: Object.assign({ dirType: 'Downloads', subPath: request.filename || request.title || '' }, request.destinationInExternalPublicDir) });
|
|
14720
14727
|
console.debug('[platform] Downloading, using request: ' + JSON.stringify(request));
|
|
14721
14728
|
// Start download
|
|
14722
14729
|
location$ = from(this.downloader.download(request));
|
|
@@ -14727,6 +14734,7 @@ class PlatformService extends StartableService {
|
|
|
14727
14734
|
console.info('[platform] File successfully downloaded at:' + location);
|
|
14728
14735
|
// Forget the request
|
|
14729
14736
|
this._downloadingJobs.delete(request.uri);
|
|
14737
|
+
return location;
|
|
14730
14738
|
}), catchError(err => {
|
|
14731
14739
|
console.error('[platform] Unable to download: ' + (err && err.message || err));
|
|
14732
14740
|
// Forget the request
|
|
@@ -14918,7 +14926,7 @@ class PlatformService extends StartableService {
|
|
|
14918
14926
|
});
|
|
14919
14927
|
}
|
|
14920
14928
|
}
|
|
14921
|
-
PlatformService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlatformService_Factory() { return new PlatformService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2$4.Platform), i0.ɵɵinject(i1$4.ToastController), i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(i1.MomentDateAdapter), i0.ɵɵinject(EntitiesStorage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(AccountService), i0.ɵɵinject(ConfigService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(AudioProvider), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(i14.StatusBar, 8), i0.ɵɵinject(i15.Keyboard, 8), i0.ɵɵinject(i10.SplashScreen, 8), i0.ɵɵinject(i17.InAppBrowser, 8), i0.ɵɵinject(i18.Downloader, 8)); }, token: PlatformService, providedIn: "root" });
|
|
14929
|
+
PlatformService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlatformService_Factory() { return new PlatformService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2$4.Platform), i0.ɵɵinject(i1$4.ToastController), i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(i1.MomentDateAdapter), i0.ɵɵinject(EntitiesStorage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(AccountService), i0.ɵɵinject(ConfigService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(AudioProvider), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(i14.StatusBar, 8), i0.ɵɵinject(i15.Keyboard, 8), i0.ɵɵinject(i10.SplashScreen, 8), i0.ɵɵinject(i17.InAppBrowser, 8), i0.ɵɵinject(i18.Downloader, 8), i0.ɵɵinject(i19.FileOpener, 8)); }, token: PlatformService, providedIn: "root" });
|
|
14922
14930
|
PlatformService.decorators = [
|
|
14923
14931
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14924
14932
|
];
|
|
@@ -14941,7 +14949,8 @@ PlatformService.ctorParameters = () => [
|
|
|
14941
14949
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
14942
14950
|
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
14943
14951
|
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
14944
|
-
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
14952
|
+
{ type: Downloader, decorators: [{ type: Optional }] },
|
|
14953
|
+
{ type: FileOpener, decorators: [{ type: Optional }] }
|
|
14945
14954
|
];
|
|
14946
14955
|
|
|
14947
14956
|
class AppHelpModal {
|
|
@@ -18966,17 +18975,31 @@ class AppInstallUpgradeCard {
|
|
|
18966
18975
|
// Mark link as downloading
|
|
18967
18976
|
link.downloading = true;
|
|
18968
18977
|
this.markForCheck();
|
|
18978
|
+
this.listenDownloadJob(link.url, this.platform.download({
|
|
18979
|
+
uri: link.url,
|
|
18980
|
+
title: link.title,
|
|
18981
|
+
filename: link.filename,
|
|
18982
|
+
mimeType: link.mimeType
|
|
18983
|
+
}))
|
|
18984
|
+
.then((location) => {
|
|
18985
|
+
link.location = location;
|
|
18986
|
+
link.downloading = false;
|
|
18987
|
+
})
|
|
18988
|
+
.catch(() => link.downloading = false)
|
|
18989
|
+
.then(() => this.markForCheck());
|
|
18990
|
+
});
|
|
18991
|
+
}
|
|
18992
|
+
openFile(event, link) {
|
|
18993
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18994
|
+
if (!link || !link.location) {
|
|
18995
|
+
console.error('[install-upgrade-card] Missing required argument \'link.location\'');
|
|
18996
|
+
return; // Skip
|
|
18997
|
+
}
|
|
18969
18998
|
try {
|
|
18970
|
-
yield this.
|
|
18971
|
-
uri: link.url,
|
|
18972
|
-
title: link.title,
|
|
18973
|
-
filename: link.filename,
|
|
18974
|
-
mimeType: link.mimeType
|
|
18975
|
-
}));
|
|
18999
|
+
yield this.platform.openFile(link.location, "application/vnd.android.package-archive");
|
|
18976
19000
|
}
|
|
18977
|
-
|
|
18978
|
-
|
|
18979
|
-
this.markForCheck();
|
|
19001
|
+
catch (err) {
|
|
19002
|
+
console.error('[install-upgrade-card] Cannot open file: ' + (err && err.message || err), err);
|
|
18980
19003
|
}
|
|
18981
19004
|
});
|
|
18982
19005
|
}
|
|
@@ -19135,8 +19158,16 @@ class AppInstallUpgradeCard {
|
|
|
19135
19158
|
// Listening downloading promise, if exists
|
|
19136
19159
|
(this.upgradeLinks || []).forEach(link => {
|
|
19137
19160
|
const job = this.platform.getDownloadingJob(link.url);
|
|
19138
|
-
if (job)
|
|
19139
|
-
|
|
19161
|
+
if (job) {
|
|
19162
|
+
link.downloading = true;
|
|
19163
|
+
this.listenDownloadJob(link.url, job)
|
|
19164
|
+
.then((location) => {
|
|
19165
|
+
link.location = location;
|
|
19166
|
+
link.downloading = false;
|
|
19167
|
+
})
|
|
19168
|
+
.catch(() => link.downloading = false)
|
|
19169
|
+
.then(() => this.markForCheck());
|
|
19170
|
+
}
|
|
19140
19171
|
});
|
|
19141
19172
|
}
|
|
19142
19173
|
listenDownloadJob(url, job) {
|
|
@@ -19156,13 +19187,15 @@ class AppInstallUpgradeCard {
|
|
|
19156
19187
|
const location = yield job.toPromise();
|
|
19157
19188
|
if (location) {
|
|
19158
19189
|
console.info('[install-upgrade-card] File downloaded at: ' + location);
|
|
19159
|
-
|
|
19190
|
+
this.showDownloadCompleteDialog();
|
|
19160
19191
|
}
|
|
19192
|
+
return location;
|
|
19161
19193
|
}
|
|
19162
19194
|
// Failed: display a toast
|
|
19163
19195
|
catch (err) {
|
|
19164
19196
|
console.error('[install-upgrade-card] Download failed: ' + (err && err.message || err));
|
|
19165
|
-
|
|
19197
|
+
this.showDownloadFailedToast(err);
|
|
19198
|
+
throw err;
|
|
19166
19199
|
}
|
|
19167
19200
|
finally {
|
|
19168
19201
|
this.downloading = false;
|
|
@@ -19203,6 +19236,8 @@ class AppInstallUpgradeCard {
|
|
|
19203
19236
|
});
|
|
19204
19237
|
}
|
|
19205
19238
|
markForCheck() {
|
|
19239
|
+
if (!this._subscription)
|
|
19240
|
+
return; // Skip if destroyed
|
|
19206
19241
|
this.cd.markForCheck();
|
|
19207
19242
|
}
|
|
19208
19243
|
showToast(opts) {
|
|
@@ -19216,7 +19251,7 @@ class AppInstallUpgradeCard {
|
|
|
19216
19251
|
AppInstallUpgradeCard.decorators = [
|
|
19217
19252
|
{ type: Component, args: [{
|
|
19218
19253
|
selector: 'app-install-upgrade-card',
|
|
19219
|
-
template: "\n\n<!-- Offline mode card-->\n<ion-card *ngIf=\"showOfflineWarning && (!loading && offline || waitingNetwork)\"\n color=\"accent\"\n class=\"main ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <ion-text class=\"ion-text-wrap\" *ngIf=\"!waitingNetwork; else waitingNetworkText\">\n <h4>\n <b *ngIf=\"isLogin; else notLogin\" [innerHTML]=\"'NETWORK.INFO.OFFLINE_OR_UNAUTHORIZED'| translate\"></b>\n <ng-template #notLogin>\n <b [innerHTML]=\"'NETWORK.INFO.OFFLINE'| translate\"></b>\n </ng-template>\n </h4>\n <h3>\n <small [innerHTML]=\"'NETWORK.INFO.OFFLINE_HELP'|translate\"></small>\n </h3>\n </ion-text>\n <ng-template #waitingNetworkText>\n <ion-text class=\"ion-text-wrap\" [innerHTML]=\"'NETWORK.INFO.RETRY_TO_CONNECT'| translate\"></ion-text>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\">\n\n <!-- Retry button -->\n <ion-button *ngIf=\"!waitingNetwork; else waitingSpinner\" color=\"tertiary\" class=\"ion-float-end\"\n (click)=\"tryOnline()\">\n <span translate>NETWORK.BTN_CHECK_ALIVE</span>\n </ion-button>\n\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Upgrade links -->\n<ion-card *ngIf=\"showUpgradeWarning && !loading && !offline && upgradeLinks\"\n color=\"accent\"\n class=\"ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row *ngFor=\"let link of upgradeLinks; last as last\">\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h3>\n <span *ngIf=\"link.version\" [innerHTML]=\"'INFO.UPDATE_APP_TO_VERSION'| translate: link\"></span>\n <span *ngIf=\"!link.version\" [innerHTML]=\"'INFO.UPDATE_APP'| translate: link\"></span>\n </h3>\n <h4>\n <small *ngIf=\"last\" [innerHTML]=\"'INFO.UPDATE_APP_HELP'|translate\"></small>\n </h4>\n </ion-text>\n </ion-col>\n\n <ion-col size=\"auto\">\n <ng-container *ngTemplateOutlet=\"downloadButton; context: { $implicit: link }\"></ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Install links -->\n<ion-card *ngIf=\"showInstallButton && !loading && !offline && installLinks\"\n color=\"secondary\"\n class=\"ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row *ngFor=\"let link of installLinks; last as last\">\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h3 [innerHTML]=\"'INFO.DOWNLOAD_APP_TITLE'| translate: {name: link.name, platform: getPlatformName(link.platform) }\"></h3>\n <h4><small *ngIf=\"last\" [innerHTML]=\"'INFO.DOWNLOAD_APP_HELP'|translate\"></small></h4>\n </ion-text>\n </ion-col>\n <ion-col size=\"auto\">\n <ng-container *ngTemplateOutlet=\"downloadButton; context: { $implicit: link }\"></ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Update offline feature card-->\n<ion-card *ngIf=\"showUpdateOfflineFeature && !loading && !offline\"\n color=\"accent\"\n class=\"main ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h4>\n <b [innerHTML]=\"'NETWORK.INFO.UPDATE_OFFLINE_MODE'| translate\"></b>\n </h4>\n <h3>\n <small [innerHTML]=\"'NETWORK.INFO.UPDATE_OFFLINE_MODE_HELP'|translate\"></small>\n </h3>\n </ion-text>\n </ion-col>\n <ion-col size=\"auto\">\n\n <!-- Retry button -->\n <ion-button color=\"tertiary\" class=\"ion-float-end\"\n (click)=\"onUpdateOfflineModeClick.emit($event)\">\n <span translate>NETWORK.BTN_UPDATE</span>\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Display a download button, depending on the link URL, and the device platform -->\n<ng-template #downloadButton let-link>\n\n <ng-container *ngIf=\"link.filename; else redirectButton\">\n\n <ng-container *ngIf=\"canDownload; else webDownloadButton\">\n <!-- Download using platform -->\n <ion-button (click)=\"download($event, asLink(link))\"\n [disabled]=\"
|
|
19254
|
+
template: "\n\n<!-- Offline mode card-->\n<ion-card *ngIf=\"showOfflineWarning && (!loading && offline || waitingNetwork)\"\n color=\"accent\"\n class=\"main ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <ion-text class=\"ion-text-wrap\" *ngIf=\"!waitingNetwork; else waitingNetworkText\">\n <h4>\n <b *ngIf=\"isLogin; else notLogin\" [innerHTML]=\"'NETWORK.INFO.OFFLINE_OR_UNAUTHORIZED'| translate\"></b>\n <ng-template #notLogin>\n <b [innerHTML]=\"'NETWORK.INFO.OFFLINE'| translate\"></b>\n </ng-template>\n </h4>\n <h3>\n <small [innerHTML]=\"'NETWORK.INFO.OFFLINE_HELP'|translate\"></small>\n </h3>\n </ion-text>\n <ng-template #waitingNetworkText>\n <ion-text class=\"ion-text-wrap\" [innerHTML]=\"'NETWORK.INFO.RETRY_TO_CONNECT'| translate\"></ion-text>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\">\n\n <!-- Retry button -->\n <ion-button *ngIf=\"!waitingNetwork; else waitingSpinner\" color=\"tertiary\" class=\"ion-float-end\"\n (click)=\"tryOnline()\">\n <span translate>NETWORK.BTN_CHECK_ALIVE</span>\n </ion-button>\n\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Upgrade links -->\n<ion-card *ngIf=\"showUpgradeWarning && !loading && !offline && upgradeLinks\"\n color=\"accent\"\n class=\"ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row *ngFor=\"let link of upgradeLinks; last as last\">\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h3>\n <span *ngIf=\"link.version\" [innerHTML]=\"'INFO.UPDATE_APP_TO_VERSION'| translate: link\"></span>\n <span *ngIf=\"!link.version\" [innerHTML]=\"'INFO.UPDATE_APP'| translate: link\"></span>\n </h3>\n <h4>\n <small *ngIf=\"last\" [innerHTML]=\"'INFO.UPDATE_APP_HELP'|translate\"></small>\n </h4>\n </ion-text>\n </ion-col>\n\n <ion-col size=\"auto\">\n <ng-container *ngTemplateOutlet=\"downloadButton; context: { $implicit: link }\"></ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Install links -->\n<ion-card *ngIf=\"showInstallButton && !loading && !offline && installLinks\"\n color=\"secondary\"\n class=\"ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row *ngFor=\"let link of installLinks; last as last\">\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h3 [innerHTML]=\"'INFO.DOWNLOAD_APP_TITLE'| translate: {name: link.name, platform: getPlatformName(link.platform) }\"></h3>\n <h4><small *ngIf=\"last\" [innerHTML]=\"'INFO.DOWNLOAD_APP_HELP'|translate\"></small></h4>\n </ion-text>\n </ion-col>\n <ion-col size=\"auto\">\n <ng-container *ngTemplateOutlet=\"downloadButton; context: { $implicit: link }\"></ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Update offline feature card-->\n<ion-card *ngIf=\"showUpdateOfflineFeature && !loading && !offline\"\n color=\"accent\"\n class=\"main ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h4>\n <b [innerHTML]=\"'NETWORK.INFO.UPDATE_OFFLINE_MODE'| translate\"></b>\n </h4>\n <h3>\n <small [innerHTML]=\"'NETWORK.INFO.UPDATE_OFFLINE_MODE_HELP'|translate\"></small>\n </h3>\n </ion-text>\n </ion-col>\n <ion-col size=\"auto\">\n\n <!-- Retry button -->\n <ion-button color=\"tertiary\" class=\"ion-float-end\"\n (click)=\"onUpdateOfflineModeClick.emit($event)\">\n <span translate>NETWORK.BTN_UPDATE</span>\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Display a download button, depending on the link URL, and the device platform -->\n<ng-template #downloadButton let-link>\n\n <ng-container *ngIf=\"link.filename; else redirectButton\">\n\n <ng-container *ngIf=\"canDownload; else webDownloadButton\">\n <!-- Download using platform -->\n <ion-button (click)=\"download($event, asLink(link))\"\n *ngIf=\"!link.location; else openButton\"\n [disabled]=\"downloading\"\n color=\"tertiary\" class=\"ion-float-end\">\n <ion-icon slot=\"start\" *ngIf=\"!downloading\" name=\"download\"></ion-icon>\n <ion-spinner slot=\"start\" class=\"ion-no-padding\" *ngIf=\"link.downloading\"></ion-spinner>\n <ion-label translate>COMMON.BTN_DOWNLOAD</ion-label>\n </ion-button>\n\n <!-- Open APK button -->\n <ng-template #openButton>\n <ion-button *ngIf=\"link.location\"\n (click)=\"openFile($event, link)\"\n color=\"tertiary\" class=\"ion-float-end\" >\n <ion-label translate>COMMON.BTN_INSTALL</ion-label>\n </ion-button>\n </ng-template>\n </ng-container>\n\n <!-- Web download button -->\n <ng-template #webDownloadButton>\n <ion-button [download]=\"link.downloadFilename\"\n [href]=\"link.url\"\n color=\"tertiary\" class=\"ion-float-end\" >\n <ion-label translate>COMMON.BTN_DOWNLOAD</ion-label>\n </ion-button>\n </ng-template>\n </ng-container>\n\n <!-- Web redirect button -->\n <ng-template #redirectButton>\n <ion-button [href]=\"link.url\" rel=\"external\" color=\"tertiary\" class=\"ion-float-end\" target=\"_blank\">\n <ion-label translate>COMMON.BTN_SHOW_MORE</ion-label>\n </ion-button>\n </ng-template>\n</ng-template>\n\n\n<!-- Waiting spinner -->\n<ng-template #waitingSpinner>\n <ion-spinner color=\"light\"></ion-spinner>\n</ng-template>\n",
|
|
19220
19255
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19221
19256
|
animations: [slideUpDownAnimation],
|
|
19222
19257
|
styles: ["ion-text small{font-size:85%}"]
|