From bc73f5c52c533361a79f7f23ecb5042e15e87299 Mon Sep 17 00:00:00 2001 From: jinyaqiu Date: Tue, 22 Jul 2025 11:34:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E6=8E=92=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(tabs)/owner.tsx | 29 ++++++++++++------- assets/icons/svg/comein.svg | 3 ++ assets/icons/svg/star.svg | 3 ++ components/owner/album.tsx | 4 +-- components/owner/carousel.tsx | 2 +- components/owner/ranking.tsx | 3 +- components/owner/userName.tsx | 54 ++++++++++++++++------------------- i18n/locales/en/personal.json | 4 ++- i18n/locales/zh/personal.json | 4 ++- 9 files changed, 61 insertions(+), 45 deletions(-) create mode 100644 assets/icons/svg/comein.svg create mode 100644 assets/icons/svg/star.svg diff --git a/app/(tabs)/owner.tsx b/app/(tabs)/owner.tsx index ff04cbb..818969f 100644 --- a/app/(tabs)/owner.tsx +++ b/app/(tabs)/owner.tsx @@ -1,15 +1,14 @@ +import ComeinSvg from '@/assets/icons/svg/comein.svg'; import ConversationsSvg from '@/assets/icons/svg/conversations.svg'; -import PointsSvg from '@/assets/icons/svg/points.svg'; import StoriesSvg from '@/assets/icons/svg/stories.svg'; -import UsedStorageSvg from '@/assets/icons/svg/usedStorage.svg'; import AskNavbar from '@/components/layout/ask'; import AlbumComponent from '@/components/owner/album'; import CarouselComponent from '@/components/owner/carousel'; import CreateCountComponent from '@/components/owner/createCount'; import Ranking from '@/components/owner/ranking'; -import ResourceComponent from '@/components/owner/resource'; import SettingModal from '@/components/owner/setting'; import UserInfo from '@/components/owner/userName'; +import { ThemedText } from '@/components/ThemedText'; import { checkAuthStatus } from '@/lib/auth'; import { fetchApi } from '@/lib/server-api-util'; import { CountData, UserInfoDetails } from '@/types/user'; @@ -86,10 +85,11 @@ export default function OwnerPage() { {/* 资源数据 */} - - } isFormatBytes={true} /> - } /> + + {t("generalSetting.premium", { ns: "personal" })} + {t("generalSetting.unlock", { ns: "personal" })} + {/* 分类 */} @@ -127,11 +127,20 @@ const styles = StyleSheet.create({ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', - gap: 16, - backgroundColor: "#FAF9F6", - padding: 16, + backgroundColor: "#4C320C", + paddingVertical: 8, + paddingHorizontal: 32, borderRadius: 18, - paddingTop: 20 + }, + text: { + fontSize: 12, + fontWeight: '700', + color: '#FFB645', + }, + secondText: { + fontSize: 16, + fontWeight: '700', + color: '#fff', }, userInfo: { flexDirection: 'row', diff --git a/assets/icons/svg/comein.svg b/assets/icons/svg/comein.svg new file mode 100644 index 0000000..a38cc64 --- /dev/null +++ b/assets/icons/svg/comein.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/svg/star.svg b/assets/icons/svg/star.svg new file mode 100644 index 0000000..af626a2 --- /dev/null +++ b/assets/icons/svg/star.svg @@ -0,0 +1,3 @@ + + + diff --git a/components/owner/album.tsx b/components/owner/album.tsx index d546198..855faf9 100644 --- a/components/owner/album.tsx +++ b/components/owner/album.tsx @@ -11,10 +11,10 @@ const AlbumComponent = ({ setModalVisible, style }: CategoryProps) => { const { t } = useTranslation(); return ( - + {t('generalSetting.album', { ns: 'personal' })} - + {t('generalSetting.shareProfile', { ns: 'personal' })} setModalVisible(true)} style={[styles.text, { flex: 1, alignItems: "center", paddingVertical: 6 }]}> diff --git a/components/owner/carousel.tsx b/components/owner/carousel.tsx index 1d5b9e9..0d0dd3f 100644 --- a/components/owner/carousel.tsx +++ b/components/owner/carousel.tsx @@ -69,7 +69,7 @@ function CarouselComponent(props: Props) { }, [data]); return ( - + { renderItem={({ item }) => ( No.{item.ranking} - {item.region}{item.display_name} + {item.display_name} + {item.region} )} /> diff --git a/components/owner/userName.tsx b/components/owner/userName.tsx index c75e889..cc83b8c 100644 --- a/components/owner/userName.tsx +++ b/components/owner/userName.tsx @@ -1,15 +1,31 @@ import UserSvg from '@/assets/icons/svg/ataver.svg'; +import StarSvg from '@/assets/icons/svg/star.svg'; import { ThemedText } from '@/components/ThemedText'; import { UserInfoDetails } from '@/types/user'; import { useState } from 'react'; import { Image, ScrollView, View } from 'react-native'; +import CopyButton from '../copy'; export default function UserInfo({ userInfo }: { userInfo: UserInfoDetails }) { // 添加状态来跟踪图片加载状态 const [imageError, setImageError] = useState(false); return ( + {/* 头像 */} + + {userInfo?.user_info?.avatar_file_url && !imageError ? ( + { + setImageError(true); + }} + /> + ) : ( + + )} + {/* 用户名 */} - + + + + 3290 + - - - User ID: {userInfo?.user_info?.user_id} - - {/* */} + + User ID:{userInfo?.user_info?.user_id} + + - - {/* 头像 */} - - {userInfo?.user_info?.avatar_file_url && !imageError ? ( - { - setImageError(true); - }} - /> - ) : ( - - )} - ); } diff --git a/i18n/locales/en/personal.json b/i18n/locales/en/personal.json index 0fbadeb..e813114 100644 --- a/i18n/locales/en/personal.json +++ b/i18n/locales/en/personal.json @@ -83,6 +83,8 @@ "videoLength": "Video Duration", "storiesCreated": "Stories Created", "conversationsWithMemo": "Conversations with Memo", - "setting": "Settings" + "setting": "Settings", + "premium": "Upgrade to Premium", + "unlock": "Unlock more memory magic" } } \ No newline at end of file diff --git a/i18n/locales/zh/personal.json b/i18n/locales/zh/personal.json index 3f0c5f9..ce221a5 100644 --- a/i18n/locales/zh/personal.json +++ b/i18n/locales/zh/personal.json @@ -83,6 +83,8 @@ "videoLength": "视频时长", "storiesCreated": "创作视频", "conversationsWithMemo": "Memo对话", - "setting": "设置" + "setting": "设置", + "premium": "升级至会员", + "unlock": "解锁更多记忆魔法" } } \ No newline at end of file