Skip to content

Commit

Permalink
Merge branch 'develop' into feat.encrypt-file
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolmello committed Jun 19, 2024
2 parents f9dc390 + b226543 commit 548ec96
Show file tree
Hide file tree
Showing 68 changed files with 819 additions and 237 deletions.
9 changes: 8 additions & 1 deletion app/actions/actionsTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,14 @@ export const INVITE_LINKS = createRequestTypes('INVITE_LINKS', [
export const SETTINGS = createRequestTypes('SETTINGS', ['CLEAR', 'ADD', 'UPDATE']);
export const APP_STATE = createRequestTypes('APP_STATE', ['FOREGROUND', 'BACKGROUND']);
export const ENTERPRISE_MODULES = createRequestTypes('ENTERPRISE_MODULES', ['CLEAR', 'SET']);
export const ENCRYPTION = createRequestTypes('ENCRYPTION', ['INIT', 'STOP', 'DECODE_KEY', 'SET', 'SET_BANNER']);
export const ENCRYPTION = createRequestTypes('ENCRYPTION', [
'INIT',
'STOP',
'DECODE_KEY',
'DECODE_KEY_FAILURE',
'SET',
'SET_BANNER'
]);

export const PERMISSIONS = createRequestTypes('PERMISSIONS', ['SET', 'UPDATE']);
export const ROLES = createRequestTypes('ROLES', ['SET', 'UPDATE', 'REMOVE']);
Expand Down
6 changes: 6 additions & 0 deletions app/actions/encryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ export function encryptionDecodeKey(password: string): IEncryptionDecodeKey {
password
};
}

export function encryptionDecodeKeyFailure(): Action {
return {
type: ENCRYPTION.DECODE_KEY_FAILURE
};
}
6 changes: 5 additions & 1 deletion app/containers/ActivityIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ const styles = StyleSheet.create({
const RCActivityIndicator = ({ absolute, ...props }: IActivityIndicator): React.ReactElement => {
const { theme } = useTheme();
return (
<ActivityIndicator style={[styles.indicator, absolute && styles.absolute]} color={themes[theme].fontSecondaryInfo} {...props} />
<ActivityIndicator
style={[styles.indicator, absolute && styles.absolute]}
color={themes[theme].fontSecondaryInfo}
{...props}
/>
);
};

Expand Down
8 changes: 7 additions & 1 deletion app/containers/AudioPlayer/PlayButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ const Icon = ({ audioState, disabled }: { audioState: TAudioState; disabled: boo
customIconName = 'play-shape-filled';
}

return <CustomIcon name={customIconName} size={24} color={disabled ? colors.buttonBackgroundPrimaryDisabled : colors.buttonFontPrimary} />;
return (
<CustomIcon
name={customIconName}
size={24}
color={disabled ? colors.buttonBackgroundPrimaryDisabled : colors.buttonFontPrimary}
/>
);
};

const PlayButton = ({ onPress, disabled = false, audioState }: IButton): React.ReactElement => {
Expand Down
7 changes: 6 additions & 1 deletion app/containers/List/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ const Content = React.memo(
{translateTitle && title ? I18n.t(title) : title}
</Text>
{alert ? (
<CustomIcon name='info' size={ICON_SIZE} color={themes[theme].buttonBackgroundDangerDefault} style={styles.alertIcon} />
<CustomIcon
name='info'
size={ICON_SIZE}
color={themes[theme].buttonBackgroundDangerDefault}
style={styles.alertIcon}
/>
) : null}
</View>
{subtitle ? (
Expand Down
13 changes: 10 additions & 3 deletions app/containers/RoomHeader/RoomHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ interface IRoomHeader {
onPress: Function;
testID?: string;
sourceType?: IOmnichannelSource;
disabled?: boolean;
}

const SubTitle = React.memo(({ usersTyping, subtitle, renderFunc, scale }: TRoomHeaderSubTitle) => {
Expand Down Expand Up @@ -139,7 +140,8 @@ const Header = React.memo(
teamMain,
testID,
usersTyping = [],
sourceType
sourceType,
disabled
}: IRoomHeader) => {
const { colors } = useTheme();
const portrait = height > width;
Expand Down Expand Up @@ -177,8 +179,13 @@ const Header = React.memo(
testID='room-header'
accessibilityLabel={title}
onPress={handleOnPress}
style={styles.container}
disabled={!!tmid}
style={[
styles.container,
{
opacity: disabled ? 0.5 : 1
}
]}
disabled={disabled}
hitSlop={HIT_SLOP}>
<View style={styles.titleContainer}>
{tmid ? null : (
Expand Down
5 changes: 4 additions & 1 deletion app/containers/RoomHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ interface IRoomHeaderContainerProps {
testID?: string;
sourceType?: IOmnichannelSource;
visitor?: IVisitor;
disabled?: boolean;
}

const RoomHeaderContainer = React.memo(
Expand All @@ -36,7 +37,8 @@ const RoomHeaderContainer = React.memo(
tmid,
type,
sourceType,
visitor
visitor,
disabled
}: IRoomHeaderContainerProps) => {
let subtitle: string | undefined;
let statusVisitor: TUserStatus | undefined;
Expand Down Expand Up @@ -86,6 +88,7 @@ const RoomHeaderContainer = React.memo(
testID={testID}
onPress={onPress}
sourceType={sourceType}
disabled={disabled}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const SupportedVersionsWarning = ({ navigation, route }: { navigation?: a
) : null}
<Button
testID='sv-warn-button'
title='Learn more'
title={I18n.t('Learn_more')}
type='secondary'
backgroundColor={colors.surfaceTint}
onPress={() => Linking.openURL(message.link || LEARN_MORE_URL)}
Expand Down
4 changes: 3 additions & 1 deletion app/containers/UIKit/MultiSelect/Items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ const Item = ({ item, selected, onSelect }: IItem) => {
{textParser([item.text])}
</Text>
</View>
<View style={styles.flexZ}>{selected ? <CustomIcon color={colors.badgeBackgroundLevel2} size={22} name='check' /> : null}</View>
<View style={styles.flexZ}>
{selected ? <CustomIcon color={colors.badgeBackgroundLevel2} size={22} name='check' /> : null}
</View>
</View>
</Touchable>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { CustomIcon } from '../../../CustomIcon';
import styles from '../../styles';

const Translated = memo(({ isTranslated }: { isTranslated: boolean }) => {

if (!isTranslated) {
return null;
}
Expand Down
5 changes: 4 additions & 1 deletion app/containers/message/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ const Content = React.memo(

if (props.isEncrypted) {
content = (
<Text style={[styles.textInfo, { color: themes[theme].fontSecondaryInfo }]} accessibilityLabel={I18n.t('Encrypted_message')}>
<Text
style={[styles.textInfo, { color: themes[theme].fontSecondaryInfo }]}
accessibilityLabel={I18n.t('Encrypted_message')}
>
{I18n.t('Encrypted_message')}
</Text>
);
Expand Down
5 changes: 4 additions & 1 deletion app/containers/message/Thread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ const Thread = React.memo(

return (
<View style={styles.buttonContainer}>
<View style={[styles.button, { backgroundColor: themes[theme].badgeBackgroundLevel2 }]} testID={`message-thread-button-${msg}`}>
<View
style={[styles.button, { backgroundColor: themes[theme].badgeBackgroundLevel2 }]}
testID={`message-thread-button-${msg}`}
>
<Text style={[styles.buttonText, { color: themes[theme].fontWhite }]}>{I18n.t('Reply')}</Text>
</View>
<ThreadDetails
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ const OmnichannelQueue = ({ queueSize, onPress }: IOmnichannelQueue) => {
<View style={styles.omnichannelRightContainer}>
{queueSize ? (
<>
<UnreadBadge style={[styles.queueIcon, { backgroundColor: themes[theme].badgeBackgroundLevel2 }]} unread={queueSize} />
<UnreadBadge
style={[styles.queueIcon, { backgroundColor: themes[theme].badgeBackgroundLevel2 }]}
unread={queueSize}
/>
<CustomIcon name='chevron-right' style={styles.actionIndicator} color={themes[theme].fontDefault} size={24} />
</>
) : (
Expand Down
9 changes: 6 additions & 3 deletions app/i18n/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@
"Enable_Auto_Translate": "تمكين الترجمة التلقائية",
"Encrypted": "مشفر",
"Encrypted_message": "رسالة مشفرة",
"encrypted_room_description": "أدخل كلمة المرور الخاصة بالتشفير من طرف إلى طرف للوصول.",
"encrypted_room_title": "{{room_name}} مشفر",
"Encryption_error_desc": "تعذر قراءة مفتاح التشفير أثناء الاستيراد",
"Encryption_error_title": "كلمة المرور المشفرة خاطئة",
"End_to_end_encrypted_room": "غرفة مشفرة بين الطرفيات",
"Enter_Your_E2E_Password": "أدخل كلمة المرور بين الطرفيات",
"Enter_Your_Encryption_Password_desc1": "سيمكنك هذا من الوصول لرسائلك المباشرة والمجموعات الخاصة",
"Enter_Your_Encryption_Password_desc2": "يجب إدخال كلمة المرور لتشفير وفك تشفير الرسائل المرسلة",
"Enter_E2EE_Password": "أدخل كلمة المرور E2EE",
"Enter_E2EE_Password_description": "للوصول إلى قنواتك المشفرة والرسائل المباشرة، أدخل كلمة المرور الخاصة بالتشفير. هذا لا يتم تخزينه على الخادم، لذا ستحتاج إلى استخدامه على كل جهاز.",
"Error_uploading": "خطأ في الرفع",
"error-action-not-allowed": "غير مسموح بالإجراء {{action}}",
"error-avatar-invalid-url": "عنوان الصورة الرمزية غير صحيح: {{url}}",
Expand Down Expand Up @@ -245,6 +246,8 @@
"Message_starred": "الرسالة مميزة",
"Message_unstarred": "الرسالة غير مميزة",
"messages": "رسائل",
"missing_room_e2ee_description": "يجب تحديث مفاتيح التشفير للغرفة، ويجب أن يكون عضو آخر في الغرفة متصلاً بالإنترنت حتى يحدث ذلك.",
"missing_room_e2ee_title": "تحقق مرة أخرى بعد بضع لحظات",
"move": "حرك",
"Mute": "كتم",
"Mute_someone_in_room": "كتم صوت شخص ما في الغرفة",
Expand Down
9 changes: 6 additions & 3 deletions app/i18n/locales/bn-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,14 @@
"Enabled_E2E_Encryption_for_this_room": "এই রুমের জন্য E2E এনক্রিপশন সক্রিয় করা হয়েছে",
"Encrypted": "এনক্রিপ্টেড",
"Encrypted_message": "এনক্রিপ্টেড বার্তা",
"encrypted_room_description": "অ্যাক্সেস করতে আপনার এন্ড-টু-এন্ড এনক্রিপশন পাসওয়ার্ড লিখুন।",
"encrypted_room_title": "{{room_name}} এনক্রিপ্ট করা হয়েছে",
"Encryption_error_desc": "এনক্রিপশন কীটি আমদানি করার জন্য আপনার এনক্রিপশন কীটি ডিকোড করা হতে সম্ভব হয়নি।",
"Encryption_error_title": "আপনার এনক্রিপশন পাসওয়ার্ড ভুল মনে হচ্ছে",
"End_to_end_encrypted_room": "শেষ হতে শেষ এনক্রিপ্টেড রুম",
"Enter_E2EE_Password": "E2EE পাসওয়ার্ড দিন",
"Enter_E2EE_Password_description": "আপনার এনক্রিপ্টেড চ্যানেলগুলি এবং সরাসরি বার্তাগুলি অ্যাক্সেস করতে, আপনার এনক্রিপশন পাসওয়ার্ড লিখুন। এটি সার্ভারে সংরক্ষিত হয় না, তাই আপনাকে প্রতিটি ডিভাইসে এটি ব্যবহার করতে হবে।",
"Enter_workspace_URL": "ওয়ার্কস্পেস URL লিখুন",
"Enter_Your_E2E_Password": "আপনার E2E পাসওয়ার্ড দিন",
"Enter_Your_Encryption_Password_desc1": "এটি আপনাকে আপনার এনক্রিপ্টেড প্রাইভেট গ্রুপ এবং ডাইরেক্ট মেসেজে অ্যাক্সেস করতে অনুমতি দেবে।",
"Enter_Your_Encryption_Password_desc2": "আপনাকে বার্তা কোড/ডিকোড করতে প্রতিটি স্থানে এই পাসওয়ার্ডটি দিতে হবে যেখানে আপনি চ্যাট ব্যবহার করছেন।",
"Error_Download_file": "ফাইল ডাউনলোড করতে ত্রুটি",
"Error_uploading": "আপলোড করার সময় ত্রুটি",
"error-action-not-allowed": "{{action}} অনুমোদিত নয়",
Expand Down Expand Up @@ -391,6 +392,8 @@
"Message_unstarred": "বার্তা তারকা নয়",
"messages": "বার্তা",
"Missed_call": "মিস কল",
"missing_room_e2ee_description": "ঘরের জন্য এনক্রিপশন কীগুলি আপডেট করা প্রয়োজন, এর জন্য আরেকজন ঘরের সদস্যকে অনলাইনে থাকতে হবে।",
"missing_room_e2ee_title": "কয়েক মুহূর্তের মধ্যে পরীক্ষা করুন",
"Moderator": "মডারেটর",
"move": "মুভ করুন",
"Move_Channel_Paragraph": "একটি চ্যানেলটি একটি দলে চলেয়াও এড়াতে মানে এই চ্যানেলটি দলের সংদর্ভে যোগ হবে, তবে চ্যানেলটির সমস্ত সদস্য, যারা বিশেষ দলের সদস্য নয়, এই চ্যানেলে এখনও অ্যাক্সেস থাকবে, তবে তাদেরকে দলের সদস্য হিসেবে যোগ করা হবে না। \n\nচ্যানেলটির সমস্ত পরিচালনা এখনও এই চ্যানেলটির মালিকদের দ্বারা হয়ে যাবে।\n\nদলের সদস্য এবং হয়তো দলের মালিকরা, যদি এই চ্যানেলের সদস্য না হন, তাদের এই চ্যানেলের অবয়ব হতে পারবে না। \n\nদয়া করে মনে রাখবেন যে দলের মালিক সদস্যদের চ্যানেল থেকে সরাতে পারবেন।",
Expand Down
9 changes: 6 additions & 3 deletions app/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,14 @@
"Enabled_E2E_Encryption_for_this_room": "hat E2E-Verschlüsselung für diesen Raum aktiviert",
"Encrypted": "Verschlüsselt",
"Encrypted_message": "Verschlüsselte Nachricht",
"encrypted_room_description": "Geben Sie Ihr Passwort für die Ende-zu-Ende-Verschlüsselung ein, um Zugang zu erhalten.",
"encrypted_room_title": "{{room_name}} ist verschlüsselt",
"Encryption_error_desc": "Es war nicht möglich, Ihren Verschlüsselungs-Key zu importieren.",
"Encryption_error_title": "Ihr Verschlüsselungs-Passwort scheint falsch zu sein",
"End_to_end_encrypted_room": "Ende-zu-Ende-verschlüsselter Raum",
"Enter_E2EE_Password": "E2EE-Passwort eingeben",
"Enter_E2EE_Password_description": "Um auf Ihre verschlüsselten Kanäle und Direktnachrichten zuzugreifen, geben Sie Ihr Verschlüsselungspasswort ein. Dies wird nicht auf dem Server gespeichert, daher müssen Sie es auf jedem Gerät verwenden.",
"Enter_workspace_URL": "Arbeitsbereich-URL",
"Enter_Your_E2E_Password": "Geben Sie Ihr Ende-zu-Ende-Passwort ein",
"Enter_Your_Encryption_Password_desc1": "Das erlaubt Ihnen, auf Ihre verschlüsselten privaten Gruppen und Direktnachrichten zuzugreifen.",
"Enter_Your_Encryption_Password_desc2": "Sie müssen das Passwort zur Ver-/Entschlüsselung an jeder Stelle eingeben, an dem Sie diesen Chat verwenden.",
"Error_Download_file": "Fehler beim Herunterladen der Datei",
"Error_uploading": "Fehler beim Hochladen",
"error-action-not-allowed": "{{action}} ist nicht erlaubt",
Expand Down Expand Up @@ -382,6 +383,8 @@
"Message_starred": "Nachricht favorisiert",
"Message_unstarred": "Nachricht nicht mehr favorisiert",
"messages": "Nachrichten",
"missing_room_e2ee_description": "Die Verschlüsselungsschlüssel für den Raum müssen aktualisiert werden, ein anderer Raummitglied muss online sein, damit dies geschehen kann.",
"missing_room_e2ee_title": "Überprüfen Sie in ein paar Momenten zurück",
"Moderator": "Moderator",
"move": "verschieben",
"Move_Channel_Paragraph": "Das Verschieben eines Channels innerhalb eines Teams bedeutet, dass dieser Channel im Kontext des Teams hinzugefügt wird, jedoch haben alle Mitglieder des Channels, die nicht Mitglied des jeweiligen Teams sind, weiterhin Zugriff auf diesen Channel, werden aber nicht als Teammitglieder hinzugefügt \n\nDie gesamte Verwaltung des Channels wird weiterhin von den Eigentümern dieses Channels vorgenommen.\n\nTeammitglieder und sogar Teameigentümer, die nicht Mitglied dieses Channels sind, haben keinen Zugriff auf den Inhalt des Channels. \n\nBitte beachten Sie, dass der Besitzer des Teams in der Lage ist, Mitglieder aus dem Channel zu entfernen.",
Expand Down
17 changes: 14 additions & 3 deletions app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@
"Direct_message_someone": "Direct message someone",
"Direct_Messages": "Direct messages",
"Directory": "Directory",
"Disable": "Disable",
"Disable_encryption_description": "Disabling E2EE compromises privacy. You can re-enable it later if needed. Proceed with caution.",
"Disable_encryption_title": "Disable encryption",
"Disable_writing_in_room": "Disable writing in room",
"Disabled_E2E_Encryption_for_this_room": "disabled E2E encryption for this room",
"Discard": "Discard",
Expand Down Expand Up @@ -234,28 +237,34 @@
"E2E_How_It_Works_info2": "This is *end to end encryption* so the key to encode/decode your messages and they will not be saved on the workspace. For that reason *you need to store this password somewhere safe* which you can access later if you may need.",
"E2E_How_It_Works_info3": "If you proceed, it will be auto generated an E2E password.",
"E2E_How_It_Works_info4": "You can also setup a new password for your encryption key any time from any browser you have entered the existing E2E password.",
"e2ee_disabled": "End-to-end encryption is disabled",
"e2ee_enabled": "End-to-end encryption is enabled",
"Edit": "Edit",
"Edit_Invite": "Edit invite",
"Edit_Status": "Edit status",
"Email": "E-mail",
"Email_Notification_Mode_All": "Every mention/DM",
"Email_Notification_Mode_Disabled": "Disabled",
"Empty": "Empty",
"Enable": "Enable",
"Enable_Auto_Translate": "Enable auto-translate",
"Enable_encryption_description": "Ensure conversations are kept private",
"Enable_encryption_title": "Enable encryption",
"Enable_Message_Parser": "Enable message parser",
"Enable_writing_in_room": "Enable writing in room",
"Enabled_E2E_Encryption_for_this_room": "enabled E2E encryption for this room",
"Encrypted": "Encrypted",
"Encrypted_file": "Encrypted file",
"Encrypted_message": "Encrypted message",
"encrypted_room_description": "Enter your end-to-end encryption password to access.",
"encrypted_room_title": "{{room_name}} is encrypted",
"Encryption_error_desc": "It wasn't possible to decode your encryption key to be imported.",
"Encryption_error_title": "Your encryption password seems wrong",
"End_to_end_encrypted_room": "End to end encrypted room",
"Enter_E2EE_Password": "Enter E2EE password",
"Enter_E2EE_Password_description": "To access your encrypted channels and direct messages, enter your encryption password. This is not stored on the server, so you’ll need to use it on every device.",
"Enter_the_code": "Enter the code we just emailed you.",
"Enter_workspace_URL": "Enter workspace URL",
"Enter_Your_E2E_Password": "Enter your E2E password",
"Enter_Your_Encryption_Password_desc1": "This will allow you to access your encrypted private groups and direct messages.",
"Enter_Your_Encryption_Password_desc2": "You need to enter the password to encode/decode messages every place you use the chat.",
"Error_Download_file": "Error while downloading file",
"Error_uploading": "Error uploading",
"error-action-not-allowed": "{{action}} is not allowed",
Expand Down Expand Up @@ -430,6 +439,8 @@
"messages": "messages",
"Microphone_access_needed_to_record_audio": "Microphone access needed to record audio",
"Missed_call": "Missed call",
"missing_room_e2ee_description": "The encryption keys for the room need to be updated, another room member needs to be online for this to happen.",
"missing_room_e2ee_title": "Check back in a few moments",
"Moderator": "Moderator",
"move": "move",
"Move_Channel_Paragraph": "Moving a channel inside a team means that this channel will be added in the team’s context, however, all channel’s members, which are not members of the respective team, will still have access to this channel, but will not be added as team’s members. \n\nAll channel’s management will still be made by the owners of this channel.\n\nTeam’s members and even team’s owners, if not a member of this channel, can not have access to the channel’s content. \n\nPlease notice that the team’s owner will be able remove members from the channel.",
Expand Down
Loading

0 comments on commit 548ec96

Please sign in to comment.