mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29: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',
|
username: 'Username',
|
||||||
save: 'Save',
|
save: 'Save',
|
||||||
notAvailable: 'Username Not Available',
|
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',
|
visibleRegistry: 'Visible dans le Registre',
|
||||||
@ -117,6 +124,13 @@ const Strings = [
|
|||||||
username: 'Nom d\'Utilisateur',
|
username: 'Nom d\'Utilisateur',
|
||||||
save: 'Engegistrer',
|
save: 'Engegistrer',
|
||||||
notAvailable: 'Nom d\'Utilisateur Indisponible',
|
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',
|
visibleRegistry: 'Visible en el Registro',
|
||||||
@ -174,6 +188,13 @@ const Strings = [
|
|||||||
username: 'Nombre de Usuario',
|
username: 'Nombre de Usuario',
|
||||||
save: 'Guardar',
|
save: 'Guardar',
|
||||||
notAvailable: 'Nombre de Usuario No Disponible',
|
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',
|
visibleRegistry: 'Sichtbar in der Registrierung',
|
||||||
@ -231,6 +252,13 @@ const Strings = [
|
|||||||
username: 'Nutzername',
|
username: 'Nutzername',
|
||||||
save: 'Speichern',
|
save: 'Speichern',
|
||||||
notAvailable: 'Benutzername Nicht Verfügbar',
|
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>
|
<Text style={styles.label}>{ state.strings.blocked }</Text>
|
||||||
<View style={styles.group}>
|
<View style={styles.group}>
|
||||||
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
<TouchableOpacity style={styles.entry} activeOpacity={1} onPress={actions.showBlockedContacts}>
|
||||||
<View style={styles.icon}>
|
<View style={styles.icon}>
|
||||||
<MatIcons name="account-multiple-outline" size={20} color={Colors.linkText} />
|
<MatIcons name="account-multiple-outline" size={20} color={Colors.linkText} />
|
||||||
</View>
|
</View>
|
||||||
@ -230,7 +230,7 @@ export function Settings() {
|
|||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<View style={styles.divider} />
|
<View style={styles.divider} />
|
||||||
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
<TouchableOpacity style={styles.entry} activeOpacity={1} onPress={actions.showBlockedTopics}>
|
||||||
<View style={styles.icon}>
|
<View style={styles.icon}>
|
||||||
<MatIcons name="book-open-outline" size={20} color={Colors.linkText} />
|
<MatIcons name="book-open-outline" size={20} color={Colors.linkText} />
|
||||||
</View>
|
</View>
|
||||||
@ -239,7 +239,7 @@ export function Settings() {
|
|||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<View style={styles.divider} />
|
<View style={styles.divider} />
|
||||||
<TouchableOpacity style={styles.entry} activeOpacity={1}>
|
<TouchableOpacity style={styles.entry} activeOpacity={1} onPress={actions.showBlockedMessages}>
|
||||||
<View style={styles.icon}>
|
<View style={styles.icon}>
|
||||||
<MatIcons name="comment-text-multiple-outline" size={20} color={Colors.linkText} />
|
<MatIcons name="comment-text-multiple-outline" size={20} color={Colors.linkText} />
|
||||||
</View>
|
</View>
|
||||||
@ -598,6 +598,68 @@ export function Settings() {
|
|||||||
</BlurView>
|
</BlurView>
|
||||||
</Modal>
|
</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>
|
</SafeAreaView>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
);
|
);
|
||||||
|
@ -39,6 +39,10 @@ export function useSettings() {
|
|||||||
hidePassword: true,
|
hidePassword: true,
|
||||||
sealRemove: false,
|
sealRemove: false,
|
||||||
sealUpdate: false,
|
sealUpdate: false,
|
||||||
|
|
||||||
|
blockedContacts: false,
|
||||||
|
blockedTopics: false,
|
||||||
|
blockedMessages: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const updateState = (value) => {
|
const updateState = (value) => {
|
||||||
@ -95,6 +99,24 @@ export function useSettings() {
|
|||||||
updateState({ pushEnabled });
|
updateState({ pushEnabled });
|
||||||
await account.actions.setNotifications(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: () => {
|
showLogin: () => {
|
||||||
updateState({ login: true, username: state.handle, password: '', available: true, validated: true });
|
updateState({ login: true, username: state.handle, password: '', available: true, validated: true });
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user