diff --git a/locales/en/index.yml b/locales/en/index.yml index 26f4ccddb42..87d1c3a4ac0 100644 --- a/locales/en/index.yml +++ b/locales/en/index.yml @@ -533,6 +533,25 @@ profile: send_email_messages: title: Forwarding messages by email subtitle: Receive message previews + appearance: + title: Appearance + subtitle: Choose how to customise the app + typefaceStyle: + title: Typeface style + comfortable: + title: Comfortable + description: Designed for better text readability + standard: + title: Standard + description: The usual style with narrow, geometric shapes + theme: + title: Theme + comingSoon: Coming soon + automatic: + title: Automatic + description: Based on system settings + light: Light + dark: Dark language: title: Language subtitle: Choose language diff --git a/locales/it/index.yml b/locales/it/index.yml index 1305f0d0adb..20c2a165c98 100644 --- a/locales/it/index.yml +++ b/locales/it/index.yml @@ -533,6 +533,25 @@ profile: send_email_messages: title: Inoltro dei messaggi via email subtitle: Ricevi un’anteprima dei messaggi + appearance: + title: Aspetto dell'app + subtitle: Scegli come personalizzare l'app + typefaceStyle: + title: Stile carattere + comfortable: + title: Confortevole + description: Progettato per una migliore leggibilità dei testi + standard: + title: Standard + description: Lo stile di sempre, con forme strette e geometriche + theme: + title: Tema + comingSoon: In arrivo + automatic: + title: Automatico + description: Cambia in base alle impostazioni di sistema + light: Chiaro + dark: Scuro language: title: Lingua subtitle: Scegli la lingua diff --git a/ts/navigation/ProfileNavigator.tsx b/ts/navigation/ProfileNavigator.tsx index 1b5909d20c4..2a083761e02 100644 --- a/ts/navigation/ProfileNavigator.tsx +++ b/ts/navigation/ProfileNavigator.tsx @@ -31,6 +31,7 @@ import { isGestureEnabled } from "../utils/navigation"; import TrialSystemPlayground from "../screens/profile/TrialSystemPlayground"; import ProfileMainScreen from "../screens/profile/ProfileMainScreen"; import { IOMarkdownPlayground } from "../screens/profile/playgrounds/IOMarkdownPlayground"; +import AppearancePreferenceScreen from "../screens/profile/AppearancePreferenceScreen"; import { ProfileParamsList } from "./params/ProfileParamsList"; import ROUTES from "./routes"; @@ -68,6 +69,10 @@ const ProfileStackNavigator = () => ( name={ROUTES.PROFILE_PREFERENCES_SERVICES} component={ServicesPreferenceScreen} /> + { + const [selectedTypeface, setSelectedTypeface] = + useState("comfortable"); + + const [selectedColorMode, setSelectedColorMode] = + useState("light"); + + // Options for typeface + const typefaceOptions = [ + { + id: "comfortable" as TypefaceChoice, + value: I18n.t( + "profile.preferences.list.appearance.typefaceStyle.comfortable.title" + ), + description: I18n.t( + "profile.preferences.list.appearance.typefaceStyle.comfortable.description" + ) + }, + { + id: "standard" as TypefaceChoice, + value: I18n.t( + "profile.preferences.list.appearance.typefaceStyle.standard.title" + ), + description: I18n.t( + "profile.preferences.list.appearance.typefaceStyle.standard.description" + ) + } + ]; + + // Options for the color mode + const colorModeOptions = [ + { + id: "system" as ColorModeChoice, + value: I18n.t( + "profile.preferences.list.appearance.theme.automatic.title" + ), + description: I18n.t( + "profile.preferences.list.appearance.theme.automatic.description" + ), + disabled: true + }, + { + id: "light" as ColorModeChoice, + value: I18n.t("profile.preferences.list.appearance.theme.light"), + disabled: true + }, + { + id: "dark" as ColorModeChoice, + value: I18n.t("profile.preferences.list.appearance.theme.dark"), + disabled: true + } + ]; + + return ( + + + + + + type="radioListItem" + items={typefaceOptions} + selectedItem={selectedTypeface} + onPress={setSelectedTypeface} + /> + + + + + + type="radioListItem" + items={colorModeOptions} + selectedItem={selectedColorMode} + onPress={setSelectedColorMode} + /> + + + + ); +}; + +export default AppearancePreferenceScreen; diff --git a/ts/screens/profile/PreferencesScreen.tsx b/ts/screens/profile/PreferencesScreen.tsx index 9e6f734f80c..6ee5d1463d6 100644 --- a/ts/screens/profile/PreferencesScreen.tsx +++ b/ts/screens/profile/PreferencesScreen.tsx @@ -63,6 +63,12 @@ const PreferencesScreen = () => { }); }, [navigation]); + const navigateToAppearancePreferenceScreen = useCallback(() => { + navigation.navigate(ROUTES.PROFILE_NAVIGATOR, { + screen: ROUTES.PROFILE_PREFERENCES_APPEARANCE + }); + }, [navigation]); + const checkPermissionThenGoCalendar = async () => { await requestWriteCalendarPermission({ title: I18n.t("permissionRationale.calendar.title"), @@ -109,6 +115,12 @@ const PreferencesScreen = () => { description: I18n.t("profile.preferences.list.notifications.subtitle"), onPress: navigateToNotificationPreferenceScreen }, + { + // Appearance + value: I18n.t("profile.preferences.list.appearance.title"), + description: I18n.t("profile.preferences.list.appearance.subtitle"), + onPress: navigateToAppearancePreferenceScreen + }, { // Calendar value: I18n.t("profile.preferences.list.preferred_calendar.title"),