From 0e9b3dcbe1657feaf458c7d860e6d33cd63165c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 12 Sep 2019 09:22:03 +0200 Subject: [PATCH 1/2] MOBILE-3119 settings: Show site URL on about page --- src/core/settings/pages/about/about.html | 8 ++++++++ src/core/settings/pages/about/about.ts | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/core/settings/pages/about/about.html b/src/core/settings/pages/about/about.html index 65dd36145..f948746d8 100644 --- a/src/core/settings/pages/about/about.html +++ b/src/core/settings/pages/about/about.html @@ -23,6 +23,14 @@

{{ privacyPolicy }}

+ + + + {{ 'core.login.siteurl' | translate }} * + + +

{{ siteUrl }}

+
diff --git a/src/core/settings/pages/about/about.ts b/src/core/settings/pages/about/about.ts index 1c339f5c1..373f0d90e 100644 --- a/src/core/settings/pages/about/about.ts +++ b/src/core/settings/pages/about/about.ts @@ -55,6 +55,8 @@ export class CoreSettingsAboutPage { storageType: string; localNotifAvailable: string; pushId: string; + siteUrl: string; + isPrefixedUrl: boolean; constructor(platform: Platform, device: Device, appProvider: CoreAppProvider, fileProvider: CoreFileProvider, initDelegate: CoreInitDelegate, langProvider: CoreLangProvider, sitesProvider: CoreSitesProvider, @@ -114,5 +116,9 @@ export class CoreSettingsAboutPage { this.localNotifAvailable = localNotificationsProvider.isAvailable() ? 'core.yes' : 'core.no'; this.pushId = pushNotificationsProvider.getPushId(); + + this.siteUrl = (currentSite && currentSite.getURL()) || + (typeof CoreConfigConstants.siteurl == 'string' && CoreConfigConstants.siteurl); + this.isPrefixedUrl = !!CoreConfigConstants.siteurl; } } From 932f00cf1b9d3d1549e6f9ffb6ee92f0648f45fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 12 Sep 2019 10:28:58 +0200 Subject: [PATCH 2/2] MOBILE-3119 mainmenu: Show site name and URL on the menu --- src/core/mainmenu/pages/more/more.html | 6 ++++-- src/core/mainmenu/pages/more/more.ts | 2 ++ src/core/settings/pages/about/about.html | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/mainmenu/pages/more/more.html b/src/core/mainmenu/pages/more/more.html index 60ccc28a4..4630fb1e4 100644 --- a/src/core/mainmenu/pages/more/more.html +++ b/src/core/mainmenu/pages/more/more.html @@ -5,9 +5,11 @@ - + -

{{siteInfo.fullname}}

+

{{siteInfo.fullname}}

+ {{ siteName }} + {{ siteUrl }}
diff --git a/src/core/mainmenu/pages/more/more.ts b/src/core/mainmenu/pages/more/more.ts index 09dd27b06..84d1b86c8 100644 --- a/src/core/mainmenu/pages/more/more.ts +++ b/src/core/mainmenu/pages/more/more.ts @@ -38,6 +38,7 @@ export class CoreMainMenuMorePage implements OnDestroy { showHelp: boolean; docsUrl: string; customItems: CoreMainMenuCustomItem[]; + siteUrl: string; protected subscription; protected langObserver; @@ -108,6 +109,7 @@ export class CoreMainMenuMorePage implements OnDestroy { this.siteInfo = currentSite.getInfo(); this.siteName = currentSite.getSiteName(); + this.siteUrl = currentSite.getURL(); this.logoutLabel = 'core.mainmenu.' + (config && config.tool_mobile_forcelogout == '1' ? 'logout' : 'changesite'); this.showWeb = !currentSite.isFeatureDisabled('CoreMainMenuDelegate_website'); this.showHelp = !currentSite.isFeatureDisabled('CoreMainMenuDelegate_help'); diff --git a/src/core/settings/pages/about/about.html b/src/core/settings/pages/about/about.html index f948746d8..01ec8e930 100644 --- a/src/core/settings/pages/about/about.html +++ b/src/core/settings/pages/about/about.html @@ -24,7 +24,7 @@

{{ privacyPolicy }}

- + {{ 'core.login.siteurl' | translate }} *