| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- import { StackScreenProps } from '@react-navigation/stack';
- import * as React from 'react';
- import { Div, Button, Image, Text, Avatar, Icon } from 'react-native-magnus';
- import { ScrollView } from 'react-native-gesture-handler';
- import { useTranslation } from 'react-i18next';
- import useModel from 'flooks';
- import User from '../stores/User';
- import { alert } from '../utils/SystemUtils';
- export default function SettingScreen({ navigation }: StackScreenProps) {
- const { t } = useTranslation();
- const { logout } = useModel(User, []);
- return (
- <Div bg="gray100">
- <ScrollView
- contentContainerStyle={{
- flexGrow: 1,
- backgroundColor: '#f2f2f2',
- }}
- >
- <Button
- bg="white"
- px={12}
- h={52}
- py={0}
- block
- mt={10}
- rounded="none"
- onPress={() => {
- navigation.navigate('SettingSys');
- }}
- >
- <Div row justifyContent="space-between" flex={1}>
- <Text fontSize="sm">{t('tong-zhi-he-ti-shi-yin-she-zhi')}</Text>
- <Icon name="right" />
- </Div>
- </Button>
- <Button bg="white" px={12} h={52} py={0} block mt={10} rounded="none">
- <Div row justifyContent="space-between" flex={1}>
- <Text fontSize="sm">
- {t('ding-dong-wai-mai-qi-shou-zhu-ce-xie-yi')}
- </Text>
- <Icon name="right" />
- </Div>
- </Button>
- <Button bg="white" px={12} h={52} py={0} block mt={10} rounded="none">
- <Div row justifyContent="space-between" flex={1}>
- <Text fontSize="sm">
- {t('ding-dong-wai-mai-qi-shou-yin-si-zheng-ce')}
- </Text>
- <Icon name="right" />
- </Div>
- </Button>
- <Button bg="white" px={12} h={52} py={0} block mt={10} rounded="none">
- <Div row justifyContent="space-between" flex={1}>
- <Text fontSize="sm">{t('qi-shou-fu-wu-he-zuo-xie-yi')}</Text>
- <Icon name="right" />
- </Div>
- </Button>
- <Button
- w={112}
- bg="white"
- color="black"
- borderWidth={1}
- borderColor="yellow500"
- fontSize="sm"
- alignSelf="center"
- my={30}
- onPress={() => {
- alert(navigation, {
- msg: '确认要退出当前账号吗?',
- hasCancel: true,
- submitEvent: () => logout(),
- });
- }}
- >
- 退出当前账户
- </Button>
- </ScrollView>
- </Div>
- );
- }
|