diff --git a/app/mobile/src/constants/Strings.js b/app/mobile/src/constants/Strings.js
index 6e1db1f4..f0d1685e 100644
--- a/app/mobile/src/constants/Strings.js
+++ b/app/mobile/src/constants/Strings.js
@@ -128,6 +128,15 @@ const Strings = [
create: 'Create',
sealed: 'Sealed',
newTopic: 'New Topic',
+
+ // details
+ topic: 'Topic',
+ host: 'host',
+ guest: 'guest',
+ leave: 'Leave',
+ members: 'Members',
+ editSubject: 'Edit Subject',
+ topicMembers: 'Topic Members',
},
{
visibleRegistry: 'Visible dans le Registre',
@@ -253,6 +262,15 @@ const Strings = [
create: 'Créer',
sealed: 'Protégé',
newTopic: 'Nourveau Sujet',
+
+ // details
+ topic: 'Sujet',
+ host: 'Hôte',
+ guest: 'Invité',
+ leave: 'Partir',
+ members: 'Membres',
+ editSubject: 'Modifier le Title',
+ topicMembers: 'Membres du Sujet',
},
{
visibleRegistry: 'Visible en el Registro',
@@ -378,6 +396,15 @@ const Strings = [
create: 'Crear',
sealed: 'Protegida',
newTopic: 'Nuevo Tema',
+
+ // details
+ topic: 'Tema',
+ host: 'Anfitrión',
+ guest: 'Invitado',
+ leave: 'Dejar',
+ members: 'Miembros',
+ editSubject: 'Editar Título',
+ topicMembers: 'Miembros del Tema',
},
{
visibleRegistry: 'Sichtbar in der Registrierung',
@@ -503,6 +530,15 @@ const Strings = [
create: 'Erstellen',
sealed: 'Gesichert',
newTopic: 'Neues Thema',
+
+ // details
+ topic: 'Thema',
+ host: 'Gastgeber',
+ guest: 'Gast',
+ leave: 'Verlassen',
+ members: 'Mitglieder',
+ editSubject: 'Titel bearbeiten',
+ topicMembers: 'Themenmitglieder',
}
];
diff --git a/app/mobile/src/session/Session.jsx b/app/mobile/src/session/Session.jsx
index cc97df13..8f10ad77 100644
--- a/app/mobile/src/session/Session.jsx
+++ b/app/mobile/src/session/Session.jsx
@@ -87,7 +87,7 @@ function ConversationStackScreen({ dmChannel, shareChannel, shareIntent, setShar
(
- Details
+
)}}>
{(props) => clearConversation(props.navigation)} />}
diff --git a/app/mobile/src/session/channels/Channels.jsx b/app/mobile/src/session/channels/Channels.jsx
index 3e8819cd..6eb1aea4 100644
--- a/app/mobile/src/session/channels/Channels.jsx
+++ b/app/mobile/src/session/channels/Channels.jsx
@@ -22,9 +22,9 @@ export function Channels({ cardId, channelId, navigation, openConversation, dmCh
catch (err) {
console.log(err);
Alert.alert(
- 'Failed to Add Topic',
- 'Please try again.'
- )
+ state.strings.error,
+ state.strings.tryAgain,
+ );
}
};
diff --git a/app/mobile/src/session/channels/Channels.styled.js b/app/mobile/src/session/channels/Channels.styled.js
index b8030994..16cc1f3a 100644
--- a/app/mobile/src/session/channels/Channels.styled.js
+++ b/app/mobile/src/session/channels/Channels.styled.js
@@ -122,10 +122,10 @@ export const styles = StyleSheet.create({
},
addMembers: {
width: '100%',
- borderWidth: 1,
+ borderTopWidth: 1,
+ borderBottomWidth: 1,
borderColor: Colors.lightgrey,
- borderRadius: 4,
- marginBottom: 8,
+ marginBottom: 16,
height: 200,
},
emptyMembers: {
diff --git a/app/mobile/src/session/details/Details.jsx b/app/mobile/src/session/details/Details.jsx
index c3fc5997..e5afe99f 100644
--- a/app/mobile/src/session/details/Details.jsx
+++ b/app/mobile/src/session/details/Details.jsx
@@ -6,6 +6,8 @@ import AntIcons from 'react-native-vector-icons/AntDesign';
import MatIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import Colors from 'constants/Colors';
import { MemberItem } from './memberItem/MemberItem';
+import { BlurView } from '@react-native-community/blur';
+import { InputField } from 'utils/InputField';
export function Details({ channel, clearConversation }) {
@@ -23,8 +25,8 @@ export function Details({ channel, clearConversation }) {
catch (err) {
console.log(err);
Alert.alert(
- 'Failed to Update Membership',
- 'Please try again.'
+ state.strings.error,
+ state.strings.tryAgain,
);
}
};
@@ -37,9 +39,9 @@ export function Details({ channel, clearConversation }) {
catch (err) {
console.log(err);
Alert.alert(
- 'Failed to Save Subject',
- 'Please try again.'
- )
+ state.strings.error,
+ state.strings.tryAgain,
+ );
}
}
@@ -50,9 +52,9 @@ export function Details({ channel, clearConversation }) {
catch (err) {
console.log(err);
Alert.alert(
- 'Failed to Update Notifications',
- 'Please try again.',
- )
+ state.strings.error,
+ state.strings.tryAgain,
+ );
}
}
@@ -157,7 +159,7 @@ export function Details({ channel, clearConversation }) {
)}
{ state.timestamp }
- { state.hostId ? 'guest' : 'host' }
+ { state.hostId ? state.strings.guest : state.strings.host }
@@ -203,7 +205,7 @@ export function Details({ channel, clearConversation }) {
setNotifications(!state.notification)} activeOpacity={1}>
- Enable Notifications
+ { state.strings.enableNotifications }
{ state.notification != null && (
@@ -213,7 +215,7 @@ export function Details({ channel, clearConversation }) {
- Members:
+ { state.strings.members }
{ state.count - state.members.length > 0 && (
(+ {state.count - state.contacts.length} unknown)
)}
@@ -232,23 +234,32 @@ export function Details({ channel, clearConversation }) {
supportedOrientations={['portrait', 'landscape']}
onRequestClose={actions.hideEditSubject}
>
-
-
- Edit Subject:
-
-
+
+
+
+
+ { state.strings.editSubject }
+
+
+
+
+
+ Cancel
+
+
+ Save
+
+
-
-
- Cancel
-
-
- Save
-
-
-
-
+
+
-
-
- Channel Members:
- }
- keyExtractor={item => item.cardId}
- />
-
-
- Done
-
+
+
+
+
+ { state.strings.topicMembers }
+ }
+ keyExtractor={item => item.cardId}
+ />
+
+
+ { state.strings.close }
+
+
-
-
+
+
diff --git a/app/mobile/src/session/details/Details.styled.js b/app/mobile/src/session/details/Details.styled.js
index ab462eda..ba5aa908 100644
--- a/app/mobile/src/session/details/Details.styled.js
+++ b/app/mobile/src/session/details/Details.styled.js
@@ -6,6 +6,8 @@ export const styles = StyleSheet.create({
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
+ backgroundColor: Colors.screenBase,
+ height: '100%',
},
details: {
display: 'flex',
@@ -64,13 +66,13 @@ export const styles = StyleSheet.create({
justifyContent: 'center',
width: 128,
height: 28,
- backgroundColor: Colors.primary,
+ backgroundColor: Colors.primaryButton,
borderRadius: 4,
margin: 8,
padding: 2,
},
buttonText: {
- color: Colors.white,
+ color: Colors.primaryButtonText,
padding: 4,
},
members: {
@@ -81,9 +83,11 @@ export const styles = StyleSheet.create({
borderColor: Colors.divider,
display: 'flex',
flexDirection: 'row',
+ backgroundColor: Colors.screenBase,
},
membersLabel: {
paddingLeft: 16,
+ color: Colors.text,
},
unknown: {
color: Colors.grey,
@@ -91,6 +95,7 @@ export const styles = StyleSheet.create({
},
cards: {
width: '100%',
+ backgroundColor: Colors.screenBase,
},
save: {
padding: 8,
@@ -138,6 +143,7 @@ export const styles = StyleSheet.create({
display: 'flex',
flexDirection: 'row',
justifyContent: 'flex-end',
+ paddingTop: 16,
},
editWrapper: {
display: 'flex',
@@ -148,19 +154,20 @@ export const styles = StyleSheet.create({
backgroundColor: 'rgba(52, 52, 52, 0.8)'
},
editContainer: {
- backgroundColor: Colors.formBackground,
+ backgroundColor: Colors.screenBase,
padding: 16,
width: '80%',
maxWidth: 400,
},
editHeader: {
fontSize: 18,
- paddingBottom: 16,
+ paddingBottom: 8,
+ color: Colors.text,
},
editMembers: {
width: '100%',
borderWidth: 1,
- borderColor: Colors.lightgrey,
+ borderColor: Colors.itemDivider,
borderRadius: 4,
marginBottom: 8,
height: 250,
@@ -183,4 +190,63 @@ 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,
+ },
+ close: {
+ borderWidth: 1,
+ borderColor: Colors.lightgrey,
+ borderRadius: 4,
+ padding: 8,
+ marginRight: 8,
+ width: 72,
+ display: 'flex',
+ alignItems: 'center',
+ },
+ closeText: {
+ color: Colors.cancelButtonText,
+ },
+ 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/details/useDetails.hook.js b/app/mobile/src/session/details/useDetails.hook.js
index 672b0752..65b42647 100644
--- a/app/mobile/src/session/details/useDetails.hook.js
+++ b/app/mobile/src/session/details/useDetails.hook.js
@@ -7,11 +7,13 @@ import { ProfileContext } from 'context/ProfileContext';
import { getChannelSubjectLogo } from 'context/channelUtil';
import { getCardByGuid } from 'context/cardUtil';
import { getChannelSeals, isUnsealed, getContentKey, updateChannelSubject } from 'context/sealUtil';
+import { getLanguageStrings } from 'constants/Strings';
import moment from 'moment';
export function useDetails() {
const [state, setState] = useState({
+ strings: getLanguageStrings(),
subject: null,
timestamp: null,
logo: null,