From 2ec4b536a59b61d62863542d79500f463e00f4f7 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 6 Mar 2019 12:47:20 +0100 Subject: [PATCH] MOBILE-2831 settings: Display push ID in about page --- scripts/langindex.json | 1 + src/assets/lang/en.json | 1 + src/core/settings/lang/en.json | 1 + src/core/settings/pages/about/about.html | 4 ++++ src/core/settings/pages/about/about.ts | 5 ++++- 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/langindex.json b/scripts/langindex.json index 15958c458..96590e260 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -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", diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json index 1ce4bc648..c6751cfb1 100644 --- a/src/assets/lang/en.json +++ b/src/assets/lang/en.json @@ -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", diff --git a/src/core/settings/lang/en.json b/src/core/settings/lang/en.json index 2b95b657e..a960ccf02 100644 --- a/src/core/settings/lang/en.json +++ b/src/core/settings/lang/en.json @@ -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", diff --git a/src/core/settings/pages/about/about.html b/src/core/settings/pages/about/about.html index 8efcfaa14..65dd36145 100644 --- a/src/core/settings/pages/about/about.html +++ b/src/core/settings/pages/about/about.html @@ -106,6 +106,10 @@

{{ 'core.settings.cordovadeviceuuid' | translate}}

{{ device.uuid }}

+ +

{{ 'core.settings.pushid' | translate}}

+

{{ pushId }}

+

{{ 'core.settings.localnotifavailable' | translate}}

{{ localNotifAvailable | translate }}

diff --git a/src/core/settings/pages/about/about.ts b/src/core/settings/pages/about/about.ts index 3bdebc52b..3c6497f49 100644 --- a/src/core/settings/pages/about/about.ts +++ b/src/core/settings/pages/about/about.ts @@ -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(); } }