diff --git a/app/mobile/src/constants/Strings.js b/app/mobile/src/constants/Strings.js index ac420d3a..6e1db1f4 100644 --- a/app/mobile/src/constants/Strings.js +++ b/app/mobile/src/constants/Strings.js @@ -119,6 +119,15 @@ const Strings = [ messageContact: 'Message Contact', callContact: 'Call Contact', noContacts: 'No Contacts Found', + + // channels list + profile: 'Profile', + contacts: 'Contacts', + topics: 'Topics', + subject: 'Subject (optional)', + create: 'Create', + sealed: 'Sealed', + newTopic: 'New Topic', }, { visibleRegistry: 'Visible dans le Registre', @@ -235,6 +244,15 @@ const Strings = [ messageContact: 'Envoyer un Message', callContact: 'Appeler le Contact', noContacts: 'Aucun Contact Trouvé', + + // channels list + profile: 'Profil', + contacts: 'Contacts', + topics: 'Sujets', + subject: 'Titre (optionnel)', + create: 'Créer', + sealed: 'Protégé', + newTopic: 'Nourveau Sujet', }, { visibleRegistry: 'Visible en el Registro', @@ -351,6 +369,15 @@ const Strings = [ messageContact: 'Enviar Mensaje', callContact: 'Llamar Contacto', noContacts: 'No Encontraron Contactos', + + // channels list + profile: 'Perfil', + contacts: 'Contactos', + topics: 'Temas', + subject: 'Título (opcional)', + create: 'Crear', + sealed: 'Protegida', + newTopic: 'Nuevo Tema', }, { visibleRegistry: 'Sichtbar in der Registrierung', @@ -467,6 +494,15 @@ const Strings = [ messageContact: 'Nachricht Senden', callContact: 'Kontakt Anrufen', noContacts: 'Keine Kontakte Gefunden', + + // channels list + profile: 'Profil', + contacts: 'Kontakte', + topics: 'Themen', + subject: 'Titel (optional)', + create: 'Erstellen', + sealed: 'Gesichert', + newTopic: 'Neues Thema', } ]; diff --git a/app/mobile/src/session/Session.jsx b/app/mobile/src/session/Session.jsx index 0c161283..cc97df13 100644 --- a/app/mobile/src/session/Session.jsx +++ b/app/mobile/src/session/Session.jsx @@ -43,8 +43,8 @@ const RegistryDrawer = createDrawerNavigator(); const Tab = createBottomTabNavigator(); function ConversationStackScreen({ dmChannel, shareChannel, shareIntent, setShareIntent }) { - const stackParams = { headerStyle: { backgroundColor: Colors.areaBase }, headerBackTitleVisible: false }; - const screenParams = { headerShown: true }; + const stackParams = { headerStyle: { backgroundColor: Colors.screenBase }, headerBackTitleVisible: false }; + const screenParams = { headerShown: true, headerTintColor: Colors.primary }; const conversation = useContext(ConversationContext); const [cardId, setCardId] = useState(); @@ -223,11 +223,11 @@ function HomeScreen({ navParams }) { - + Profile - + Contacts diff --git a/app/mobile/src/session/Session.styled.js b/app/mobile/src/session/Session.styled.js index b83a5fa8..68167fe9 100644 --- a/app/mobile/src/session/Session.styled.js +++ b/app/mobile/src/session/Session.styled.js @@ -82,7 +82,7 @@ export const styles = StyleSheet.create({ height: '100%', width: '33%', maxWidth: 500, - borderRightWidth: 1, + backgroundColor: Colors.screenBase, borderColor: Colors.verticalDivider, }, conversation: { @@ -135,6 +135,7 @@ export const styles = StyleSheet.create({ }, profileLabel: { paddingLeft: 8, + color: Colors.text, }, headertext: { fontSize: 18, diff --git a/app/mobile/src/session/channels/Channels.jsx b/app/mobile/src/session/channels/Channels.jsx index 821bcf49..3e8819cd 100644 --- a/app/mobile/src/session/channels/Channels.jsx +++ b/app/mobile/src/session/channels/Channels.jsx @@ -6,6 +6,8 @@ import { useChannels } from './useChannels.hook'; import { Colors } from 'constants/Colors'; import { ChannelItem } from './channelItem/ChannelItem'; import { AddMember } from './addMember/AddMember'; +import { BlurView } from '@react-native-community/blur'; +import { InputField } from 'utils/InputField'; export function Channels({ cardId, channelId, navigation, openConversation, dmChannel, shareChannel }) { @@ -69,25 +71,25 @@ export function Channels({ cardId, channelId, navigation, openConversation, dmCh )} - { state.channels.length == 0 && ( - - No Topics Found - - )} - { state.channels.length != 0 && ( - } - keyExtractor={item => (`${item.cardId}:${item.channelId}`)} - /> - )} + { state.channels.length == 0 && ( + + No Topics Found + + )} + { state.channels.length != 0 && ( + } + keyExtractor={item => (`${item.cardId}:${item.channelId}`)} + /> + )} { !navigation && ( - New Topic + { state.strings.newTopic } )} @@ -98,51 +100,61 @@ export function Channels({ cardId, channelId, navigation, openConversation, dmCh supportedOrientations={['portrait', 'landscape']} onRequestClose={actions.hideAdding} > - - - New Topic: - - - - Members: - { state.contacts.length == 0 && ( - - No Connected Contacts - - )} - { state.contacts.length > 0 && ( - } - keyExtractor={item => item.cardId} + + + + + + { state.strings.newTopic } + + - )} - - - { state.sealable && ( - <> - - Sealed - - )} + + Members: + { state.contacts.length == 0 && ( + + No Connected Contacts + + )} + { state.contacts.length > 0 && ( + } + keyExtractor={item => item.cardId} + /> + )} + + + { state.sealable && ( + <> + + { state.strings.sealed } + + )} + + + { state.strings.cancel } + + + { state.busy && ( + + )} + { !state.busy && ( + { state.strings.create } + )} + - - Cancel - - - { state.busy && ( - - )} - { !state.busy && ( - Create - )} - - - + + ); diff --git a/app/mobile/src/session/channels/Channels.styled.js b/app/mobile/src/session/channels/Channels.styled.js index 9e3f7b44..b8030994 100644 --- a/app/mobile/src/session/channels/Channels.styled.js +++ b/app/mobile/src/session/channels/Channels.styled.js @@ -7,6 +7,7 @@ export const styles = StyleSheet.create({ height: '100%', display: 'flex', flexDirection: 'column', + backgroundColor: Colors.screenBase, }, title: { display: 'flex', @@ -18,10 +19,11 @@ export const styles = StyleSheet.create({ display: 'flex', flexDirection: 'row', borderRadius: 4, - backgroundColor: Colors.white, + backgroundColor: Colors.inputBase, alignItems: 'center', flexGrow: 1, flexShrink: 1, + marginRight: 8, paddingTop: 4, paddingBottom: 4, }, @@ -30,7 +32,7 @@ export const styles = StyleSheet.create({ flexGrow: 1, textAlign: 'center', padding: 4, - color: Colors.text, + color: Colors.inputText, fontSize: 14, }, addField: { @@ -113,15 +115,10 @@ export const styles = StyleSheet.create({ justifyContent: 'center', backgroundColor: 'rgba(52, 52, 52, 0.8)' }, - addContainer: { - backgroundColor: Colors.formBackground, - padding: 16, - width: '80%', - maxWidth: 400, - }, addHeader: { fontSize: 18, - paddingBottom: 16, + paddingBottom: 8, + color: Colors.text, }, addMembers: { width: '100%', @@ -168,10 +165,16 @@ export const styles = StyleSheet.create({ justifyContent: 'center', }, saveText: { - color: Colors.white, + color: Colors.primaryButtonText, paddingRight: 4, paddingLeft: 4, }, + cancelText: { + color: Colors.cancelButtonText, + }, + sealedText: { + color: Colors.text, + }, addControls: { display: 'flex', flexDirection: 'row', @@ -192,5 +195,51 @@ export const styles = StyleSheet.create({ switch: { transform: [{ scaleX: .7 }, { scaleY: .7 }], }, + modalOverlay: { + width: '100%', + height: '100%', + }, + modalBase: { + position: 'absolute', + top: 0, + left: 0, + width: '100%', + height: '100%', + display: 'flex', + alignItems: 'center', + justifyContent: 'center' + }, + modalContainer: { + backgroundColor: Colors.modalBase, + width: '80%', + maxWidth: 400, + display: 'flex', + alignItems: 'center', + borderRadius: 8, + padding: 16, + }, + field: { + input: { + backgroundColor: Colors.inputBase, + borderRadius: 8, + minHeight: 48, + maxHeight: 128, + paddingLeft: 8, + }, + inputText: { + color: Colors.inputText, + }, + label: { + height: 16, + paddingLeft: 8, + }, + labelText: { + color: Colors.inputPlaceholder, + fontSize: 12, + }, + container: { + width: '100%', + }, + }, }); diff --git a/app/mobile/src/session/channels/channelItem/ChannelItem.jsx b/app/mobile/src/session/channels/channelItem/ChannelItem.jsx index 2e7271c4..2c66ae48 100644 --- a/app/mobile/src/session/channels/channelItem/ChannelItem.jsx +++ b/app/mobile/src/session/channels/channelItem/ChannelItem.jsx @@ -11,7 +11,7 @@ export function ChannelItem({ cardId, channelId, item, openConversation }) { return ( openConversation(item.cardId, item.channelId, item.revision)}> - + { item.locked && !item.unlocked && ( diff --git a/app/mobile/src/session/channels/channelItem/ChannelItem.styled.js b/app/mobile/src/session/channels/channelItem/ChannelItem.styled.js index 039aedc9..95864b80 100644 --- a/app/mobile/src/session/channels/channelItem/ChannelItem.styled.js +++ b/app/mobile/src/session/channels/channelItem/ChannelItem.styled.js @@ -6,7 +6,7 @@ export const styles = StyleSheet.create({ width: '100%', display: 'flex', flexDirection: 'row', - height: 48, + height: 64, alignItems: 'center', borderBottomWidth: 1, borderColor: Colors.itemDivider, @@ -17,13 +17,13 @@ export const styles = StyleSheet.create({ width: '100%', display: 'flex', flexDirection: 'row', - height: 48, + height: 64, alignItems: 'center', borderBottomWidth: 1, borderColor: Colors.itemDivider, paddingLeft: 16, paddingRight: 16, - backgroundColor: Colors.formFocus, + backgroundColor: Colors.areaBase, }, detail: { paddingLeft: 12, @@ -42,11 +42,11 @@ export const styles = StyleSheet.create({ }, subjectText: { color: Colors.text, - fontSize: 14, + fontSize: 16, }, message: { color: Colors.disabled, - fontSize: 12, + fontSize: 14, }, dot: { width: 8, diff --git a/app/mobile/src/session/channels/useChannels.hook.js b/app/mobile/src/session/channels/useChannels.hook.js index f900022c..20cb5d7c 100644 --- a/app/mobile/src/session/channels/useChannels.hook.js +++ b/app/mobile/src/session/channels/useChannels.hook.js @@ -7,9 +7,11 @@ import { ProfileContext } from 'context/ProfileContext'; import { getChannelSeals, isUnsealed, getContentKey, encryptChannelSubject, decryptChannelSubject, decryptTopicSubject } from 'context/sealUtil'; import { getCardByGuid } from 'context/cardUtil'; import { getChannelSubjectLogo } from 'context/channelUtil'; +import { getLanguageStrings } from 'constants/Strings'; export function useChannels() { const [state, setState] = useState({ + strings: getLanguageStrings(), filter: null, channels: [], adding: false,