mirror of
https://github.com/balzack/databag.git
synced 2025-02-11 19:19:16 +00:00
added stubs for blocked modals
This commit is contained in:
parent
32722bdc99
commit
2c03abdeb3
@ -60,6 +60,13 @@ const Strings = [
|
||||
username: 'Username',
|
||||
save: 'Save',
|
||||
notAvailable: 'Username Not Available',
|
||||
blockedContacts: 'Blocked Contacts',
|
||||
restoreContact: 'Restore Contact?',
|
||||
blockedTopics: 'Blocked Topics',
|
||||
restoreTopic: 'Restore Topic?',
|
||||
blockedMessages: 'Blocked Messages',
|
||||
restoreMessage: 'Restore Message?',
|
||||
close: 'Close',
|
||||
},
|
||||
{
|
||||
visibleRegistry: 'Visible dans le Registre',
|
||||
@ -117,6 +124,13 @@ const Strings = [
|
||||
username: 'Nom d\'Utilisateur',
|
||||
save: 'Engegistrer',
|
||||
notAvailable: 'Nom d\'Utilisateur Indisponible',
|
||||
blockedContacts: 'Contacts Bloqués',
|
||||
restoreContact: 'Restaurer le Contact?',
|
||||
blockedTopics: 'Sujets Bloqués',
|
||||
restoreTopic: 'Restaurer le Sujet?',
|
||||
blockedMessages: 'Messages Bloqués',
|
||||
restoreMessage: 'Restaurer le Message?',
|
||||
close: 'Fermer',
|
||||
},
|
||||
{
|
||||
visibleRegistry: 'Visible en el Registro',
|
||||
@ -174,6 +188,13 @@ const Strings = [
|
||||
username: 'Nombre de Usuario',
|
||||
save: 'Guardar',
|
||||
notAvailable: 'Nombre de Usuario No Disponible',
|
||||
blockedContacts: 'Contactos Bloqueados',
|
||||
restoreContact: 'Restaurar Contacto?',
|
||||
blockedTopics: 'Temas bloqueados',
|
||||
restoreTopic: 'Restaurar Tema?',
|
||||
blockedMessages: 'Mensajes Bloqueados',
|
||||
restoreMessage: 'Restaurar Mensaje?',
|
||||
close: 'Cerrar',
|
||||
},
|
||||
{
|
||||
visibleRegistry: 'Sichtbar in der Registrierung',
|
||||
@ -231,6 +252,13 @@ const Strings = [
|
||||
username: 'Nutzername',
|
||||
save: 'Speichern',
|
||||
notAvailable: 'Benutzername Nicht Verfügbar',
|
||||
blockedContacts: 'Blockierte Kontakte',
|
||||
restoreContact: 'Kontakt Wiederherstellen?',
|
||||
blockedTopics: 'Blockierte Themen',
|
||||
restoreTopic: 'Thema Wiederherstellen?',
|
||||
blockedMessages: 'Blockierte Nachrichten',
|
||||
restoreMessage: 'Nachricht Wiederherstellen?',
|
||||
close: 'Schließen',
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -221,7 +221,7 @@ export function Settings() {
|
||||
|
||||
<Text style={styles.label}>{ state.strings.blocked }</Text>
|
||||
<View style={styles.group}>
|
||||
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
||||
<TouchableOpacity style={styles.entry} activeOpacity={1} onPress={actions.showBlockedContacts}>
|
||||
<View style={styles.icon}>
|
||||
<MatIcons name="account-multiple-outline" size={20} color={Colors.linkText} />
|
||||
</View>
|
||||
@ -230,7 +230,7 @@ export function Settings() {
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
<View style={styles.divider} />
|
||||
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
||||
<TouchableOpacity style={styles.entry} activeOpacity={1} onPress={actions.showBlockedTopics}>
|
||||
<View style={styles.icon}>
|
||||
<MatIcons name="book-open-outline" size={20} color={Colors.linkText} />
|
||||
</View>
|
||||
@ -239,7 +239,7 @@ export function Settings() {
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
<View style={styles.divider} />
|
||||
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
||||
<TouchableOpacity style={styles.entry} activeOpacity={1} onPress={actions.showBlockedMessages}>
|
||||
<View style={styles.icon}>
|
||||
<MatIcons name="comment-text-multiple-outline" size={20} color={Colors.linkText} />
|
||||
</View>
|
||||
@ -597,7 +597,69 @@ export function Settings() {
|
||||
</View>
|
||||
</BlurView>
|
||||
</Modal>
|
||||
|
||||
|
||||
<Modal
|
||||
animationType="fade"
|
||||
transparent={true}
|
||||
visible={state.blockedContacts}
|
||||
supportedOrientations={['portrait', 'landscape']}
|
||||
onRequestClose={state.hideBlockedContacts}
|
||||
>
|
||||
<BlurView style={styles.modalOverlay} blurType={Colors.overlay} blurAmount={2} reducedTransparencyFallbackColor="black">
|
||||
<View style={styles.modalContainer}>
|
||||
<View style={styles.modalClose}>
|
||||
<TouchableOpacity style={styles.closeButton} activeOpacity={1} onPress={actions.hideBlockedContacts}>
|
||||
<MatIcons name="close" size={20} color={Colors.descriptionText} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<Text style={styles.modalHeader}>{ state.strings.blockedContacts }</Text>
|
||||
<ActivityIndicator style={styles.modalBusy} animating={busy} color={Colors.primary} />
|
||||
</View>
|
||||
</BlurView>
|
||||
</Modal>
|
||||
|
||||
<Modal
|
||||
animationType="fade"
|
||||
transparent={true}
|
||||
visible={state.blockedTopics}
|
||||
supportedOrientations={['portrait', 'landscape']}
|
||||
onRequestClose={state.hideBlockedTopics}
|
||||
>
|
||||
<BlurView style={styles.modalOverlay} blurType={Colors.overlay} blurAmount={2} reducedTransparencyFallbackColor="black">
|
||||
<View style={styles.modalContainer}>
|
||||
<View style={styles.modalClose}>
|
||||
<TouchableOpacity style={styles.closeButton} activeOpacity={1} onPress={actions.hideBlockedTopics}>
|
||||
<MatIcons name="close" size={20} color={Colors.descriptionText} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<Text style={styles.modalHeader}>{ state.strings.blockedContacts }</Text>
|
||||
<ActivityIndicator style={styles.modalBusy} animating={busy} color={Colors.primary} />
|
||||
</View>
|
||||
</BlurView>
|
||||
</Modal>
|
||||
|
||||
<Modal
|
||||
animationType="fade"
|
||||
transparent={true}
|
||||
visible={state.blockedMessages}
|
||||
supportedOrientations={['portrait', 'landscape']}
|
||||
onRequestClose={actions.hideBlockedMessages}
|
||||
>
|
||||
<BlurView style={styles.modalOverlay} blurType={Colors.overlay} blurAmount={2} reducedTransparencyFallbackColor="black">
|
||||
<View style={styles.modalContainer}>
|
||||
<View style={styles.modalClose}>
|
||||
<TouchableOpacity style={styles.closeButton} activeOpacity={1} onPress={actions.hideBlockedMessages}>
|
||||
<MatIcons name="close" size={20} color={Colors.descriptionText} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<Text style={styles.modalHeader}>{ state.strings.blockedContacts }</Text>
|
||||
<ActivityIndicator style={styles.modalBusy} animating={busy} color={Colors.primary} />
|
||||
</View>
|
||||
</BlurView>
|
||||
</Modal>
|
||||
|
||||
|
||||
|
||||
</SafeAreaView>
|
||||
</ScrollView>
|
||||
);
|
||||
|
@ -39,6 +39,10 @@ export function useSettings() {
|
||||
hidePassword: true,
|
||||
sealRemove: false,
|
||||
sealUpdate: false,
|
||||
|
||||
blockedContacts: false,
|
||||
blockedTopics: false,
|
||||
blockedMessages: false,
|
||||
});
|
||||
|
||||
const updateState = (value) => {
|
||||
@ -95,6 +99,24 @@ export function useSettings() {
|
||||
updateState({ pushEnabled });
|
||||
await account.actions.setNotifications(pushEnabled);
|
||||
},
|
||||
showBlockedContacts: () => {
|
||||
updateState({ blockedContacts: true });
|
||||
},
|
||||
hideBlockedContacts: () => {
|
||||
updateState({ blockedContacts: false });
|
||||
},
|
||||
showBlockedTopics: () => {
|
||||
updateState({ blockedTopics: true });
|
||||
},
|
||||
hideBlockedTopics: () => {
|
||||
updateState({ blockedTopics: false });
|
||||
},
|
||||
showBlockedMessages: () => {
|
||||
updateState({ blockedMessages: true });
|
||||
},
|
||||
hideBlockedMessages: () => {
|
||||
updateState({ blockedMessages: false });
|
||||
},
|
||||
showLogin: () => {
|
||||
updateState({ login: true, username: state.handle, password: '', available: true, validated: true });
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user