@sumaris-net/ngx-components 1.2.3 → 1.2.7
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 +76 -18
- 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 +31 -6
- package/esm2015/src/app/core/services/platform.service.js +25 -6
- package/fesm2015/sumaris-net.ngx-components.js +54 -10
- 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
|
+
get canOpenFile() {
|
|
14640
|
+
return isNotNil(this.fileOpener);
|
|
14641
|
+
}
|
|
14636
14642
|
width() {
|
|
14637
14643
|
return this.platform.width();
|
|
14638
14644
|
}
|
|
@@ -14668,7 +14674,7 @@ class PlatformService extends StartableService {
|
|
|
14668
14674
|
this.networkService.ready(),
|
|
14669
14675
|
this.audioProvider.ready()
|
|
14670
14676
|
]);
|
|
14671
|
-
console.info(`[platform] Starting platform [OK] {mobile: ${this._mobile}, touchUi: ${this.touchUi}, downloader: ${this.canDownload}} in ${Date.now() - now}ms`);
|
|
14677
|
+
console.info(`[platform] Starting platform [OK] {mobile: ${this._mobile}, touchUi: ${this.touchUi}, downloader: ${this.canDownload}, fileOpener: ${this.canOpenFile}} in ${Date.now() - now}ms`);
|
|
14672
14678
|
// Update cache configuration when network changed
|
|
14673
14679
|
this.networkService.onNetworkStatusChanges
|
|
14674
14680
|
.pipe(skip(1)) // Skip the first event (behavior subject send event immediately)
|
|
@@ -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 {
|
|
@@ -18972,11 +18991,29 @@ class AppInstallUpgradeCard {
|
|
|
18972
18991
|
filename: link.filename,
|
|
18973
18992
|
mimeType: link.mimeType
|
|
18974
18993
|
}))
|
|
18975
|
-
.then(() =>
|
|
18994
|
+
.then((location) => {
|
|
18995
|
+
if (this.platform.canOpenFile)
|
|
18996
|
+
link.location = location;
|
|
18997
|
+
link.downloading = false;
|
|
18998
|
+
})
|
|
18976
18999
|
.catch(() => link.downloading = false)
|
|
18977
19000
|
.then(() => this.markForCheck());
|
|
18978
19001
|
});
|
|
18979
19002
|
}
|
|
19003
|
+
openFile(event, link) {
|
|
19004
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19005
|
+
if (!link || !link.location || !link.mimeType) {
|
|
19006
|
+
console.error('[install-upgrade-card] Missing required argument \'link.location\' or \'link.mimeType\'');
|
|
19007
|
+
return; // Skip
|
|
19008
|
+
}
|
|
19009
|
+
try {
|
|
19010
|
+
yield this.platform.openFile(link.location, link.mimeType);
|
|
19011
|
+
}
|
|
19012
|
+
catch (err) {
|
|
19013
|
+
console.error('[install-upgrade-card] Cannot open file: ' + (err && err.message || err), err);
|
|
19014
|
+
}
|
|
19015
|
+
});
|
|
19016
|
+
}
|
|
18980
19017
|
tryOnline() {
|
|
18981
19018
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18982
19019
|
this.waitingNetwork = true;
|
|
@@ -19135,7 +19172,10 @@ class AppInstallUpgradeCard {
|
|
|
19135
19172
|
if (job) {
|
|
19136
19173
|
link.downloading = true;
|
|
19137
19174
|
this.listenDownloadJob(link.url, job)
|
|
19138
|
-
.then(() =>
|
|
19175
|
+
.then((location) => {
|
|
19176
|
+
link.location = location;
|
|
19177
|
+
link.downloading = false;
|
|
19178
|
+
})
|
|
19139
19179
|
.catch(() => link.downloading = false)
|
|
19140
19180
|
.then(() => this.markForCheck());
|
|
19141
19181
|
}
|
|
@@ -19158,13 +19198,15 @@ class AppInstallUpgradeCard {
|
|
|
19158
19198
|
const location = yield job.toPromise();
|
|
19159
19199
|
if (location) {
|
|
19160
19200
|
console.info('[install-upgrade-card] File downloaded at: ' + location);
|
|
19161
|
-
|
|
19201
|
+
this.showDownloadCompleteDialog();
|
|
19162
19202
|
}
|
|
19203
|
+
return location;
|
|
19163
19204
|
}
|
|
19164
19205
|
// Failed: display a toast
|
|
19165
19206
|
catch (err) {
|
|
19166
19207
|
console.error('[install-upgrade-card] Download failed: ' + (err && err.message || err));
|
|
19167
|
-
|
|
19208
|
+
this.showDownloadFailedToast(err);
|
|
19209
|
+
throw err;
|
|
19168
19210
|
}
|
|
19169
19211
|
finally {
|
|
19170
19212
|
this.downloading = false;
|
|
@@ -19205,6 +19247,8 @@ class AppInstallUpgradeCard {
|
|
|
19205
19247
|
});
|
|
19206
19248
|
}
|
|
19207
19249
|
markForCheck() {
|
|
19250
|
+
if (!this._subscription)
|
|
19251
|
+
return; // Skip if destroyed
|
|
19208
19252
|
this.cd.markForCheck();
|
|
19209
19253
|
}
|
|
19210
19254
|
showToast(opts) {
|
|
@@ -19218,7 +19262,7 @@ class AppInstallUpgradeCard {
|
|
|
19218
19262
|
AppInstallUpgradeCard.decorators = [
|
|
19219
19263
|
{ type: Component, args: [{
|
|
19220
19264
|
selector: 'app-install-upgrade-card',
|
|
19221
|
-
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]=\"link.downloading\"\n color=\"tertiary\" class=\"ion-float-end\">\n <ion-icon slot=\"start\" *ngIf=\"!link.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 </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",
|
|
19265
|
+
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]=\"link.downloading\"\n color=\"tertiary\" class=\"ion-float-end\">\n <ion-icon slot=\"start\" *ngIf=\"!link.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",
|
|
19222
19266
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19223
19267
|
animations: [slideUpDownAnimation],
|
|
19224
19268
|
styles: ["ion-text small{font-size:85%}"]
|