Learn more url

This commit is contained in:
Diego Mello 2024-03-06 13:54:01 -03:00
parent 2770bf7bcd
commit 7cc5511bc1
4 changed files with 9 additions and 4 deletions

View File

@ -0,0 +1 @@
export const LEARN_MORE_E2EE_URL = 'https://go.rocket.chat/i/e2ee-guide';

View File

@ -1,4 +1,6 @@
import Encryption from './encryption'; import Encryption from './encryption';
import EncryptionRoom from './room'; import EncryptionRoom from './room';
export * from './constants';
export { Encryption, EncryptionRoom }; export { Encryption, EncryptionRoom };

View File

@ -1,5 +1,5 @@
import React, { ReactElement } from 'react'; import React, { ReactElement } from 'react';
import { StyleSheet, Text, View } from 'react-native'; import { Linking, StyleSheet, Text, View } from 'react-native';
import { StackNavigationProp } from '@react-navigation/stack'; import { StackNavigationProp } from '@react-navigation/stack';
import { ChatsStackParamList } from '../../../stacks/types'; import { ChatsStackParamList } from '../../../stacks/types';
@ -8,6 +8,7 @@ import { CustomIcon } from '../../../containers/CustomIcon';
import Button from '../../../containers/Button'; import Button from '../../../containers/Button';
import sharedStyles from '../../Styles'; import sharedStyles from '../../Styles';
import { useAppSelector } from '../../../lib/hooks'; import { useAppSelector } from '../../../lib/hooks';
import { LEARN_MORE_E2EE_URL } from '../../../lib/encryption';
import I18n from '../../../i18n'; import I18n from '../../../i18n';
import { TNavigation } from '../../../stacks/stackType'; import { TNavigation } from '../../../stacks/stackType';
@ -47,7 +48,7 @@ export const EncryptedRoom = ({
title={I18n.t('Learn_more')} title={I18n.t('Learn_more')}
type='secondary' type='secondary'
backgroundColor={colors.chatComponentBackground} backgroundColor={colors.chatComponentBackground}
onPress={() => alert('learn more')} // TODO: missing url onPress={() => Linking.openURL(LEARN_MORE_E2EE_URL)}
/> />
</View> </View>
</View> </View>

View File

@ -1,11 +1,12 @@
import React, { ReactElement } from 'react'; import React, { ReactElement } from 'react';
import { StyleSheet, Text, View } from 'react-native'; import { Linking, StyleSheet, Text, View } from 'react-native';
import { useTheme } from '../../../theme'; import { useTheme } from '../../../theme';
import { CustomIcon } from '../../../containers/CustomIcon'; import { CustomIcon } from '../../../containers/CustomIcon';
import Button from '../../../containers/Button'; import Button from '../../../containers/Button';
import sharedStyles from '../../Styles'; import sharedStyles from '../../Styles';
import I18n from '../../../i18n'; import I18n from '../../../i18n';
import { LEARN_MORE_E2EE_URL } from '../../../lib/encryption';
const GAP = 32; const GAP = 32;
@ -26,7 +27,7 @@ export const MissingRoomE2EEKey = (): ReactElement => {
title={I18n.t('Learn_more')} title={I18n.t('Learn_more')}
type='secondary' type='secondary'
backgroundColor={colors.chatComponentBackground} backgroundColor={colors.chatComponentBackground}
onPress={() => alert('learn more')} // TODO: missing url onPress={() => Linking.openURL(LEARN_MORE_E2EE_URL)}
/> />
</View> </View>
</View> </View>