From 78a8d42ea1f34d16a3d4f71569e1cbb18635515c Mon Sep 17 00:00:00 2001 From: jinyaqiu Date: Tue, 29 Jul 2025 19:27:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BA=A4=E4=BA=92=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(tabs)/memo-list.tsx | 7 +++++-- components/common/ErrorBoundary.tsx | 12 +++++++++--- components/layout/ask.tsx | 7 +++++-- i18n/locales/en/ask.json | 4 +++- i18n/locales/zh/ask.json | 4 +++- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/app/(tabs)/memo-list.tsx b/app/(tabs)/memo-list.tsx index 1709bf8..6c02fb9 100644 --- a/app/(tabs)/memo-list.tsx +++ b/app/(tabs)/memo-list.tsx @@ -226,6 +226,9 @@ const MemoList = () => { return ( + + + ); } @@ -322,13 +325,13 @@ const styles = StyleSheet.create({ justifyContent: 'center', }, memoTitle: { - fontSize: 14, + fontSize: 16, fontWeight: '500', color: '#4C320C', marginBottom: 4, }, memoSubtitle: { - fontSize: 12, + fontSize: 14, color: '#AC7E35', }, separator: { diff --git a/components/common/ErrorBoundary.tsx b/components/common/ErrorBoundary.tsx index 3ad603c..d3111af 100644 --- a/components/common/ErrorBoundary.tsx +++ b/components/common/ErrorBoundary.tsx @@ -11,6 +11,12 @@ interface ErrorBoundaryState { error?: Error; } +const translations = { + error: 'Error', + issue: 'An issue occurred', + retry: 'Retry' +}; + class ErrorBoundary extends React.Component { constructor(props: ErrorBoundaryProps) { super(props); @@ -37,12 +43,12 @@ class ErrorBoundary extends React.Component - 出错了 + {translations.error} - {this.state.error?.message || '发生了一些问题'} + {this.state.error?.message || translations.issue} - 重试 + {translations.retry} ); diff --git a/components/layout/ask.tsx b/components/layout/ask.tsx index d0c36de..95e9716 100644 --- a/components/layout/ask.tsx +++ b/components/layout/ask.tsx @@ -94,7 +94,10 @@ const AskNavbar = () => { resizeMode: 'cover' }, navButton: { - padding: 16 + width: width / 2, // 半屏宽度 + height: 80, // 与 navbar 高度相同 + justifyContent: 'center', + alignItems: 'center' }, navContainer: { position: 'absolute', @@ -134,7 +137,7 @@ const AskNavbar = () => { navigateTo('/memo-list')} - style={styles.navButton} + style={[styles.navButton, { alignItems: "flex-start", paddingLeft: 16 }]} >