Browse Source

✨ feat(ui): update avatar and banner images

- replace external default avatar URL with local default_avatar.jpg
- update banner1.jpg image with new version
- remove redundant default avatar path in profile page

💄 style(profile): optimize avatar display logic

- simplify avatar source logic by removing fallback path from profile page
- ensure consistent default avatar display across components
yourname 3 months ago
parent
commit
debe00f25e

BIN
mini/images/banner1.jpg


+ 2 - 2
mini/src/components/ui/avatar-upload.tsx

@@ -2,7 +2,7 @@ import { useState } from 'react'
 import { View, Text, Image } from '@tarojs/components'
 import Taro from '@tarojs/taro'
 import { cn } from '@/utils/cn'
-import { Button } from '@/components/ui/button'
+import default_avatar from '../../../images/default_avatar.jpg'
 import { uploadFromSelect, type UploadResult } from '@/utils/minio'
 
 interface AvatarUploadProps {
@@ -94,7 +94,7 @@ export function AvatarUpload({
         style={{ width: avatarSize, height: avatarSize }}
       >
         <Image
-          src={currentAvatar || 'https://images.unsplash.com/photo-1494790108755-2616b612b786?w=160&h=160&fit=crop&crop=face'}
+          src={currentAvatar || default_avatar}
           mode="aspectFill"
           className="w-full h-full"
         />

+ 1 - 1
mini/src/pages/profile/index.tsx

@@ -230,7 +230,7 @@ const ProfilePage: React.FC = () => {
           <View className="flex items-center">
             <View className="relative mr-[32rpx]">
               <AvatarUpload
-                currentAvatar={userProfile.avatarFile?.fullUrl || '/images/default_avatar.jpg'}
+                currentAvatar={userProfile.avatarFile?.fullUrl}
                 onUploadSuccess={handleAvatarUpload}
                 onUploadError={handleAvatarUploadError}
                 size={100}