@sumaris-net/ngx-components 1.2.6 → 1.3.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 +44 -42
- 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 +0 -1
- package/esm2015/src/app/core/install/install-upgrade-card.component.js +6 -5
- package/esm2015/src/app/core/services/platform.service.js +30 -34
- package/fesm2015/sumaris-net.ngx-components.js +34 -37
- 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 +1 -1
- package/src/app/core/services/platform.service.d.ts +3 -5
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -80,7 +80,6 @@ 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';
|
|
84
83
|
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
|
85
84
|
import * as i2$4 from '@angular/cdk/platform';
|
|
86
85
|
import { Platform as Platform$1 } from '@angular/cdk/platform';
|
|
@@ -102,7 +101,6 @@ import * as i14 from '@ionic-native/status-bar/ngx/index';
|
|
|
102
101
|
import * as i15 from '@ionic-native/keyboard/ngx/index';
|
|
103
102
|
import * as i17 from '@ionic-native/in-app-browser/ngx/index';
|
|
104
103
|
import * as i18 from '@ionic-native/downloader/ngx/index';
|
|
105
|
-
import * as i19 from '@awesome-cordova-plugins/file-opener/ngx/index';
|
|
106
104
|
import { ValidatorService, TableDataSource } from '@e-is/ngx-material-table';
|
|
107
105
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
108
106
|
import { NgxJdenticonModule } from 'ngx-jdenticon';
|
|
@@ -14590,7 +14588,7 @@ ConfigService.ctorParameters = () => [
|
|
|
14590
14588
|
|
|
14591
14589
|
const moment$2 = momentImported;
|
|
14592
14590
|
class PlatformService extends StartableService {
|
|
14593
|
-
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader
|
|
14591
|
+
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
14594
14592
|
super(platform);
|
|
14595
14593
|
this.platform = platform;
|
|
14596
14594
|
this.cdkPlatform = cdkPlatform;
|
|
@@ -14611,7 +14609,6 @@ class PlatformService extends StartableService {
|
|
|
14611
14609
|
this.splashScreen = splashScreen;
|
|
14612
14610
|
this.browser = browser;
|
|
14613
14611
|
this.downloader = downloader;
|
|
14614
|
-
this.fileOpener = fileOpener;
|
|
14615
14612
|
this._downloadingJobs = new Map();
|
|
14616
14613
|
this._debug = !environment.production;
|
|
14617
14614
|
if (this._debug)
|
|
@@ -14631,13 +14628,13 @@ class PlatformService extends StartableService {
|
|
|
14631
14628
|
return !this.platform.is('mobile') || this.platform.is('mobileweb');
|
|
14632
14629
|
}
|
|
14633
14630
|
isAndroidCordova() {
|
|
14634
|
-
return this._android && this._cordova;
|
|
14631
|
+
return this._android && this._cordova || false;
|
|
14635
14632
|
}
|
|
14636
14633
|
get canDownload() {
|
|
14637
|
-
return isNotNil(this.downloader);
|
|
14634
|
+
return this._android && this._cordova && isNotNil(this.downloader);
|
|
14638
14635
|
}
|
|
14639
|
-
|
|
14640
|
-
return
|
|
14636
|
+
get canOpenFile() {
|
|
14637
|
+
return false;
|
|
14641
14638
|
}
|
|
14642
14639
|
width() {
|
|
14643
14640
|
return this.platform.width();
|
|
@@ -14664,8 +14661,8 @@ class PlatformService extends StartableService {
|
|
|
14664
14661
|
// Configure translation
|
|
14665
14662
|
yield this.configureTranslate();
|
|
14666
14663
|
// Configure storage
|
|
14667
|
-
const
|
|
14668
|
-
yield this.migrateStorage(
|
|
14664
|
+
const storage = yield this.storageReady();
|
|
14665
|
+
yield this.migrateStorage(storage);
|
|
14669
14666
|
// Start root services
|
|
14670
14667
|
yield Promise.all([
|
|
14671
14668
|
this.entitiesStorage.ready(),
|
|
@@ -14674,7 +14671,7 @@ class PlatformService extends StartableService {
|
|
|
14674
14671
|
this.networkService.ready(),
|
|
14675
14672
|
this.audioProvider.ready()
|
|
14676
14673
|
]);
|
|
14677
|
-
console.info(`[platform] Starting platform [OK] {mobile: ${this._mobile}, touchUi: ${this.touchUi}, downloader: ${this.canDownload}} in ${Date.now() - now}ms`);
|
|
14674
|
+
console.info(`[platform] Starting platform [OK] {mobile: ${this._mobile}, touchUi: ${this.touchUi}, downloader: ${this.canDownload}, fileOpener: ${this.canOpenFile}} in ${Date.now() - now}ms`);
|
|
14678
14675
|
// Update cache configuration when network changed
|
|
14679
14676
|
this.networkService.onNetworkStatusChanges
|
|
14680
14677
|
.pipe(skip(1)) // Skip the first event (behavior subject send event immediately)
|
|
@@ -14751,14 +14748,14 @@ class PlatformService extends StartableService {
|
|
|
14751
14748
|
}
|
|
14752
14749
|
openFile(filePath, fileMimeType) {
|
|
14753
14750
|
console.debug(`[platform] Opening file: ${filePath} (${fileMimeType}) ...`);
|
|
14754
|
-
if (this.fileOpener) {
|
|
14755
|
-
|
|
14756
|
-
}
|
|
14757
|
-
else {
|
|
14758
|
-
|
|
14759
|
-
|
|
14760
|
-
|
|
14761
|
-
}
|
|
14751
|
+
//if (this.fileOpener) {
|
|
14752
|
+
// return this.fileOpener.open(filePath, fileMimeType);
|
|
14753
|
+
// }
|
|
14754
|
+
//else {
|
|
14755
|
+
console.warn('[platform] Cannot use Cordova FileOpener plugin: using browser open()');
|
|
14756
|
+
this.open(filePath, '_system', 'location=no', true);
|
|
14757
|
+
return Promise.resolve();
|
|
14758
|
+
//}
|
|
14762
14759
|
}
|
|
14763
14760
|
/* -- protected methods -- */
|
|
14764
14761
|
configureCordovaPlugins(mobile) {
|
|
@@ -14839,23 +14836,23 @@ class PlatformService extends StartableService {
|
|
|
14839
14836
|
return forage;
|
|
14840
14837
|
});
|
|
14841
14838
|
}
|
|
14842
|
-
migrateStorage(
|
|
14839
|
+
migrateStorage(storage) {
|
|
14843
14840
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14844
|
-
const canMigrate =
|
|
14845
|
-
((
|
|
14846
|
-
(
|
|
14841
|
+
const canMigrate = storage &&
|
|
14842
|
+
((storage.driver() === 'cordovaSQLiteDriver' && (storage.supports(storage.INDEXEDDB) || storage.supports(storage.WEBSQL))) ||
|
|
14843
|
+
(storage.driver() === storage.WEBSQL && storage.supports(storage.INDEXEDDB)));
|
|
14847
14844
|
if (!canMigrate)
|
|
14848
14845
|
return; // Skip
|
|
14849
|
-
const oldForage =
|
|
14850
|
-
name:
|
|
14851
|
-
storeName:
|
|
14852
|
-
driver: [
|
|
14846
|
+
const oldForage = storage.createInstance({
|
|
14847
|
+
name: storage.config().name,
|
|
14848
|
+
storeName: storage.config().storeName,
|
|
14849
|
+
driver: [storage.INDEXEDDB, storage.WEBSQL]
|
|
14853
14850
|
});
|
|
14854
14851
|
const keys = yield oldForage.keys();
|
|
14855
14852
|
// No data in the odl storage: skip migration
|
|
14856
14853
|
if (isEmptyArray(keys)) {
|
|
14857
14854
|
// Drop the old instance (not need anymore)
|
|
14858
|
-
console.debug(`[platform] Old storage is empty: dropping unused instance {name: '${
|
|
14855
|
+
console.debug(`[platform] Old storage is empty: dropping unused instance {name: '${storage.config().name}', driver: '${oldForage.driver()}'}`);
|
|
14859
14856
|
yield oldForage.dropInstance();
|
|
14860
14857
|
}
|
|
14861
14858
|
// IF some data stored in the OLD storage: start migration
|
|
@@ -14865,7 +14862,7 @@ class PlatformService extends StartableService {
|
|
|
14865
14862
|
const toast = yield this.showToast({ message: 'INFO.DATA_MIGRATION_STARTED',
|
|
14866
14863
|
duration: 30000 });
|
|
14867
14864
|
try {
|
|
14868
|
-
yield StorageUtils.copy(oldForage,
|
|
14865
|
+
yield StorageUtils.copy(oldForage, storage, { keys, deleteAfterCopy: false });
|
|
14869
14866
|
const duration = Date.now() - now;
|
|
14870
14867
|
setTimeout(() => toast.dismiss(), Math.max(2000 - duration, 0));
|
|
14871
14868
|
yield this.showToast({ message: 'INFO.DATA_MIGRATION_SUCCEED',
|
|
@@ -14874,7 +14871,7 @@ class PlatformService extends StartableService {
|
|
|
14874
14871
|
});
|
|
14875
14872
|
console.info('[platform] Starting storage migration [OK]');
|
|
14876
14873
|
// Drop the old instance
|
|
14877
|
-
console.info(`[platform] Drop old storage {name: '${
|
|
14874
|
+
console.info(`[platform] Drop old storage {name: '${storage.config().name}', driver: '${oldForage.driver()}'}`);
|
|
14878
14875
|
yield oldForage.dropInstance();
|
|
14879
14876
|
}
|
|
14880
14877
|
catch (err) {
|
|
@@ -14936,7 +14933,7 @@ class PlatformService extends StartableService {
|
|
|
14936
14933
|
});
|
|
14937
14934
|
}
|
|
14938
14935
|
}
|
|
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)
|
|
14936
|
+
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" });
|
|
14940
14937
|
PlatformService.decorators = [
|
|
14941
14938
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14942
14939
|
];
|
|
@@ -14959,8 +14956,7 @@ PlatformService.ctorParameters = () => [
|
|
|
14959
14956
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
14960
14957
|
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
14961
14958
|
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
14962
|
-
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
14963
|
-
{ type: FileOpener, decorators: [{ type: Optional }] }
|
|
14959
|
+
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
14964
14960
|
];
|
|
14965
14961
|
|
|
14966
14962
|
class AppHelpModal {
|
|
@@ -18933,7 +18929,7 @@ class AppInstallUpgradeCard {
|
|
|
18933
18929
|
this._subscription = new Subscription();
|
|
18934
18930
|
this._showUpdateOfflineFeature = false;
|
|
18935
18931
|
this.loading = true;
|
|
18936
|
-
this.
|
|
18932
|
+
this.hasDownloader = false;
|
|
18937
18933
|
this.downloading = false;
|
|
18938
18934
|
this.waitingNetwork = false;
|
|
18939
18935
|
this.showUpgradeWarning = true;
|
|
@@ -18992,7 +18988,8 @@ class AppInstallUpgradeCard {
|
|
|
18992
18988
|
mimeType: link.mimeType
|
|
18993
18989
|
}))
|
|
18994
18990
|
.then((location) => {
|
|
18995
|
-
|
|
18991
|
+
if (this.platform.canOpenFile)
|
|
18992
|
+
link.location = location;
|
|
18996
18993
|
link.downloading = false;
|
|
18997
18994
|
})
|
|
18998
18995
|
.catch(() => link.downloading = false)
|
|
@@ -19049,7 +19046,7 @@ class AppInstallUpgradeCard {
|
|
|
19049
19046
|
if (!config)
|
|
19050
19047
|
return; // Skip
|
|
19051
19048
|
console.info('[install-upgrade-card] Check if need to install or upgrade...');
|
|
19052
|
-
this.
|
|
19049
|
+
this.hasDownloader = this.platform.canDownload;
|
|
19053
19050
|
try {
|
|
19054
19051
|
const links = this.getLinks(config);
|
|
19055
19052
|
// Check for upgrade
|
|
@@ -19261,7 +19258,7 @@ class AppInstallUpgradeCard {
|
|
|
19261
19258
|
AppInstallUpgradeCard.decorators = [
|
|
19262
19259
|
{ type: Component, args: [{
|
|
19263
19260
|
selector: 'app-install-upgrade-card',
|
|
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=\"
|
|
19261
|
+
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=\"hasDownloader; 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",
|
|
19265
19262
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19266
19263
|
animations: [slideUpDownAnimation],
|
|
19267
19264
|
styles: ["ion-text small{font-size:85%}"]
|