From 06962d5b246b123b51009da0bb66f4e7a264d571 Mon Sep 17 00:00:00 2001 From: Junhui Chen Date: Mon, 21 Jul 2025 17:18:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(tabs)/_layout.tsx | 13 +++++++ app/(tabs)/support.tsx | 67 ++++++++++++++++++++++++++++++++++ i18n/locales/en/support.json | 8 ++++ i18n/locales/zh/support.json | 8 ++++ i18n/translations-generated.ts | 4 ++ 5 files changed, 100 insertions(+) create mode 100644 app/(tabs)/support.tsx create mode 100644 i18n/locales/en/support.json create mode 100644 i18n/locales/zh/support.json diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx index 324e9f3..eb6d47a 100644 --- a/app/(tabs)/_layout.tsx +++ b/app/(tabs)/_layout.tsx @@ -3,6 +3,7 @@ import { TabBarIcon } from '@/components/navigation/TabBarIcon'; import TabBarBackground from '@/components/ui/TabBarBackground'; import { Colors } from '@/constants/Colors'; import { useColorScheme } from '@/hooks/useColorScheme'; +import { useTranslation } from 'react-i18next'; import { fetchApi } from '@/lib/server-api-util'; import * as Notifications from 'expo-notifications'; import { Tabs } from 'expo-router'; @@ -17,6 +18,7 @@ interface PollingData { extra: any; } export default function TabLayout() { + const { t } = useTranslation(); const colorScheme = useColorScheme(); const [pollingData, setPollingData] = useState([]); const pollingInterval = useRef(null); @@ -281,6 +283,17 @@ export default function TabLayout() { }} /> + {/* Support Screen */} + null, // 隐藏底部标签栏 + headerShown: false, // 隐藏导航栏 + tabBarStyle: { display: 'none' } // 确保在标签栏中不显示 + }} + /> + {/* Debug Screen - only in development */} {process.env.NODE_ENV === 'development' && ( { + const { t } = useTranslation('support'); + const handleWeChatSupport = () => { + Linking.openURL('https://work.weixin.qq.com/kfid/kfca0ac87f4e05e8bfd'); + }; + + const handleEmailSupport = () => { + Linking.openURL('mailto:memowake@fairclip.cn'); + }; + + return ( + <> + + {t('pageTitle')} + + + + + MemoWake + + + {t('title')} + + + {t('description')} + + + + + + + + {t('onlineSupport')} + + + + + + + {t('emailSupport')} + + + + + + ); +}; + +export default SupportScreen; diff --git a/i18n/locales/en/support.json b/i18n/locales/en/support.json new file mode 100644 index 0000000..3a930f1 --- /dev/null +++ b/i18n/locales/en/support.json @@ -0,0 +1,8 @@ +{ + "title": "Support & Help", + "description": "If you encounter any issues or have any suggestions, please contact us through the following methods.", + "onlineSupport": "Online Support", + "emailSupport": "Email Support", + "pageTitle": "Support & Help - MemoWake", + "tabTitle": "Support" +} diff --git a/i18n/locales/zh/support.json b/i18n/locales/zh/support.json new file mode 100644 index 0000000..5f2e526 --- /dev/null +++ b/i18n/locales/zh/support.json @@ -0,0 +1,8 @@ +{ + "title": "支持与帮助", + "description": "如果您在使用中遇到任何问题,或有任何建议,请通过以下方式联系我们。", + "onlineSupport": "在线客服", + "emailSupport": "邮件联系", + "pageTitle": "支持与帮助 - MemoWake", + "tabTitle": "支持" +} diff --git a/i18n/translations-generated.ts b/i18n/translations-generated.ts index 4edacca..68a331f 100644 --- a/i18n/translations-generated.ts +++ b/i18n/translations-generated.ts @@ -4,6 +4,7 @@ import enAdmin from './locales/en/admin.json'; import enAsk from './locales/en/ask.json'; import enCommon from './locales/en/common.json'; import enDownload from './locales/en/download.json'; +import enSupport from './locales/en/support.json'; import enExample from './locales/en/example.json'; import enFairclip from './locales/en/fairclip.json'; import enLanding from './locales/en/landing.json'; @@ -14,6 +15,7 @@ import zhAdmin from './locales/zh/admin.json'; import zhAsk from './locales/zh/ask.json'; import zhCommon from './locales/zh/common.json'; import zhDownload from './locales/zh/download.json'; +import zhSupport from './locales/zh/support.json'; import zhExample from './locales/zh/example.json'; import zhFairclip from './locales/zh/fairclip.json'; import zhLanding from './locales/zh/landing.json'; @@ -27,6 +29,7 @@ const translations = { ask: enAsk, common: enCommon, download: enDownload, + support: enSupport, example: enExample, fairclip: enFairclip, landing: enLanding, @@ -39,6 +42,7 @@ const translations = { ask: zhAsk, common: zhCommon, download: zhDownload, + support: zhSupport, example: zhExample, fairclip: zhFairclip, landing: zhLanding,