From e382bf5ec6c7042b94ba83044dc2b4ef25be2ea1 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Fri, 28 Feb 2025 15:21:26 +0500 Subject: [PATCH] mobile: ui updates --- .../app/components/sheets/user/index.tsx | 27 ++++++++++++++++-- .../app/screens/settings/settings-data.tsx | 6 +++- .../native/fonts/MaterialCommunityIcons.ttf | Bin 26372 -> 27036 bytes apps/mobile/scripts/optimize-fonts.mjs | 5 +++- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/apps/mobile/app/components/sheets/user/index.tsx b/apps/mobile/app/components/sheets/user/index.tsx index 39525f90b..ed1c81e7d 100644 --- a/apps/mobile/app/components/sheets/user/index.tsx +++ b/apps/mobile/app/components/sheets/user/index.tsx @@ -21,10 +21,10 @@ import { strings } from "@notesnook/intl"; import { useThemeColors } from "@notesnook/theme"; import { useNetInfo } from "@react-native-community/netinfo"; import React from "react"; -import { ActivityIndicator, Image, View } from "react-native"; +import { ActivityIndicator, Image, Linking, View } from "react-native"; import { useSheetRef } from "react-native-actions-sheet"; import useSyncProgress from "../../../hooks/use-sync-progress"; -import { presentSheet } from "../../../services/event-manager"; +import { presentSheet, ToastManager } from "../../../services/event-manager"; import Navigation from "../../../services/navigation"; import { SyncStatus, useUserStore } from "../../../stores/use-user-store"; import { getObfuscatedEmail } from "../../../utils/functions"; @@ -38,6 +38,7 @@ import { TimeSince } from "../../ui/time-since"; import Paragraph from "../../ui/typography/paragraph"; import Sync from "../../../services/sync"; +import Clipboard from "@react-native-clipboard/clipboard"; export const UserSheet = () => { const ref = useSheetRef(); const { colors } = useThemeColors(); @@ -286,6 +287,28 @@ export const UserSheet = () => { Navigation.navigate("Settings"); } }, + { + title: strings.emailSupport(), + icon: "email", + onPress: () => { + Clipboard.setString("support@streetwriters.co"); + ToastManager.show({ + heading: strings.emailCopied(), + type: "success", + icon: "content-copy" + }); + setTimeout(() => { + Linking.openURL("mailto:support@streetwriters.co"); + }, 1000); + } + }, + { + title: strings.documentation(), + onPress: async () => { + Linking.openURL("https://docs.notesnook.com"); + }, + icon: "file-document" + }, { icon: "logout", title: strings.logout(), diff --git a/apps/mobile/app/screens/settings/settings-data.tsx b/apps/mobile/app/screens/settings/settings-data.tsx index c80745788..3c529db59 100644 --- a/apps/mobile/app/screens/settings/settings-data.tsx +++ b/apps/mobile/app/screens/settings/settings-data.tsx @@ -715,6 +715,7 @@ export const settingsGroups: SettingSection[] = [ { id: "behaviour", type: "screen", + icon: "brain", name: strings.behavior(), description: strings.behaviorDesc(), sections: [ @@ -1299,6 +1300,7 @@ export const settingsGroups: SettingSection[] = [ id: "restore-backup", name: strings.restoreBackup(), description: strings.restoreBackupDesc(), + icon: "restore", type: "screen", component: "backuprestore" }, @@ -1425,7 +1427,7 @@ export const settingsGroups: SettingSection[] = [ { id: "email-support", name: strings.emailSupport(), - icon: "mail", + icon: "email", modifer: () => { Clipboard.setString("support@streetwriters.co"); ToastManager.show({ @@ -1522,6 +1524,7 @@ export const settingsGroups: SettingSection[] = [ { id: "tos", name: strings.tos(), + icon: "briefcase-outline", modifer: async () => { try { await Linking.openURL("https://notesnook.com/tos"); @@ -1534,6 +1537,7 @@ export const settingsGroups: SettingSection[] = [ { id: "privacy-policy", name: strings.privacyPolicy(), + icon: "shield-outline", modifer: async () => { try { await Linking.openURL("https://notesnook.com/privacy"); diff --git a/apps/mobile/native/fonts/MaterialCommunityIcons.ttf b/apps/mobile/native/fonts/MaterialCommunityIcons.ttf index 5ad88d6634f690bf2033727faf31ed2012e41e87..4981bb9a1ebbadfa08c8e36464d624836588bacc 100644 GIT binary patch delta 2090 zcmXw(e{36P8OOh`?epE)zB`|NKWxW#Y$x%l3U!+_v8%$es$)Nd$_mpI1*q1hO|k^s zq)W5XjSiPGjRAvoWChlhQecd=O`)AjX-g^5_yhi^CQ;N#6O#r(f~g2J377;DEnmM9 zvOo8E-`97~^S;mfo}YeG9RHm-Qfj^RZ}%BMBmnKoqs=F#mek7Yfc_g`TXTAHd}6$` z`6=KNL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