@sumaris-net/ngx-components 1.2.0 → 1.2.4
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 +83 -24
- 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 +47 -9
- package/esm2015/src/app/core/services/platform.service.js +14 -5
- package/fesm2015/sumaris-net.ngx-components.js +59 -12
- 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 {
|
|
@@ -18963,12 +18972,35 @@ class AppInstallUpgradeCard {
|
|
|
18963
18972
|
console.error('[install-upgrade-card] Missing required argument \'link.url\'');
|
|
18964
18973
|
return; // Skip
|
|
18965
18974
|
}
|
|
18966
|
-
|
|
18975
|
+
// Mark link as downloading
|
|
18976
|
+
link.downloading = true;
|
|
18977
|
+
this.markForCheck();
|
|
18978
|
+
this.listenDownloadJob(link.url, this.platform.download({
|
|
18967
18979
|
uri: link.url,
|
|
18968
18980
|
title: link.title,
|
|
18969
18981
|
filename: link.filename,
|
|
18970
18982
|
mimeType: link.mimeType
|
|
18971
|
-
}))
|
|
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
|
+
}
|
|
18998
|
+
try {
|
|
18999
|
+
yield this.platform.openFile(link.location, "application/vnd.android.package-archive");
|
|
19000
|
+
}
|
|
19001
|
+
catch (err) {
|
|
19002
|
+
console.error('[install-upgrade-card] Cannot open file: ' + (err && err.message || err), err);
|
|
19003
|
+
}
|
|
18972
19004
|
});
|
|
18973
19005
|
}
|
|
18974
19006
|
tryOnline() {
|
|
@@ -19126,8 +19158,16 @@ class AppInstallUpgradeCard {
|
|
|
19126
19158
|
// Listening downloading promise, if exists
|
|
19127
19159
|
(this.upgradeLinks || []).forEach(link => {
|
|
19128
19160
|
const job = this.platform.getDownloadingJob(link.url);
|
|
19129
|
-
if (job)
|
|
19130
|
-
|
|
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
|
+
}
|
|
19131
19171
|
});
|
|
19132
19172
|
}
|
|
19133
19173
|
listenDownloadJob(url, job) {
|
|
@@ -19137,20 +19177,25 @@ class AppInstallUpgradeCard {
|
|
|
19137
19177
|
try {
|
|
19138
19178
|
// Mark as downloading
|
|
19139
19179
|
if (!this.downloading) {
|
|
19140
|
-
console.info(`[install-upgrade-card]
|
|
19180
|
+
console.info(`[install-upgrade-card] Asking platform to download '${url}'...`);
|
|
19141
19181
|
this.downloading = true;
|
|
19142
19182
|
this.markForCheck();
|
|
19143
19183
|
}
|
|
19184
|
+
else {
|
|
19185
|
+
console.info(`[install-upgrade-card] Platform is already downloading!`);
|
|
19186
|
+
}
|
|
19144
19187
|
const location = yield job.toPromise();
|
|
19145
19188
|
if (location) {
|
|
19146
19189
|
console.info('[install-upgrade-card] File downloaded at: ' + location);
|
|
19147
|
-
|
|
19190
|
+
this.showDownloadCompleteDialog();
|
|
19148
19191
|
}
|
|
19192
|
+
return location;
|
|
19149
19193
|
}
|
|
19150
19194
|
// Failed: display a toast
|
|
19151
19195
|
catch (err) {
|
|
19152
19196
|
console.error('[install-upgrade-card] Download failed: ' + (err && err.message || err));
|
|
19153
|
-
|
|
19197
|
+
this.showDownloadFailedToast(err);
|
|
19198
|
+
throw err;
|
|
19154
19199
|
}
|
|
19155
19200
|
finally {
|
|
19156
19201
|
this.downloading = false;
|
|
@@ -19191,6 +19236,8 @@ class AppInstallUpgradeCard {
|
|
|
19191
19236
|
});
|
|
19192
19237
|
}
|
|
19193
19238
|
markForCheck() {
|
|
19239
|
+
if (!this._subscription)
|
|
19240
|
+
return; // Skip if destroyed
|
|
19194
19241
|
this.cd.markForCheck();
|
|
19195
19242
|
}
|
|
19196
19243
|
showToast(opts) {
|
|
@@ -19204,7 +19251,7 @@ class AppInstallUpgradeCard {
|
|
|
19204
19251
|
AppInstallUpgradeCard.decorators = [
|
|
19205
19252
|
{ type: Component, args: [{
|
|
19206
19253
|
selector: 'app-install-upgrade-card',
|
|
19207
|
-
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",
|
|
19208
19255
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19209
19256
|
animations: [slideUpDownAnimation],
|
|
19210
19257
|
styles: ["ion-text small{font-size:85%}"]
|