MOBILE-2831 settings: Display push ID in about page

main
Dani Palou 2019-03-06 12:47:20 +01:00
parent a8b258ac37
commit 2ec4b536a5
5 changed files with 11 additions and 1 deletions

View File

@ -1651,6 +1651,7 @@
"core.settings.navigatoruseragent": "local_moodlemobileapp",
"core.settings.networkstatus": "local_moodlemobileapp",
"core.settings.privacypolicy": "local_moodlemobileapp",
"core.settings.pushid": "local_moodlemobileapp",
"core.settings.reportinbackground": "local_moodlemobileapp",
"core.settings.settings": "moodle",
"core.settings.showdownloadoptions": "local_moodlemobileapp",

View File

@ -1651,6 +1651,7 @@
"core.settings.navigatoruseragent": "Navigator userAgent",
"core.settings.networkstatus": "Internet connection status",
"core.settings.privacypolicy": "Privacy policy",
"core.settings.pushid": "Push notifications ID",
"core.settings.reportinbackground": "Report errors automatically",
"core.settings.settings": "Settings",
"core.settings.showdownloadoptions": "Show download options",

View File

@ -40,6 +40,7 @@
"navigatoruseragent": "Navigator userAgent",
"networkstatus": "Internet connection status",
"privacypolicy": "Privacy policy",
"pushid": "Push notifications ID",
"reportinbackground": "Report errors automatically",
"settings": "Settings",
"showdownloadoptions": "Show download options",

View File

@ -106,6 +106,10 @@
<h2>{{ 'core.settings.cordovadeviceuuid' | translate}}</h2>
<p>{{ device.uuid }}</p>
</ion-item>
<ion-item text-wrap *ngIf="pushId">
<h2>{{ 'core.settings.pushid' | translate}}</h2>
<p>{{ pushId }}</p>
</ion-item>
<ion-item text-wrap *ngIf="localNotifAvailable">
<h2>{{ 'core.settings.localnotifavailable' | translate}}</h2>
<p>{{ localNotifAvailable | translate }}</p>

View File

@ -22,6 +22,7 @@ import { CoreLangProvider } from '@providers/lang';
import { CoreLocalNotificationsProvider } from '@providers/local-notifications';
import { CoreSitesProvider } from '@providers/sites';
import { CoreConfigConstants } from '../../../../configconstants';
import { AddonPushNotificationsProvider } from '@addon/pushnotifications/providers/pushnotifications';
/**
* Page that displays the about settings.
@ -53,10 +54,11 @@ export class CoreSettingsAboutPage {
fsClickable: boolean;
storageType: string;
localNotifAvailable: string;
pushId: string;
constructor(platform: Platform, device: Device, appProvider: CoreAppProvider, fileProvider: CoreFileProvider,
initDelegate: CoreInitDelegate, langProvider: CoreLangProvider, sitesProvider: CoreSitesProvider,
localNotificationsProvider: CoreLocalNotificationsProvider) {
localNotificationsProvider: CoreLocalNotificationsProvider, pushNotificationsProvider: AddonPushNotificationsProvider) {
const currentSite = sitesProvider.getCurrentSite();
@ -111,5 +113,6 @@ export class CoreSettingsAboutPage {
}
this.localNotifAvailable = localNotificationsProvider.isAvailable() ? 'core.yes' : 'core.no';
this.pushId = pushNotificationsProvider.getPushId();
}
}