mirror of
https://github.com/balzack/databag.git
synced 2025-03-13 00:50:03 +00:00
148 lines
6.2 KiB
JavaScript
148 lines
6.2 KiB
JavaScript
import { ScrollView, View, Text, Switch, TouchableOpacity } from 'react-native';
|
|
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
|
|
import { styles } from './Settings.styled';
|
|
import { useSettings } from './useSettings.hook';
|
|
import MatIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
import Colors from 'constants/Colors';
|
|
import Strings from 'constants/Strings';
|
|
|
|
export function Settings() {
|
|
|
|
const { state, actions } = useSettings();
|
|
|
|
return (
|
|
<SafeAreaView edges={['top']} style={styles.container}>
|
|
<ScrollView style={styles.content}>
|
|
|
|
<Text style={styles.label}>{ Strings[state.lang].messaging }</Text>
|
|
<View style={styles.group}>
|
|
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
|
<View style={styles.icon}>
|
|
<MatIcons name="bell-outline" size={20} color={Colors.linkText} />
|
|
</View>
|
|
<View style={styles.option}>
|
|
<Text style={styles.optionLink}>{ Strings[state.lang].enableNotifications }</Text>
|
|
</View>
|
|
<View style={styles.control}>
|
|
<Switch style={styles.notifications} trackColor={styles.track}/>
|
|
</View>
|
|
</TouchableOpacity>
|
|
<View style={styles.divider} />
|
|
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
|
<View style={styles.icon}>
|
|
<MatIcons name="lock-outline" size={20} color={Colors.linkText} />
|
|
</View>
|
|
<View style={styles.option}>
|
|
<Text style={styles.optionLink}>{ Strings[state.lang].sealedTopics }</Text>
|
|
</View>
|
|
<View style={styles.control} />
|
|
</TouchableOpacity>
|
|
</View>
|
|
|
|
<Text style={styles.label}>{ Strings[state.lang].display }</Text>
|
|
<View style={styles.group}>
|
|
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
|
<View style={styles.icon}>
|
|
<MatIcons name="progress-clock" size={20} color={Colors.linkText} />
|
|
</View>
|
|
<View style={styles.option}>
|
|
<Text style={styles.optionLink}>{ Strings[state.lang].hourMode }</Text>
|
|
</View>
|
|
<View style={styles.control} />
|
|
</TouchableOpacity>
|
|
<View style={styles.divider} />
|
|
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
|
<View style={styles.icon}>
|
|
<MatIcons name="earth" size={20} color={Colors.linkText} />
|
|
</View>
|
|
<View style={styles.option}>
|
|
<Text style={styles.optionLink}>{ Strings[state.lang].language }</Text>
|
|
</View>
|
|
<View style={styles.control} />
|
|
</TouchableOpacity>
|
|
</View>
|
|
|
|
<Text style={styles.label}>{ Strings[state.lang].account }</Text>
|
|
<View style={styles.group}>
|
|
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
|
<View style={styles.icon}>
|
|
<MatIcons name="logout" size={20} color={Colors.linkText} />
|
|
</View>
|
|
<View style={styles.option}>
|
|
<Text style={styles.optionLink}>{ Strings[state.lang].logout }</Text>
|
|
</View>
|
|
<View style={styles.control} />
|
|
</TouchableOpacity>
|
|
<View style={styles.divider} />
|
|
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
|
<View style={styles.icon}>
|
|
<MatIcons name="login" size={20} color={Colors.linkText} />
|
|
</View>
|
|
<View style={styles.option}>
|
|
<Text style={styles.optionLink}>{ Strings[state.lang].changeLogin }</Text>
|
|
</View>
|
|
<View style={styles.control} />
|
|
</TouchableOpacity>
|
|
<View style={styles.divider} />
|
|
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
|
<View style={styles.icon}>
|
|
<MatIcons name="trash-can-outline" size={20} color={Colors.dangerText} />
|
|
</View>
|
|
<View style={styles.option}>
|
|
<Text style={styles.dangerLink}>{ Strings[state.lang].deleteAccount }</Text>
|
|
</View>
|
|
<View style={styles.control} />
|
|
</TouchableOpacity>
|
|
</View>
|
|
|
|
<Text style={styles.label}>{ Strings[state.lang].blocked }</Text>
|
|
<View style={styles.group}>
|
|
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
|
<View style={styles.icon}>
|
|
<MatIcons name="account-multiple-outline" size={20} color={Colors.linkText} />
|
|
</View>
|
|
<View style={styles.option}>
|
|
<Text style={styles.optionLink}>{ Strings[state.lang].contacts }</Text>
|
|
</View>
|
|
<View style={styles.control} />
|
|
</TouchableOpacity>
|
|
<View style={styles.divider} />
|
|
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
|
<View style={styles.icon}>
|
|
<MatIcons name="book-open-outline" size={20} color={Colors.linkText} />
|
|
</View>
|
|
<View style={styles.option}>
|
|
<Text style={styles.optionLink}>{ Strings[state.lang].topics }</Text>
|
|
</View>
|
|
<View style={styles.control} />
|
|
</TouchableOpacity>
|
|
<View style={styles.divider} />
|
|
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
|
<View style={styles.icon}>
|
|
<MatIcons name="comment-text-multiple-outline" size={20} color={Colors.linkText} />
|
|
</View>
|
|
<View style={styles.option}>
|
|
<Text style={styles.optionLink}>{ Strings[state.lang].messages }</Text>
|
|
</View>
|
|
<View style={styles.control} />
|
|
</TouchableOpacity>
|
|
</View>
|
|
|
|
<Text style={styles.label}>{ Strings[state.lang].support }</Text>
|
|
<View style={styles.group}>
|
|
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
|
<View style={styles.icon}>
|
|
<MatIcons name="help-network-outline" size={20} color={Colors.linkText} />
|
|
</View>
|
|
<View style={styles.option}>
|
|
<Text style={styles.optionLink}>github.com/balzack/databag</Text>
|
|
</View>
|
|
<View style={styles.control} />
|
|
</TouchableOpacity>
|
|
</View>
|
|
|
|
</ScrollView>
|
|
</SafeAreaView>
|
|
);
|
|
}
|