用户未登录,不显示

This commit is contained in:
郭文文 2026-01-26 16:10:56 +08:00
parent 18dc038c52
commit 9fcbc0346a
3 changed files with 15 additions and 18 deletions

View File

@ -575,9 +575,11 @@ const GooActions = observer<GooActionsProps>(function GooActions({ gooPoints, on
{isDev && isPolling && <Block className="ml-[4px] size-[6px] rounded-full bg-green-500" />} {isDev && isPolling && <Block className="ml-[4px] size-[6px] rounded-full bg-green-500" />}
</Block> </Block>
)} )}
{!!isAuthenticated && (
<Block onClick={() => router.push('/settings')}> <Block onClick={() => router.push('/settings')}>
<Ionicons color="white" name="settings-outline" size={22} /> <Ionicons color="white" name="settings-outline" size={22} />
</Block> </Block>
)}
<Block <Block
className="size-[48px] items-center justify-center rounded-full border-[3px] border-black bg-white shadow-[4px_4px_0px_#000]" className="size-[48px] items-center justify-center rounded-full border-[3px] border-black bg-white shadow-[4px_4px_0px_#000]"
onClick={onOpenSearch} onClick={onOpenSearch}

View File

@ -183,7 +183,7 @@ export default observer(function ProfilePage() {
) )
const renderInfoList = () => ( const renderInfoList = () => (
<Block className="mt-[32px] px-[16px]"> <Block className="mt-[32px] mx-[16px] bg-white rounded-xl px-[16px]">
{infoItems.map((item) => ( {infoItems.map((item) => (
<Block <Block
key={item.id} key={item.id}
@ -192,7 +192,7 @@ export default observer(function ProfilePage() {
> >
<Text className="w-[56px] text-[14px] text-black">{item.label}</Text> <Text className="w-[56px] text-[14px] text-black">{item.label}</Text>
<Text <Text
className="flex-1 text-[14px] text-right" className="flex-1 text-[14px] text-right text-[#9D9D9D]"
style={{ color: item.valueGray ? '#9CA3AF' : '#000' }} style={{ color: item.valueGray ? '#9CA3AF' : '#000' }}
numberOfLines={1} numberOfLines={1}
ellipsizeMode="tail" ellipsizeMode="tail"
@ -201,7 +201,7 @@ export default observer(function ProfilePage() {
</Text> </Text>
{/*手机号 显示隐藏按钮 */} {/*手机号 显示隐藏按钮 */}
{item.id !== 'phone' && ( {item.id !== 'phone' && (
<Ionicons color="#9CA3AF" name="chevron-forward" size={18} /> <Ionicons color="#9D9D9D" name="chevron-forward" size={18} />
)} )}
</Block> </Block>
))} ))}
@ -209,7 +209,7 @@ export default observer(function ProfilePage() {
) )
return ( return (
<Block className="h-full flex-1 bg-white"> <Block className="h-full flex-1 bg-[#fafafa]">
<Stack.Screen options={{ headerShown: false }} /> <Stack.Screen options={{ headerShown: false }} />
{renderHeader()} {renderHeader()}
<ScrollView contentContainerStyle={{ flexGrow: 1 }} showsVerticalScrollIndicator={false}> <ScrollView contentContainerStyle={{ flexGrow: 1 }} showsVerticalScrollIndicator={false}>

View File

@ -117,9 +117,9 @@ export default observer(function SettingsPage() {
const renderMenuSection = () => ( const renderMenuSection = () => (
<Block className="mt-[8px]"> <Block className="mt-[8px]">
<Text className="px-[16px] py-[8px] text-[12px] text-gray-400">使</Text> <Text className="px-[20px] py-[8px] text-[12px] text-[#9D9D9D]">使</Text>
<Block className="bg-white"> <Block className="bg-white mx-[16px] rounded-xl">
{menuItems.map((item, index) => ( {menuItems.map((item) => (
<Block key={item.id}> <Block key={item.id}>
<Block <Block
className="flex-row items-center gap-[12px] px-[16px] py-[16px]" className="flex-row items-center gap-[12px] px-[16px] py-[16px]"
@ -129,9 +129,6 @@ export default observer(function SettingsPage() {
<Text className="flex-1 text-[14px] text-black">{item.label}</Text> <Text className="flex-1 text-[14px] text-black">{item.label}</Text>
<Ionicons color="#9CA3AF" name="chevron-forward" size={20} /> <Ionicons color="#9CA3AF" name="chevron-forward" size={20} />
</Block> </Block>
{index < menuItems.length - 1 && (
<Block className="ml-[50px] h-[1px] bg-gray-100" />
)}
</Block> </Block>
))} ))}
</Block> </Block>
@ -139,20 +136,18 @@ export default observer(function SettingsPage() {
) )
const renderLogoutButton = () => ( const renderLogoutButton = () => (
<Block className="mt-[32px] items-center px-[16px]"> <Block className="mt-[40px] items-center px-[16px]">
{isAuthenticated && (
<Block <Block
className="w-full max-w-[200px] items-center justify-center rounded-lg bg-gray-100 py-[14px]" className="w-full items-center justify-center rounded-xl bg-white py-[14px]"
onClick={handleLogout} onClick={handleLogout}
> >
<Text className="text-[14px] font-[600] text-black">退</Text> <Text className="text-[14px] font-[600] text-black">退</Text>
</Block> </Block>
)}
</Block> </Block>
) )
return ( return (
<Block className="flex-1 bg-white h-full"> <Block className="flex-1 bg-[#fafafa] h-full">
<Stack.Screen options={{ headerShown: false }} /> <Stack.Screen options={{ headerShown: false }} />
{renderHeader()} {renderHeader()}
<ScrollView contentContainerStyle={{ flexGrow: 1 }} showsVerticalScrollIndicator={false}> <ScrollView contentContainerStyle={{ flexGrow: 1 }} showsVerticalScrollIndicator={false}>