feat(ui): 调整个人中心和会员购买界面布局
- 将推送通知设置移至开发者选项section - 移除会员购买按钮的协议接受状态限制 - 优化购买按钮的禁用条件逻辑
This commit is contained in:
@@ -347,12 +347,7 @@ export default function PersonalScreen() {
|
||||
type: 'switch' as const,
|
||||
switchValue: notificationEnabled,
|
||||
onSwitchChange: handleNotificationToggle,
|
||||
},
|
||||
{
|
||||
icon: 'settings-outline' as const,
|
||||
title: '推送通知设置',
|
||||
onPress: () => pushIfAuthedElseLogin('/push-notification-settings'),
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
// 开发者section(需要连续点击三次用户名激活)
|
||||
@@ -364,6 +359,11 @@ export default function PersonalScreen() {
|
||||
title: '开发者选项',
|
||||
onPress: () => pushIfAuthedElseLogin(ROUTES.DEVELOPER),
|
||||
},
|
||||
{
|
||||
icon: 'settings-outline' as const,
|
||||
title: '推送通知设置',
|
||||
onPress: () => pushIfAuthedElseLogin('/push-notification-settings'),
|
||||
},
|
||||
],
|
||||
}] : []),
|
||||
{
|
||||
|
||||
@@ -1082,7 +1082,7 @@ export function MembershipModal({ visible, onClose, onPurchaseSuccess }: Members
|
||||
<GlassView
|
||||
style={[
|
||||
styles.purchaseButton,
|
||||
(loading || products.length === 0 || !agreementAccepted) && styles.disabledButton
|
||||
(loading || products.length === 0) && styles.disabledButton
|
||||
]}
|
||||
glassEffectStyle="clear"
|
||||
tintColor="rgba(21, 21, 21, 0.8)"
|
||||
@@ -1090,7 +1090,7 @@ export function MembershipModal({ visible, onClose, onPurchaseSuccess }: Members
|
||||
>
|
||||
<TouchableOpacity
|
||||
onPress={handlePurchase}
|
||||
disabled={loading || products.length === 0 || !agreementAccepted}
|
||||
disabled={loading || products.length === 0}
|
||||
accessible={true}
|
||||
accessibilityLabel={loading ? '正在处理购买' : '购买会员'}
|
||||
accessibilityHint={
|
||||
@@ -1102,7 +1102,7 @@ export function MembershipModal({ visible, onClose, onPurchaseSuccess }: Members
|
||||
? '请选择会员套餐后再进行购买'
|
||||
: `点击购买${selectedProduct.title || '已选'}会员套餐`
|
||||
}
|
||||
accessibilityState={{ disabled: loading || products.length === 0 || !agreementAccepted }}
|
||||
accessibilityState={{ disabled: loading || products.length === 0 }}
|
||||
style={styles.purchaseButtonContent}
|
||||
>
|
||||
{loading ? (
|
||||
@@ -1120,12 +1120,12 @@ export function MembershipModal({ visible, onClose, onPurchaseSuccess }: Members
|
||||
style={[
|
||||
styles.purchaseButton,
|
||||
styles.fallbackPurchaseButton,
|
||||
(loading || products.length === 0 || !agreementAccepted) && styles.disabledButton
|
||||
(loading || products.length === 0) && styles.disabledButton
|
||||
]}
|
||||
>
|
||||
<TouchableOpacity
|
||||
onPress={handlePurchase}
|
||||
disabled={loading || products.length === 0 || !agreementAccepted}
|
||||
disabled={loading || products.length === 0}
|
||||
accessible={true}
|
||||
accessibilityLabel={loading ? '正在处理购买' : '购买会员'}
|
||||
accessibilityHint={
|
||||
@@ -1137,7 +1137,7 @@ export function MembershipModal({ visible, onClose, onPurchaseSuccess }: Members
|
||||
? '请选择会员套餐后再进行购买'
|
||||
: `点击购买${selectedProduct.title || '已选'}会员套餐`
|
||||
}
|
||||
accessibilityState={{ disabled: loading || products.length === 0 || !agreementAccepted }}
|
||||
accessibilityState={{ disabled: loading || products.length === 0 }}
|
||||
style={styles.purchaseButtonContent}
|
||||
>
|
||||
{loading ? (
|
||||
|
||||
Reference in New Issue
Block a user