From d46cbe598c1d1519fd6b81f8912fe30327fe2db0 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Mon, 13 Aug 2018 12:00:35 +0200 Subject: [PATCH] MOBILE-2549 about: Add compilation time --- gulpfile.js | 4 ++++ src/core/settings/lang/en.json | 1 + src/core/settings/pages/about/about.html | 4 ++++ src/core/settings/pages/about/about.module.ts | 2 ++ src/core/settings/pages/about/about.ts | 2 ++ 5 files changed, 13 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index d68894aa8..673d3ad3d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -278,6 +278,10 @@ gulp.task('config', function(done) { } contents += ' static ' + key + ' = ' + value + ';\n'; } + + // Add compilation time. + contents += ' static compilationtime = ' + Date.now() + ';\n'; + contents += '}\n'; file.contents = new Buffer(contents); diff --git a/src/core/settings/lang/en.json b/src/core/settings/lang/en.json index 136a930c6..8cbe7c11a 100644 --- a/src/core/settings/lang/en.json +++ b/src/core/settings/lang/en.json @@ -3,6 +3,7 @@ "appready": "App ready", "cannotsyncoffline": "Cannot synchronise offline.", "cannotsyncwithoutwifi": "Cannot synchronise because the current settings only allow to synchronise when connected to Wi-Fi. Please connect to a Wi-Fi network.", + "compilationtime": "Compilation time", "cordovadevicemodel": "Cordova device model", "cordovadeviceosversion": "Cordova device OS version", "cordovadeviceplatform": "Cordova device platform", diff --git a/src/core/settings/pages/about/about.html b/src/core/settings/pages/about/about.html index 25127ea4f..75c230041 100644 --- a/src/core/settings/pages/about/about.html +++ b/src/core/settings/pages/about/about.html @@ -36,6 +36,10 @@

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

{{ versionCode }}

+ +

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

+

{{ compilationTime | coreFormatDate: "LLL Z" }}

+

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

{{ fileSystemRoot }}

diff --git a/src/core/settings/pages/about/about.module.ts b/src/core/settings/pages/about/about.module.ts index 1daf53329..4b7725ea6 100644 --- a/src/core/settings/pages/about/about.module.ts +++ b/src/core/settings/pages/about/about.module.ts @@ -18,6 +18,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { CoreSettingsAboutPage } from './about'; import { CoreComponentsModule } from '@components/components.module'; import { CoreDirectivesModule } from '@directives/directives.module'; +import { CorePipesModule } from '@pipes/pipes.module'; @NgModule({ declarations: [ @@ -26,6 +27,7 @@ import { CoreDirectivesModule } from '@directives/directives.module'; imports: [ CoreComponentsModule, CoreDirectivesModule, + CorePipesModule, IonicPageModule.forChild(CoreSettingsAboutPage), TranslateModule.forChild() ], diff --git a/src/core/settings/pages/about/about.ts b/src/core/settings/pages/about/about.ts index 1f2e98651..33f2654c7 100644 --- a/src/core/settings/pages/about/about.ts +++ b/src/core/settings/pages/about/about.ts @@ -36,6 +36,7 @@ export class CoreSettingsAboutPage { appName: string; versionName: string; versionCode: number; + compilationTime: number; privacyPolicy: string; navigator: Navigator; locationHref: string; @@ -61,6 +62,7 @@ export class CoreSettingsAboutPage { this.appName = appProvider.isDesktop() ? CoreConfigConstants.desktopappname : CoreConfigConstants.appname; this.versionName = CoreConfigConstants.versionname; this.versionCode = CoreConfigConstants.versioncode; + this.compilationTime = CoreConfigConstants.compilationtime; // Calculate the privacy policy to use. this.privacyPolicy = currentSite.getStoredConfig('tool_mobile_apppolicy') || currentSite.getStoredConfig('sitepolicy') ||