feat: media auto-download view

This commit is contained in:
Reinaldo Neto 2023-05-09 11:49:13 -03:00
parent ed6d45cbfe
commit fb664a12d7
8 changed files with 51 additions and 1 deletions

View File

@ -900,5 +900,6 @@
"Presence_Cap_Warning_Title": "User status temporarily disabled", "Presence_Cap_Warning_Title": "User status temporarily disabled",
"Presence_Cap_Warning_Description": "Active connections have reached the limit for the workspace, thus the service that handles user status is disabled. It can be re-enabled manually in workspace settings.", "Presence_Cap_Warning_Description": "Active connections have reached the limit for the workspace, thus the service that handles user status is disabled. It can be re-enabled manually in workspace settings.",
"Learn_more": "Learn more", "Learn_more": "Learn more",
"and_N_more": "and {{count}} more" "and_N_more": "and {{count}} more",
"Media_auto_download": "Media auto-download"
} }

View File

@ -46,6 +46,7 @@ import LanguageView from '../views/LanguageView';
import ThemeView from '../views/ThemeView'; import ThemeView from '../views/ThemeView';
import DefaultBrowserView from '../views/DefaultBrowserView'; import DefaultBrowserView from '../views/DefaultBrowserView';
import ScreenLockConfigView from '../views/ScreenLockConfigView'; import ScreenLockConfigView from '../views/ScreenLockConfigView';
import MediaAutoDownloadView from '../views/MediaAutoDownloadView';
// Admin Stack // Admin Stack
import AdminPanelView from '../views/AdminPanelView'; import AdminPanelView from '../views/AdminPanelView';
// NewMessage Stack // NewMessage Stack
@ -179,6 +180,7 @@ const SettingsStackNavigator = () => {
<SettingsStack.Screen name='LanguageView' component={LanguageView} /> <SettingsStack.Screen name='LanguageView' component={LanguageView} />
<SettingsStack.Screen name='ThemeView' component={ThemeView} /> <SettingsStack.Screen name='ThemeView' component={ThemeView} />
<SettingsStack.Screen name='DefaultBrowserView' component={DefaultBrowserView} /> <SettingsStack.Screen name='DefaultBrowserView' component={DefaultBrowserView} />
<SettingsStack.Screen name='MediaAutoDownloadView' component={MediaAutoDownloadView} />
<SettingsStack.Screen <SettingsStack.Screen
name='ScreenLockConfigView' name='ScreenLockConfigView'
component={ScreenLockConfigView} component={ScreenLockConfigView}

View File

@ -50,6 +50,7 @@ import CreateChannelView from '../../views/CreateChannelView';
import UserPreferencesView from '../../views/UserPreferencesView'; import UserPreferencesView from '../../views/UserPreferencesView';
import UserNotificationPrefView from '../../views/UserNotificationPreferencesView'; import UserNotificationPrefView from '../../views/UserNotificationPreferencesView';
import SecurityPrivacyView from '../../views/SecurityPrivacyView'; import SecurityPrivacyView from '../../views/SecurityPrivacyView';
import MediaAutoDownloadView from '../../views/MediaAutoDownloadView';
import E2EEncryptionSecurityView from '../../views/E2EEncryptionSecurityView'; import E2EEncryptionSecurityView from '../../views/E2EEncryptionSecurityView';
// InsideStackNavigator // InsideStackNavigator
import AttachmentView from '../../views/AttachmentView'; import AttachmentView from '../../views/AttachmentView';
@ -192,6 +193,7 @@ const ModalStackNavigator = React.memo(({ navigation }: INavigation) => {
<ModalStack.Screen name='UserPreferencesView' component={UserPreferencesView} /> <ModalStack.Screen name='UserPreferencesView' component={UserPreferencesView} />
<ModalStack.Screen name='UserNotificationPrefView' component={UserNotificationPrefView} /> <ModalStack.Screen name='UserNotificationPrefView' component={UserNotificationPrefView} />
<ModalStack.Screen name='SecurityPrivacyView' component={SecurityPrivacyView} /> <ModalStack.Screen name='SecurityPrivacyView' component={SecurityPrivacyView} />
<ModalStack.Screen name='MediaAutoDownloadView' component={MediaAutoDownloadView} />
<ModalStack.Screen <ModalStack.Screen
name='E2EEncryptionSecurityView' name='E2EEncryptionSecurityView'
component={E2EEncryptionSecurityView} component={E2EEncryptionSecurityView}

View File

@ -200,6 +200,7 @@ export type ModalStackParamList = {
UserPreferencesView: undefined; UserPreferencesView: undefined;
UserNotificationPrefView: undefined; UserNotificationPrefView: undefined;
SecurityPrivacyView: undefined; SecurityPrivacyView: undefined;
MediaAutoDownloadView: undefined;
E2EEncryptionSecurityView: undefined; E2EEncryptionSecurityView: undefined;
}; };

View File

@ -220,6 +220,7 @@ export type SettingsStackParamList = {
ScreenLockConfigView: undefined; ScreenLockConfigView: undefined;
ProfileView: undefined; ProfileView: undefined;
DisplayPrefsView: undefined; DisplayPrefsView: undefined;
MediaAutoDownloadView: undefined;
}; };
export type AdminPanelStackParamList = { export type AdminPanelStackParamList = {

View File

@ -0,0 +1,35 @@
import React from 'react';
import { StackNavigationProp } from '@react-navigation/stack';
import { useNavigation } from '@react-navigation/native';
import * as List from '../../containers/List';
import SafeAreaView from '../../containers/SafeAreaView';
import StatusBar from '../../containers/StatusBar';
import { SettingsStackParamList } from '../../stacks/types';
const MediaAutoDownload = () => {
const navigation = useNavigation<StackNavigationProp<SettingsStackParamList, 'MediaAutoDownloadView'>>();
return (
<SafeAreaView testID='security-privacy-view'>
<StatusBar />
<List.Container testID='security-privacy-view-list'>
<List.Section>
<List.Separator />
<List.Item
title='E2E_Encryption'
showActionIndicator
onPress={() => {}}
// onPress={() => navigateToScreen('E2EEncryptionSecurityView')}
testID='security-privacy-view-e2e-encryption'
/>
<List.Separator />
<List.Item title='Screen_lock' showActionIndicator onPress={() => {}} testID='security-privacy-view-screen-lock' />
<List.Separator />
</List.Section>
</List.Container>
</SafeAreaView>
);
};
export default MediaAutoDownload;

View File

@ -224,6 +224,13 @@ const SettingsView = (): React.ReactElement => {
testID='settings-view-theme' testID='settings-view-theme'
/> />
<List.Separator /> <List.Separator />
<List.Item
title='Media_auto_download'
showActionIndicator
onPress={() => navigateToScreen('MediaAutoDownloadView')}
testID='media-auto-download-view-theme'
/>
<List.Separator />
<List.Item <List.Item
title='Security_and_privacy' title='Security_and_privacy'
showActionIndicator showActionIndicator

1
ios/.xcode.env.local Normal file
View File

@ -0,0 +1 @@
export NODE_BINARY="/Users/reinaldoneto/.nvm/versions/node/v14.19.3/bin/node"