From 5cf0204240e1d03151538d9387685030eaea1e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Fri, 16 Oct 2020 11:03:01 +0200 Subject: [PATCH] MOBILE-3572 settings: Add notice when auto color scheme is selected --- src/assets/lang/en.json | 1 + src/core/settings/lang/en.json | 1 + src/core/settings/pages/general/general.html | 5 ++++- src/core/settings/pages/general/general.ts | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json index dfc7d26d2..391cb9b50 100644 --- a/src/assets/lang/en.json +++ b/src/assets/lang/en.json @@ -2001,6 +2001,7 @@ "core.settings.cannotsyncwithoutwifi": "Cannot synchronise because the current settings only allow to synchronise when connected to Wi-Fi. Please connect to a Wi-Fi network.", "core.settings.colorscheme": "Color Scheme", "core.settings.colorscheme-auto": "Auto (based on system settings)", + "core.settings.colorscheme-auto-notice": "Auto mode may not work in some Android devices.", "core.settings.colorscheme-dark": "Dark", "core.settings.colorscheme-light": "Light", "core.settings.compilationinfo": "Compilation info", diff --git a/src/core/settings/lang/en.json b/src/core/settings/lang/en.json index d87510a7d..33c24a3e4 100644 --- a/src/core/settings/lang/en.json +++ b/src/core/settings/lang/en.json @@ -7,6 +7,7 @@ "cannotsyncwithoutwifi": "Cannot synchronise because the current settings only allow to synchronise when connected to Wi-Fi. Please connect to a Wi-Fi network.", "colorscheme": "Color Scheme", "colorscheme-auto": "Auto (based on system settings)", + "colorscheme-auto-notice": "Auto mode may not work in some Android devices.", "colorscheme-dark": "Dark", "colorscheme-light": "Light", "compilationinfo": "Compilation info", diff --git a/src/core/settings/pages/general/general.html b/src/core/settings/pages/general/general.html index 2cd97f99f..aa271537d 100644 --- a/src/core/settings/pages/general/general.html +++ b/src/core/settings/pages/general/general.html @@ -20,7 +20,7 @@ - +

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

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

@@ -29,6 +29,9 @@ {{ 'core.settings.colorscheme-' + scheme | translate }}
+ +

{{ 'core.settings.colorscheme-auto-notice' | translate }}

+

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

diff --git a/src/core/settings/pages/general/general.ts b/src/core/settings/pages/general/general.ts index ccba76780..b0b03a40d 100644 --- a/src/core/settings/pages/general/general.ts +++ b/src/core/settings/pages/general/general.ts @@ -15,6 +15,7 @@ import { Component, ViewChild } from '@angular/core'; import { IonicPage, Segment } from 'ionic-angular'; import { CoreConstants } from '@core/constants'; +import { CoreApp } from '@providers/app'; import { CoreConfigProvider } from '@providers/config'; import { CoreFileProvider } from '@providers/file'; import { CoreEventsProvider } from '@providers/events'; @@ -46,6 +47,7 @@ export class CoreSettingsGeneralPage { colorSchemes = []; selectedScheme: string; colorSchemeDisabled: boolean; + isAndroid: boolean; constructor(protected configProvider: CoreConfigProvider, fileProvider: CoreFileProvider, @@ -71,6 +73,8 @@ export class CoreSettingsGeneralPage { this.colorSchemes.push('light'); this.selectedScheme = this.colorSchemes[0]; } else { + this.isAndroid = CoreApp.instance.isAndroid(); + this.colorSchemes = this.settingsHelper.getAllowedColorSchemes(); this.configProvider.get(CoreConstants.SETTINGS_COLOR_SCHEME, 'light').then((scheme) => {