From a3e7c676fbd0f8004f1b192a0a06c6bfb9206630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 28 Jan 2020 11:04:47 +0100 Subject: [PATCH] MOBILE-3313 settings: Copy device info setting using long press --- .../settings/pages/deviceinfo/deviceinfo.html | 40 +++++++++---------- .../settings/pages/deviceinfo/deviceinfo.ts | 12 ++++++ 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/core/settings/pages/deviceinfo/deviceinfo.html b/src/core/settings/pages/deviceinfo/deviceinfo.html index dca511446..a9ff41c8f 100644 --- a/src/core/settings/pages/deviceinfo/deviceinfo.html +++ b/src/core/settings/pages/deviceinfo/deviceinfo.html @@ -9,88 +9,88 @@ - +

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

{{ deviceInfo.versionName }} ({{ deviceInfo.versionCode }})

- +

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

{{ deviceInfo.compilationTime | coreFormatDate: "LLL Z": false }}

{{ deviceInfo.lastCommit }}

- +

{{ 'core.settings.siteinfo' | translate }} *

{{ deviceInfo.siteUrl }}

{{ deviceInfo.siteVersion }}

{{ deviceInfo.siteId }}

- +

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

{{ deviceInfo.fileSystemRoot }}

{{ deviceInfo.fileSystemRoot }}

- +

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

{{ deviceInfo.userAgent }}

- +

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

{{ deviceInfo.browserLanguage }}

- +

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

{{ currentLangName }} ({{ deviceInfo.currentLanguage }})

- +

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

{{ deviceInfo.locationHref }}

- +

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

{{ 'core.' + deviceInfo.deviceType | translate }}

- +

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

{{ 'core.' + deviceInfo.deviceOs | translate }}

{{ deviceInfo.deviceOs }}

- +

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

{{ deviceInfo.screen | translate }}

- +

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

{{ 'core.' + deviceInfo.networkStatus | translate }}

- +

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

{{ 'core.' + deviceInfo.wifiConnection | translate }}

- +

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

{{ deviceInfo.cordovaVersion }}

- +

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

{{ deviceInfo.platform }}

- +

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

{{ deviceInfo.osVersion }}

- +

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

{{ deviceInfo.model }}

- +

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

{{ deviceInfo.uuid }}

- +

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

{{ deviceInfo.pushId }}

- +

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

{{ 'core.' + deviceInfo.localNotifAvailable | translate }}

diff --git a/src/core/settings/pages/deviceinfo/deviceinfo.ts b/src/core/settings/pages/deviceinfo/deviceinfo.ts index 3401ff2cc..59cf15b0a 100644 --- a/src/core/settings/pages/deviceinfo/deviceinfo.ts +++ b/src/core/settings/pages/deviceinfo/deviceinfo.ts @@ -208,6 +208,18 @@ export class CoreSettingsDeviceInfoPage { this.utils.copyToClipboard(JSON.stringify(this.deviceInfo)); } + /** + * Copies device info item into the clipboard. + * + * @param e Event. + */ + copyItemInfo(e: Event): void { + e.preventDefault(); + + const el = e.target; + this.utils.copyToClipboard(el.closest('ion-item').textContent.trim()); + } + /** * Page destroyed. */