@sumaris-net/ngx-components 1.2.2 → 1.2.6
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 +82 -33
- 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/doc/changelog.md +5 -0
- package/esm2015/src/app/core/install/install-upgrade-card.component.js +41 -15
- package/esm2015/src/app/core/services/platform.service.js +25 -6
- package/fesm2015/sumaris-net.ngx-components.js +64 -19
- 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 +5 -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)
|
|
@@ -14633,6 +14636,9 @@ class PlatformService extends StartableService {
|
|
|
14633
14636
|
get canDownload() {
|
|
14634
14637
|
return isNotNil(this.downloader);
|
|
14635
14638
|
}
|
|
14639
|
+
getCanOpenFile() {
|
|
14640
|
+
return isNotNil(this.fileOpener);
|
|
14641
|
+
}
|
|
14636
14642
|
width() {
|
|
14637
14643
|
return this.platform.width();
|
|
14638
14644
|
}
|
|
@@ -14716,7 +14722,7 @@ class PlatformService extends StartableService {
|
|
|
14716
14722
|
let location$ = this._downloadingJobs.get(request.uri);
|
|
14717
14723
|
if (location$)
|
|
14718
14724
|
return location$;
|
|
14719
|
-
request = Object.assign(Object.assign({ visibleInDownloadsUi: true, notificationVisibility: NotificationVisibility.VisibleNotifyCompleted, title: request.title || request.filename }, request), {
|
|
14725
|
+
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
14726
|
console.debug('[platform] Downloading, using request: ' + JSON.stringify(request));
|
|
14721
14727
|
// Start download
|
|
14722
14728
|
location$ = from(this.downloader.download(request));
|
|
@@ -14727,6 +14733,7 @@ class PlatformService extends StartableService {
|
|
|
14727
14733
|
console.info('[platform] File successfully downloaded at:' + location);
|
|
14728
14734
|
// Forget the request
|
|
14729
14735
|
this._downloadingJobs.delete(request.uri);
|
|
14736
|
+
return location;
|
|
14730
14737
|
}), catchError(err => {
|
|
14731
14738
|
console.error('[platform] Unable to download: ' + (err && err.message || err));
|
|
14732
14739
|
// Forget the request
|
|
@@ -14737,11 +14744,22 @@ class PlatformService extends StartableService {
|
|
|
14737
14744
|
// Fallback (if not Android and Cordova): opening the URI using the browser
|
|
14738
14745
|
// TODO: find a way to download under iOS (see https://www.c-sharpcorner.com/article/how-to-download-a-file-using-file-transfer-plugin-in-ionic-3/)
|
|
14739
14746
|
else {
|
|
14740
|
-
console.warn('[platform] Cannot use
|
|
14747
|
+
console.warn('[platform] Cannot use Cordova downloader plugin: using browser open()');
|
|
14741
14748
|
this.open(request.uri, '_system', 'location=no', true);
|
|
14742
14749
|
return of();
|
|
14743
14750
|
}
|
|
14744
14751
|
}
|
|
14752
|
+
openFile(filePath, fileMimeType) {
|
|
14753
|
+
console.debug(`[platform] Opening file: ${filePath} (${fileMimeType}) ...`);
|
|
14754
|
+
if (this.fileOpener) {
|
|
14755
|
+
return this.fileOpener.open(filePath, fileMimeType);
|
|
14756
|
+
}
|
|
14757
|
+
else {
|
|
14758
|
+
console.warn('[platform] Cannot use Cordova FileOpener plugin: using browser open()');
|
|
14759
|
+
this.open(filePath, '_system', 'location=no', true);
|
|
14760
|
+
return Promise.resolve();
|
|
14761
|
+
}
|
|
14762
|
+
}
|
|
14745
14763
|
/* -- protected methods -- */
|
|
14746
14764
|
configureCordovaPlugins(mobile) {
|
|
14747
14765
|
console.info('[platform] Configuring Cordova plugins...');
|
|
@@ -14918,7 +14936,7 @@ class PlatformService extends StartableService {
|
|
|
14918
14936
|
});
|
|
14919
14937
|
}
|
|
14920
14938
|
}
|
|
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" });
|
|
14939
|
+
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
14940
|
PlatformService.decorators = [
|
|
14923
14941
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14924
14942
|
];
|
|
@@ -14941,7 +14959,8 @@ PlatformService.ctorParameters = () => [
|
|
|
14941
14959
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
14942
14960
|
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
14943
14961
|
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
14944
|
-
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
14962
|
+
{ type: Downloader, decorators: [{ type: Optional }] },
|
|
14963
|
+
{ type: FileOpener, decorators: [{ type: Optional }] }
|
|
14945
14964
|
];
|
|
14946
14965
|
|
|
14947
14966
|
class AppHelpModal {
|
|
@@ -18966,17 +18985,31 @@ class AppInstallUpgradeCard {
|
|
|
18966
18985
|
// Mark link as downloading
|
|
18967
18986
|
link.downloading = true;
|
|
18968
18987
|
this.markForCheck();
|
|
18988
|
+
this.listenDownloadJob(link.url, this.platform.download({
|
|
18989
|
+
uri: link.url,
|
|
18990
|
+
title: link.title,
|
|
18991
|
+
filename: link.filename,
|
|
18992
|
+
mimeType: link.mimeType
|
|
18993
|
+
}))
|
|
18994
|
+
.then((location) => {
|
|
18995
|
+
link.location = location;
|
|
18996
|
+
link.downloading = false;
|
|
18997
|
+
})
|
|
18998
|
+
.catch(() => link.downloading = false)
|
|
18999
|
+
.then(() => this.markForCheck());
|
|
19000
|
+
});
|
|
19001
|
+
}
|
|
19002
|
+
openFile(event, link) {
|
|
19003
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19004
|
+
if (!link || !link.location || !link.mimeType) {
|
|
19005
|
+
console.error('[install-upgrade-card] Missing required argument \'link.location\' or \'link.mimeType\'');
|
|
19006
|
+
return; // Skip
|
|
19007
|
+
}
|
|
18969
19008
|
try {
|
|
18970
|
-
yield this.
|
|
18971
|
-
uri: link.url,
|
|
18972
|
-
title: link.title,
|
|
18973
|
-
filename: link.filename,
|
|
18974
|
-
mimeType: link.mimeType
|
|
18975
|
-
}));
|
|
19009
|
+
yield this.platform.openFile(link.location, link.mimeType);
|
|
18976
19010
|
}
|
|
18977
|
-
|
|
18978
|
-
|
|
18979
|
-
this.markForCheck();
|
|
19011
|
+
catch (err) {
|
|
19012
|
+
console.error('[install-upgrade-card] Cannot open file: ' + (err && err.message || err), err);
|
|
18980
19013
|
}
|
|
18981
19014
|
});
|
|
18982
19015
|
}
|
|
@@ -19135,8 +19168,16 @@ class AppInstallUpgradeCard {
|
|
|
19135
19168
|
// Listening downloading promise, if exists
|
|
19136
19169
|
(this.upgradeLinks || []).forEach(link => {
|
|
19137
19170
|
const job = this.platform.getDownloadingJob(link.url);
|
|
19138
|
-
if (job)
|
|
19139
|
-
|
|
19171
|
+
if (job) {
|
|
19172
|
+
link.downloading = true;
|
|
19173
|
+
this.listenDownloadJob(link.url, job)
|
|
19174
|
+
.then((location) => {
|
|
19175
|
+
link.location = location;
|
|
19176
|
+
link.downloading = false;
|
|
19177
|
+
})
|
|
19178
|
+
.catch(() => link.downloading = false)
|
|
19179
|
+
.then(() => this.markForCheck());
|
|
19180
|
+
}
|
|
19140
19181
|
});
|
|
19141
19182
|
}
|
|
19142
19183
|
listenDownloadJob(url, job) {
|
|
@@ -19156,13 +19197,15 @@ class AppInstallUpgradeCard {
|
|
|
19156
19197
|
const location = yield job.toPromise();
|
|
19157
19198
|
if (location) {
|
|
19158
19199
|
console.info('[install-upgrade-card] File downloaded at: ' + location);
|
|
19159
|
-
|
|
19200
|
+
this.showDownloadCompleteDialog();
|
|
19160
19201
|
}
|
|
19202
|
+
return location;
|
|
19161
19203
|
}
|
|
19162
19204
|
// Failed: display a toast
|
|
19163
19205
|
catch (err) {
|
|
19164
19206
|
console.error('[install-upgrade-card] Download failed: ' + (err && err.message || err));
|
|
19165
|
-
|
|
19207
|
+
this.showDownloadFailedToast(err);
|
|
19208
|
+
throw err;
|
|
19166
19209
|
}
|
|
19167
19210
|
finally {
|
|
19168
19211
|
this.downloading = false;
|
|
@@ -19203,6 +19246,8 @@ class AppInstallUpgradeCard {
|
|
|
19203
19246
|
});
|
|
19204
19247
|
}
|
|
19205
19248
|
markForCheck() {
|
|
19249
|
+
if (!this._subscription)
|
|
19250
|
+
return; // Skip if destroyed
|
|
19206
19251
|
this.cd.markForCheck();
|
|
19207
19252
|
}
|
|
19208
19253
|
showToast(opts) {
|
|
@@ -19216,7 +19261,7 @@ class AppInstallUpgradeCard {
|
|
|
19216
19261
|
AppInstallUpgradeCard.decorators = [
|
|
19217
19262
|
{ type: Component, args: [{
|
|
19218
19263
|
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]=\"
|
|
19264
|
+
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
19265
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19221
19266
|
animations: [slideUpDownAnimation],
|
|
19222
19267
|
styles: ["ion-text small{font-size:85%}"]
|