AppSettingScreen.jsx 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import * as WebBrowser from 'expo-web-browser';
  2. import * as React from 'react';
  3. import * as Application from 'expo-application';
  4. import { Div, Button, Image, Text, Avatar, Icon } from 'react-native-magnus';
  5. import { ScrollView } from 'react-native-gesture-handler';
  6. import { useTranslation } from 'react-i18next';
  7. import useModel from 'flooks';
  8. import User from '../../flooks/User';
  9. import Header from '../../components/Header';
  10. export default function AppSettingScreen() {
  11. const { logout } = useModel(User, []);
  12. const { t } = useTranslation();
  13. return (
  14. <>
  15. <Header title="设置" />
  16. <ScrollView>
  17. <Div row bg="white" p={20} mt={10}>
  18. <Text fontSize="sm" textAlign="left" flex={1}>
  19. {t('deng-lu-mi-ma')}
  20. </Text>
  21. <Text fontSize="sm" textAlign="left">
  22. {t('she-zhi-mi-ma')}
  23. </Text>
  24. <Icon name="right" fontSize="xl" />
  25. </Div>
  26. <Div row bg="white" p={20} mt={10}>
  27. <Text fontSize="sm" textAlign="left" flex={1}>
  28. {t('ban-ben-hao')}
  29. </Text>
  30. <Text fontSize="sm" textAlign="left">
  31. v{Application.nativeApplicationVersion}
  32. </Text>
  33. <Icon name="right" fontSize="xl" />
  34. </Div>
  35. <Button block bg="brand500" m={10} onPress={logout}>
  36. {t('tui-chu-deng-lu')}
  37. </Button>
  38. </ScrollView>
  39. </>
  40. );
  41. }