From bef7d645a89657c721aaf6848d14c316d14e90b7 Mon Sep 17 00:00:00 2001 From: richarjiang Date: Wed, 15 Oct 2025 19:22:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(auth):=20=E4=B8=BA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0Liquid=20Glass=E6=95=88?= =?UTF-8?q?=E6=9E=9C=E5=B9=B6=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用expo-glass-effect为返回按钮添加毛玻璃效果 - 添加兼容性处理,在不支持时使用fallback样式 - 更新副标题文案为"健康生活,自律让我更自由" - 优化返回按钮尺寸和圆角样式 --- app/auth/login.tsx | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/app/auth/login.tsx b/app/auth/login.tsx index 319ecd4..baa655f 100644 --- a/app/auth/login.tsx +++ b/app/auth/login.tsx @@ -1,5 +1,6 @@ import { Ionicons } from '@expo/vector-icons'; import * as AppleAuthentication from 'expo-apple-authentication'; +import { GlassView, isLiquidGlassAvailable } from 'expo-glass-effect'; import { LinearGradient } from 'expo-linear-gradient'; import { useLocalSearchParams, useRouter } from 'expo-router'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; @@ -219,9 +220,22 @@ export default function LoginScreen() { {/* 自定义头部,与其它页面风格一致 */} - router.back()} style={styles.backButton}> - - + {isLiquidGlassAvailable() ? ( + router.back()} activeOpacity={0.7}> + + + + + ) : ( + router.back()} style={[styles.backButton, styles.fallbackBackground]} activeOpacity={0.7}> + + + )} 登录 @@ -229,7 +243,7 @@ export default function LoginScreen() { Out Live - 欢迎登录Out Live + 健康生活,自律让我更自由 {/* Apple 登录 */} @@ -296,7 +310,17 @@ const styles = StyleSheet.create({ paddingTop: 4, paddingBottom: 8, }, - backButton: { width: 32, height: 32, alignItems: 'center', justifyContent: 'center' }, + backButton: { + width: 38, + height: 38, + alignItems: 'center', + justifyContent: 'center', + borderRadius: 38, + overflow: 'hidden', + }, + fallbackBackground: { + backgroundColor: 'rgba(255, 255, 255, 0.5)', + }, headerTitle: { fontSize: 18, fontWeight: '700' }, headerWrap: { marginBottom: 36,