i18n, disable headers, #roomname
This commit is contained in:
parent
033215081e
commit
dd704814f9
|
@ -74,6 +74,7 @@ interface IRoomHeader {
|
||||||
onPress: Function;
|
onPress: Function;
|
||||||
testID?: string;
|
testID?: string;
|
||||||
sourceType?: IOmnichannelSource;
|
sourceType?: IOmnichannelSource;
|
||||||
|
disabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SubTitle = React.memo(({ usersTyping, subtitle, renderFunc, scale }: TRoomHeaderSubTitle) => {
|
const SubTitle = React.memo(({ usersTyping, subtitle, renderFunc, scale }: TRoomHeaderSubTitle) => {
|
||||||
|
@ -139,7 +140,8 @@ const Header = React.memo(
|
||||||
teamMain,
|
teamMain,
|
||||||
testID,
|
testID,
|
||||||
usersTyping = [],
|
usersTyping = [],
|
||||||
sourceType
|
sourceType,
|
||||||
|
disabled
|
||||||
}: IRoomHeader) => {
|
}: IRoomHeader) => {
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
const portrait = height > width;
|
const portrait = height > width;
|
||||||
|
@ -177,8 +179,13 @@ const Header = React.memo(
|
||||||
testID='room-header'
|
testID='room-header'
|
||||||
accessibilityLabel={title}
|
accessibilityLabel={title}
|
||||||
onPress={handleOnPress}
|
onPress={handleOnPress}
|
||||||
style={styles.container}
|
style={[
|
||||||
disabled={!!tmid}
|
styles.container,
|
||||||
|
{
|
||||||
|
opacity: disabled ? 0.5 : 1
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
disabled={disabled}
|
||||||
hitSlop={HIT_SLOP}
|
hitSlop={HIT_SLOP}
|
||||||
>
|
>
|
||||||
<View style={styles.titleContainer}>
|
<View style={styles.titleContainer}>
|
||||||
|
|
|
@ -20,6 +20,7 @@ interface IRoomHeaderContainerProps {
|
||||||
testID?: string;
|
testID?: string;
|
||||||
sourceType?: IOmnichannelSource;
|
sourceType?: IOmnichannelSource;
|
||||||
visitor?: IVisitor;
|
visitor?: IVisitor;
|
||||||
|
disabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const RoomHeaderContainer = React.memo(
|
const RoomHeaderContainer = React.memo(
|
||||||
|
@ -36,7 +37,8 @@ const RoomHeaderContainer = React.memo(
|
||||||
tmid,
|
tmid,
|
||||||
type,
|
type,
|
||||||
sourceType,
|
sourceType,
|
||||||
visitor
|
visitor,
|
||||||
|
disabled
|
||||||
}: IRoomHeaderContainerProps) => {
|
}: IRoomHeaderContainerProps) => {
|
||||||
let subtitle: string | undefined;
|
let subtitle: string | undefined;
|
||||||
let statusVisitor: TUserStatus | undefined;
|
let statusVisitor: TUserStatus | undefined;
|
||||||
|
@ -86,6 +88,7 @@ const RoomHeaderContainer = React.memo(
|
||||||
testID={testID}
|
testID={testID}
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
sourceType={sourceType}
|
sourceType={sourceType}
|
||||||
|
disabled={disabled}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,7 @@
|
||||||
"you": "أنت",
|
"you": "أنت",
|
||||||
"you_were_mentioned": "تمت الإشارة إليك",
|
"you_were_mentioned": "تمت الإشارة إليك",
|
||||||
"missing_room_e2ee_description": "يجب تحديث مفاتيح التشفير للغرفة، ويجب أن يكون عضو آخر في الغرفة متصلاً بالإنترنت حتى يحدث ذلك.",
|
"missing_room_e2ee_description": "يجب تحديث مفاتيح التشفير للغرفة، ويجب أن يكون عضو آخر في الغرفة متصلاً بالإنترنت حتى يحدث ذلك.",
|
||||||
"missing_room_e2ee_title": "تحقق مرة أخرى بعد بضع لحظات"
|
"missing_room_e2ee_title": "تحقق مرة أخرى بعد بضع لحظات",
|
||||||
|
"encrypted_room_description": "أدخل كلمة المرور الخاصة بالتشفير من طرف إلى طرف للوصول.",
|
||||||
|
"encrypted_room_title": "{{room_name}} مشفر"
|
||||||
}
|
}
|
|
@ -757,5 +757,7 @@
|
||||||
"you": "তুমি",
|
"you": "তুমি",
|
||||||
"you_were_mentioned": "আপনি উল্লেখ করা হয়েছিলেন",
|
"you_were_mentioned": "আপনি উল্লেখ করা হয়েছিলেন",
|
||||||
"missing_room_e2ee_description": "ঘরের জন্য এনক্রিপশন কীগুলি আপডেট করা প্রয়োজন, এর জন্য আরেকজন ঘরের সদস্যকে অনলাইনে থাকতে হবে।",
|
"missing_room_e2ee_description": "ঘরের জন্য এনক্রিপশন কীগুলি আপডেট করা প্রয়োজন, এর জন্য আরেকজন ঘরের সদস্যকে অনলাইনে থাকতে হবে।",
|
||||||
"missing_room_e2ee_title": "কয়েক মুহূর্তের মধ্যে পরীক্ষা করুন"
|
"missing_room_e2ee_title": "কয়েক মুহূর্তের মধ্যে পরীক্ষা করুন",
|
||||||
|
"encrypted_room_description": "অ্যাক্সেস করতে আপনার এন্ড-টু-এন্ড এনক্রিপশন পাসওয়ার্ড লিখুন।",
|
||||||
|
"encrypted_room_title": "{{room_name}} এনক্রিপ্ট করা হয়েছে"
|
||||||
}
|
}
|
|
@ -747,5 +747,7 @@
|
||||||
"you": "Sie",
|
"you": "Sie",
|
||||||
"you_were_mentioned": "Sie wurden erwähnt",
|
"you_were_mentioned": "Sie wurden erwähnt",
|
||||||
"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_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"
|
"missing_room_e2ee_title": "Überprüfen Sie in ein paar Momenten zurück",
|
||||||
|
"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"
|
||||||
}
|
}
|
|
@ -773,7 +773,7 @@
|
||||||
"e2ee_disabled": "End-to-end encryption is disabled",
|
"e2ee_disabled": "End-to-end encryption is disabled",
|
||||||
"e2ee_enabled": "End-to-end encryption is enabled",
|
"e2ee_enabled": "End-to-end encryption is enabled",
|
||||||
"encrypted_room_description": "Enter your end-to-end encryption password to access.",
|
"encrypted_room_description": "Enter your end-to-end encryption password to access.",
|
||||||
"encrypted_room_title": "This room is encrypted",
|
"encrypted_room_title": "{{room_name}} is encrypted",
|
||||||
"error-action-not-allowed": "{{action}} is not allowed",
|
"error-action-not-allowed": "{{action}} is not allowed",
|
||||||
"error-avatar-invalid-url": "Invalid avatar URL: {{url}}",
|
"error-avatar-invalid-url": "Invalid avatar URL: {{url}}",
|
||||||
"error-duplicate-channel-name": "A channel with name {{room_name}} exists",
|
"error-duplicate-channel-name": "A channel with name {{room_name}} exists",
|
||||||
|
|
|
@ -719,5 +719,7 @@
|
||||||
"you": "sinä",
|
"you": "sinä",
|
||||||
"you_were_mentioned": "sinut mainittiin",
|
"you_were_mentioned": "sinut mainittiin",
|
||||||
"missing_room_e2ee_description": "Huoneen salausavaimet on päivitettävä, toisen huoneen jäsenen on oltava verkossa, jotta tämä voi tapahtua.",
|
"missing_room_e2ee_description": "Huoneen salausavaimet on päivitettävä, toisen huoneen jäsenen on oltava verkossa, jotta tämä voi tapahtua.",
|
||||||
"missing_room_e2ee_title": "Tarkista uudelleen muutaman hetken kuluttua"
|
"missing_room_e2ee_title": "Tarkista uudelleen muutaman hetken kuluttua",
|
||||||
|
"encrypted_room_description": "Syötä päästä päähän -salauksen salasanasi päästäksesi käsiksi.",
|
||||||
|
"encrypted_room_title": "{{room_name}} on salattu"
|
||||||
}
|
}
|
|
@ -638,5 +638,7 @@
|
||||||
"you": "vous",
|
"you": "vous",
|
||||||
"you_were_mentioned": "vous avez été mentionné",
|
"you_were_mentioned": "vous avez été mentionné",
|
||||||
"missing_room_e2ee_description": "Les clés de chiffrement de la pièce doivent être mises à jour, un autre membre de la pièce doit être en ligne pour que cela se produise.",
|
"missing_room_e2ee_description": "Les clés de chiffrement de la pièce doivent être mises à jour, un autre membre de la pièce doit être en ligne pour que cela se produise.",
|
||||||
"missing_room_e2ee_title": "Revenez dans quelques instants"
|
"missing_room_e2ee_title": "Revenez dans quelques instants",
|
||||||
|
"encrypted_room_description": "Entrez votre mot de passe de cryptage de bout en bout pour accéder.",
|
||||||
|
"encrypted_room_title": "{{room_name}} est crypté"
|
||||||
}
|
}
|
|
@ -757,5 +757,7 @@
|
||||||
"you": "आप",
|
"you": "आप",
|
||||||
"you_were_mentioned": "आपका उल्लेख किया गया था",
|
"you_were_mentioned": "आपका उल्लेख किया गया था",
|
||||||
"missing_room_e2ee_description": "कमरे के लिए एन्क्रिप्शन कुंजियों को अपडेट किया जाना चाहिए, इसके लिए एक और कमरे के सदस्य को ऑनलाइन होना चाहिए।",
|
"missing_room_e2ee_description": "कमरे के लिए एन्क्रिप्शन कुंजियों को अपडेट किया जाना चाहिए, इसके लिए एक और कमरे के सदस्य को ऑनलाइन होना चाहिए।",
|
||||||
"missing_room_e2ee_title": "कुछ क्षणों में वापस जाँच करें"
|
"missing_room_e2ee_title": "कुछ क्षणों में वापस जाँच करें",
|
||||||
|
"encrypted_room_description": "पहुँचने के लिए अपना एंड-टू-एंड एन्क्रिप्शन पासवर्ड दर्ज करें।",
|
||||||
|
"encrypted_room_title": "{{room_name}} एन्क्रिप्टेड है"
|
||||||
}
|
}
|
|
@ -760,5 +760,7 @@
|
||||||
"you": "ön",
|
"you": "ön",
|
||||||
"you_were_mentioned": "önt megemlítették",
|
"you_were_mentioned": "önt megemlítették",
|
||||||
"missing_room_e2ee_description": "A szoba titkosítási kulcsait frissíteni kell, ehhez egy másik szobatagnak online kell lennie.",
|
"missing_room_e2ee_description": "A szoba titkosítási kulcsait frissíteni kell, ehhez egy másik szobatagnak online kell lennie.",
|
||||||
"missing_room_e2ee_title": "Nézzen vissza néhány perc múlva"
|
"missing_room_e2ee_title": "Nézzen vissza néhány perc múlva",
|
||||||
|
"encrypted_room_description": "Adja meg a végponttól végpontig terjedő titkosítási jelszavát a hozzáféréshez.",
|
||||||
|
"encrypted_room_title": "{{room_name}} titkosítva van"
|
||||||
}
|
}
|
|
@ -541,5 +541,7 @@
|
||||||
"you": "tu",
|
"you": "tu",
|
||||||
"you_were_mentioned": "sei stato menzionato",
|
"you_were_mentioned": "sei stato menzionato",
|
||||||
"missing_room_e2ee_description": "Le chiavi di crittografia per la stanza devono essere aggiornate, un altro membro della stanza deve essere online affinché ciò avvenga.",
|
"missing_room_e2ee_description": "Le chiavi di crittografia per la stanza devono essere aggiornate, un altro membro della stanza deve essere online affinché ciò avvenga.",
|
||||||
"missing_room_e2ee_title": "Ricontrolla tra qualche istante"
|
"missing_room_e2ee_title": "Ricontrolla tra qualche istante",
|
||||||
|
"encrypted_room_description": "Inserisci la tua password di crittografia end-to-end per accedere.",
|
||||||
|
"encrypted_room_title": "{{room_name}} è criptato"
|
||||||
}
|
}
|
|
@ -407,5 +407,7 @@
|
||||||
"you": "あなた",
|
"you": "あなた",
|
||||||
"you_were_mentioned": "あなたがメンションしました",
|
"you_were_mentioned": "あなたがメンションしました",
|
||||||
"missing_room_e2ee_description": "部屋の暗号化キーを更新する必要があります。これが行われるためには、別の部屋のメンバーがオンラインである必要があります。",
|
"missing_room_e2ee_description": "部屋の暗号化キーを更新する必要があります。これが行われるためには、別の部屋のメンバーがオンラインである必要があります。",
|
||||||
"missing_room_e2ee_title": "数分後にもう一度確認してください"
|
"missing_room_e2ee_title": "数分後にもう一度確認してください",
|
||||||
|
"encrypted_room_description": "エンドツーエンドの暗号化パスワードを入力してアクセスしてください。",
|
||||||
|
"encrypted_room_title": "{{room_name}}は暗号化されています"
|
||||||
}
|
}
|
|
@ -638,5 +638,7 @@
|
||||||
"you": "jij",
|
"you": "jij",
|
||||||
"you_were_mentioned": "je bent vermeld",
|
"you_were_mentioned": "je bent vermeld",
|
||||||
"missing_room_e2ee_description": "De versleutelingssleutels voor de kamer moeten worden bijgewerkt, een ander kamerlid moet online zijn om dit te laten gebeuren.",
|
"missing_room_e2ee_description": "De versleutelingssleutels voor de kamer moeten worden bijgewerkt, een ander kamerlid moet online zijn om dit te laten gebeuren.",
|
||||||
"missing_room_e2ee_title": "Kom over een paar momenten terug"
|
"missing_room_e2ee_title": "Kom over een paar momenten terug",
|
||||||
|
"encrypted_room_description": "Voer uw end-to-end encryptiewachtwoord in om toegang te krijgen.",
|
||||||
|
"encrypted_room_title": "{{room_name}} is versleuteld"
|
||||||
}
|
}
|
|
@ -824,5 +824,7 @@
|
||||||
"you": "você",
|
"you": "você",
|
||||||
"you_were_mentioned": "você foi mencionado",
|
"you_were_mentioned": "você foi mencionado",
|
||||||
"missing_room_e2ee_description": "As chaves de criptografia da sala precisam ser atualizadas, outro membro da sala precisa estar online para que isso aconteça.",
|
"missing_room_e2ee_description": "As chaves de criptografia da sala precisam ser atualizadas, outro membro da sala precisa estar online para que isso aconteça.",
|
||||||
"missing_room_e2ee_title": "Verifique novamente em alguns momentos"
|
"missing_room_e2ee_title": "Verifique novamente em alguns momentos",
|
||||||
|
"encrypted_room_description": "Insira sua senha de criptografia de ponta a ponta para acessar.",
|
||||||
|
"encrypted_room_title": "{{room_name}} está criptografado"
|
||||||
}
|
}
|
|
@ -369,5 +369,7 @@
|
||||||
"you": "você",
|
"you": "você",
|
||||||
"you_were_mentioned": "você foi mencionado",
|
"you_were_mentioned": "você foi mencionado",
|
||||||
"missing_room_e2ee_description": "As chaves de criptografia da sala precisam ser atualizadas, outro membro da sala precisa estar online para que isso aconteça.",
|
"missing_room_e2ee_description": "As chaves de criptografia da sala precisam ser atualizadas, outro membro da sala precisa estar online para que isso aconteça.",
|
||||||
"missing_room_e2ee_title": "Volte a verificar daqui a alguns momentos"
|
"missing_room_e2ee_title": "Volte a verificar daqui a alguns momentos",
|
||||||
|
"encrypted_room_description": "Insira a sua palavra-passe de encriptação de ponta a ponta para aceder.",
|
||||||
|
"encrypted_room_title": "{{room_name}} está encriptado"
|
||||||
}
|
}
|
|
@ -687,5 +687,7 @@
|
||||||
"you": "вы",
|
"you": "вы",
|
||||||
"you_were_mentioned": "вы были упомянуты",
|
"you_were_mentioned": "вы были упомянуты",
|
||||||
"missing_room_e2ee_description": "Ключи шифрования для комнаты должны быть обновлены, другой участник комнаты должен быть в сети, чтобы это произошло.",
|
"missing_room_e2ee_description": "Ключи шифрования для комнаты должны быть обновлены, другой участник комнаты должен быть в сети, чтобы это произошло.",
|
||||||
"missing_room_e2ee_title": "Проверьте еще раз через несколько моментов"
|
"missing_room_e2ee_title": "Проверьте еще раз через несколько моментов",
|
||||||
|
"encrypted_room_description": "Введите свой пароль для шифрования от конца к концу для доступа.",
|
||||||
|
"encrypted_room_title": "{{room_name}} зашифрован"
|
||||||
}
|
}
|
|
@ -653,5 +653,7 @@
|
||||||
"you": "ti",
|
"you": "ti",
|
||||||
"you_were_mentioned": "Bili ste omenjeni",
|
"you_were_mentioned": "Bili ste omenjeni",
|
||||||
"missing_room_e2ee_description": "Ključi za šifriranje sobe morajo biti posodobljeni, drugi član sobe mora biti na spletu, da se to zgodi.",
|
"missing_room_e2ee_description": "Ključi za šifriranje sobe morajo biti posodobljeni, drugi član sobe mora biti na spletu, da se to zgodi.",
|
||||||
"missing_room_e2ee_title": "Ponovno preverite čez nekaj trenutkov"
|
"missing_room_e2ee_title": "Ponovno preverite čez nekaj trenutkov",
|
||||||
|
"encrypted_room_description": "Vnesite geslo za šifriranje od konca do konca za dostop.",
|
||||||
|
"encrypted_room_title": "{{room_name}} je šifriran"
|
||||||
}
|
}
|
|
@ -717,5 +717,7 @@
|
||||||
"you": "du",
|
"you": "du",
|
||||||
"you_were_mentioned": "du nämndes",
|
"you_were_mentioned": "du nämndes",
|
||||||
"missing_room_e2ee_description": "Krypteringsnycklarna för rummet behöver uppdateras, en annan rummedlem måste vara online för att detta ska hända.",
|
"missing_room_e2ee_description": "Krypteringsnycklarna för rummet behöver uppdateras, en annan rummedlem måste vara online för att detta ska hända.",
|
||||||
"missing_room_e2ee_title": "Kontrollera igen om några ögonblick"
|
"missing_room_e2ee_title": "Kontrollera igen om några ögonblick",
|
||||||
|
"encrypted_room_description": "Ange ditt lösenord för end-to-end-kryptering för att få tillgång.",
|
||||||
|
"encrypted_room_title": "{{room_name}} är krypterat"
|
||||||
}
|
}
|
|
@ -757,5 +757,7 @@
|
||||||
"you": "நீங்கள்",
|
"you": "நீங்கள்",
|
||||||
"you_were_mentioned": "உங்களுக்கு குறிக்கப்பட்டார்",
|
"you_were_mentioned": "உங்களுக்கு குறிக்கப்பட்டார்",
|
||||||
"missing_room_e2ee_description": "அறைக்கான குறியாக்க விசைகள் புதுப்பிக்கப்பட வேண்டும், இது நடக்க மற்றொரு அறை உறுப்பினர் ஆன்லைனில் இருக்க வேண்டும்.",
|
"missing_room_e2ee_description": "அறைக்கான குறியாக்க விசைகள் புதுப்பிக்கப்பட வேண்டும், இது நடக்க மற்றொரு அறை உறுப்பினர் ஆன்லைனில் இருக்க வேண்டும்.",
|
||||||
"missing_room_e2ee_title": "சில நிமிடங்களில் மீண்டும் சரிபார்க்கவும்"
|
"missing_room_e2ee_title": "சில நிமிடங்களில் மீண்டும் சரிபார்க்கவும்",
|
||||||
|
"encrypted_room_description": "அணுகலுக்கு உங்கள் முடிவுக்கு முடிவு குறியாக்க கடவுச்சொல்லை உள்ளிடவும்.",
|
||||||
|
"encrypted_room_title": "{{room_name}} குறியாக்கப்பட்டுள்ளது"
|
||||||
}
|
}
|
|
@ -757,5 +757,7 @@
|
||||||
"you": "మీరు",
|
"you": "మీరు",
|
||||||
"you_were_mentioned": "మీరు పేర్కొనబడింది",
|
"you_were_mentioned": "మీరు పేర్కొనబడింది",
|
||||||
"missing_room_e2ee_description": "గది కోసం ఎన్క్రిప్షన్ కీలు నవీకరించబడాలి, దీని జరగాలంటే మరొక గది సభ్యుడు ఆన్లైన్లో ఉండాలి.",
|
"missing_room_e2ee_description": "గది కోసం ఎన్క్రిప్షన్ కీలు నవీకరించబడాలి, దీని జరగాలంటే మరొక గది సభ్యుడు ఆన్లైన్లో ఉండాలి.",
|
||||||
"missing_room_e2ee_title": "కొన్ని క్షణాల్లో తిరిగి తనిఖీ చేయండి"
|
"missing_room_e2ee_title": "కొన్ని క్షణాల్లో తిరిగి తనిఖీ చేయండి",
|
||||||
|
"encrypted_room_description": "ప్రాప్యతకు మీ అంతిమ నుండి అంతిమ ఎన్క్రిప్షన్ పాస్వర్డ్ను నమోదు చేయండి.",
|
||||||
|
"encrypted_room_title": "{{room_name}} ఎన్క్రిప్ట్ చేయబడింది"
|
||||||
}
|
}
|
|
@ -524,5 +524,7 @@
|
||||||
"you": "siz",
|
"you": "siz",
|
||||||
"you_were_mentioned": "senden bahsedildi",
|
"you_were_mentioned": "senden bahsedildi",
|
||||||
"missing_room_e2ee_description": "Odanın şifreleme anahtarları güncellenmelidir, bunun gerçekleşmesi için başka bir oda üyesinin çevrimiçi olması gerekmektedir.",
|
"missing_room_e2ee_description": "Odanın şifreleme anahtarları güncellenmelidir, bunun gerçekleşmesi için başka bir oda üyesinin çevrimiçi olması gerekmektedir.",
|
||||||
"missing_room_e2ee_title": "Birkaç an içinde tekrar kontrol edin"
|
"missing_room_e2ee_title": "Birkaç an içinde tekrar kontrol edin",
|
||||||
|
"encrypted_room_description": "Erişmek için uçtan uca şifreleme şifrenizi girin.",
|
||||||
|
"encrypted_room_title": "{{room_name}} şifrelenmiştir"
|
||||||
}
|
}
|
|
@ -482,5 +482,7 @@
|
||||||
"you": "你",
|
"you": "你",
|
||||||
"you_were_mentioned": "你被提到了",
|
"you_were_mentioned": "你被提到了",
|
||||||
"missing_room_e2ee_description": "房间的加密密钥需要更新,另一位房间成员需要在线才能进行此操作。",
|
"missing_room_e2ee_description": "房间的加密密钥需要更新,另一位房间成员需要在线才能进行此操作。",
|
||||||
"missing_room_e2ee_title": "过几分钟再回来检查"
|
"missing_room_e2ee_title": "过几分钟再回来检查",
|
||||||
|
"encrypted_room_description": "输入您的端到端加密密码以访问。",
|
||||||
|
"encrypted_room_title": "{{room_name}} 已加密"
|
||||||
}
|
}
|
|
@ -511,5 +511,7 @@
|
||||||
"you": "你",
|
"you": "你",
|
||||||
"you_were_mentioned": "你被提到了",
|
"you_were_mentioned": "你被提到了",
|
||||||
"missing_room_e2ee_description": "房間的加密密鑰需要更新,另一位房間成員需要在線才能進行此操作。",
|
"missing_room_e2ee_description": "房間的加密密鑰需要更新,另一位房間成員需要在線才能進行此操作。",
|
||||||
"missing_room_e2ee_title": "過幾分鐘再回來檢查"
|
"missing_room_e2ee_title": "過幾分鐘再回來檢查",
|
||||||
|
"encrypted_room_description": "輸入您的端對端加密密碼以存取。",
|
||||||
|
"encrypted_room_title": "{{room_name}} 已加密"
|
||||||
}
|
}
|
|
@ -48,6 +48,7 @@ interface IRightButtonsProps extends Pick<ISubscription, 't'> {
|
||||||
colors?: TColors;
|
colors?: TColors;
|
||||||
issuesWithNotifications: boolean;
|
issuesWithNotifications: boolean;
|
||||||
notificationsDisabled?: boolean;
|
notificationsDisabled?: boolean;
|
||||||
|
disabled: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IRigthButtonsState {
|
interface IRigthButtonsState {
|
||||||
|
@ -361,13 +362,18 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { isFollowingThread, tunread, tunreadUser, tunreadGroup } = this.state;
|
const { isFollowingThread, tunread, tunreadUser, tunreadGroup } = this.state;
|
||||||
const { t, tmid, threadsEnabled, rid, colors, issuesWithNotifications, notificationsDisabled } = this.props;
|
const { t, tmid, threadsEnabled, rid, colors, issuesWithNotifications, notificationsDisabled, disabled } = this.props;
|
||||||
|
|
||||||
if (t === 'l') {
|
if (t === 'l') {
|
||||||
if (!this.isOmnichannelPreview()) {
|
if (!this.isOmnichannelPreview()) {
|
||||||
return (
|
return (
|
||||||
<HeaderButton.Container>
|
<HeaderButton.Container>
|
||||||
<HeaderButton.Item iconName='kebab' onPress={this.showMoreActions} testID='room-view-header-omnichannel-kebab' />
|
<HeaderButton.Item
|
||||||
|
iconName='kebab'
|
||||||
|
onPress={this.showMoreActions}
|
||||||
|
testID='room-view-header-omnichannel-kebab'
|
||||||
|
disabled={disabled}
|
||||||
|
/>
|
||||||
</HeaderButton.Container>
|
</HeaderButton.Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -380,6 +386,7 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
|
||||||
iconName={isFollowingThread ? 'notification' : 'notification-disabled'}
|
iconName={isFollowingThread ? 'notification' : 'notification-disabled'}
|
||||||
onPress={this.toggleFollowThread}
|
onPress={this.toggleFollowThread}
|
||||||
testID={isFollowingThread ? 'room-view-header-unfollow' : 'room-view-header-follow'}
|
testID={isFollowingThread ? 'room-view-header-unfollow' : 'room-view-header-follow'}
|
||||||
|
disabled={disabled}
|
||||||
/>
|
/>
|
||||||
</HeaderButton.Container>
|
</HeaderButton.Container>
|
||||||
);
|
);
|
||||||
|
@ -392,18 +399,20 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
|
||||||
iconName='notification-disabled'
|
iconName='notification-disabled'
|
||||||
onPress={this.navigateToNotificationOrPushTroubleshoot}
|
onPress={this.navigateToNotificationOrPushTroubleshoot}
|
||||||
testID='room-view-push-troubleshoot'
|
testID='room-view-push-troubleshoot'
|
||||||
|
disabled={disabled}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
{rid ? <HeaderCallButton rid={rid} /> : null}
|
{rid ? <HeaderCallButton rid={rid} disabled={disabled} /> : null}
|
||||||
{threadsEnabled ? (
|
{threadsEnabled ? (
|
||||||
<HeaderButton.Item
|
<HeaderButton.Item
|
||||||
iconName='threads'
|
iconName='threads'
|
||||||
onPress={this.goThreadsView}
|
onPress={this.goThreadsView}
|
||||||
testID='room-view-header-threads'
|
testID='room-view-header-threads'
|
||||||
badge={() => <HeaderButton.BadgeUnread tunread={tunread} tunreadUser={tunreadUser} tunreadGroup={tunreadGroup} />}
|
badge={() => <HeaderButton.BadgeUnread tunread={tunread} tunreadUser={tunreadUser} tunreadGroup={tunreadGroup} />}
|
||||||
|
disabled={disabled}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
<HeaderButton.Item iconName='search' onPress={this.goSearchView} testID='room-view-search' />
|
<HeaderButton.Item iconName='search' onPress={this.goSearchView} testID='room-view-search' disabled={disabled} />
|
||||||
</HeaderButton.Container>
|
</HeaderButton.Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,16 @@ import Button from '../../../containers/Button';
|
||||||
import sharedStyles from '../../Styles';
|
import sharedStyles from '../../Styles';
|
||||||
import { useAppSelector } from '../../../lib/hooks';
|
import { useAppSelector } from '../../../lib/hooks';
|
||||||
import I18n from '../../../i18n';
|
import I18n from '../../../i18n';
|
||||||
|
import { TNavigation } from '../../../stacks/stackType';
|
||||||
|
|
||||||
const GAP = 32;
|
const GAP = 32;
|
||||||
|
|
||||||
export const EncryptedRoom = ({
|
export const EncryptedRoom = ({
|
||||||
|
roomName,
|
||||||
navigation
|
navigation
|
||||||
}: {
|
}: {
|
||||||
navigation: StackNavigationProp<ChatsStackParamList, 'RoomView'>;
|
roomName: string;
|
||||||
|
navigation: StackNavigationProp<ChatsStackParamList & TNavigation, 'RoomView'>;
|
||||||
}): ReactElement => {
|
}): ReactElement => {
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
const styles = useStyle();
|
const styles = useStyle();
|
||||||
|
@ -36,7 +39,7 @@ export const EncryptedRoom = ({
|
||||||
<View style={styles.icon}>
|
<View style={styles.icon}>
|
||||||
<CustomIcon name='encrypted' size={42} color={colors.fontSecondaryInfo} />
|
<CustomIcon name='encrypted' size={42} color={colors.fontSecondaryInfo} />
|
||||||
</View>
|
</View>
|
||||||
<Text style={styles.title}>{I18n.t('encrypted_room_title')}</Text>
|
<Text style={styles.title}>{I18n.t('encrypted_room_title', { room_name: `#${roomName}` })}</Text>
|
||||||
<Text style={styles.description}>{I18n.t('encrypted_room_description')}</Text>
|
<Text style={styles.description}>{I18n.t('encrypted_room_description')}</Text>
|
||||||
</View>
|
</View>
|
||||||
<Button title={I18n.t('Enter_E2EE_Password')} onPress={navigate} />
|
<Button title={I18n.t('Enter_E2EE_Password')} onPress={navigate} />
|
||||||
|
|
|
@ -3,13 +3,13 @@ import React from 'react';
|
||||||
import * as HeaderButton from '../../../containers/HeaderButton';
|
import * as HeaderButton from '../../../containers/HeaderButton';
|
||||||
import { useVideoConf } from '../../../lib/hooks/useVideoConf';
|
import { useVideoConf } from '../../../lib/hooks/useVideoConf';
|
||||||
|
|
||||||
export const HeaderCallButton = ({ rid }: { rid: string }): React.ReactElement | null => {
|
export const HeaderCallButton = ({ rid, disabled }: { rid: string; disabled: boolean }): React.ReactElement | null => {
|
||||||
const { showInitCallActionSheet, callEnabled, disabledTooltip } = useVideoConf(rid);
|
const { showInitCallActionSheet, callEnabled, disabledTooltip } = useVideoConf(rid);
|
||||||
|
|
||||||
if (callEnabled)
|
if (callEnabled)
|
||||||
return (
|
return (
|
||||||
<HeaderButton.Item
|
<HeaderButton.Item
|
||||||
disabled={disabledTooltip}
|
disabled={disabledTooltip || disabled}
|
||||||
iconName='phone'
|
iconName='phone'
|
||||||
onPress={showInitCallActionSheet}
|
onPress={showInitCallActionSheet}
|
||||||
testID='room-view-header-call'
|
testID='room-view-header-call'
|
||||||
|
|
|
@ -15,11 +15,13 @@ export const MissingRoomE2EEKey = (): ReactElement => {
|
||||||
return (
|
return (
|
||||||
<View style={styles.root}>
|
<View style={styles.root}>
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<View style={styles.icon}>
|
<View style={styles.textView}>
|
||||||
<CustomIcon name='clock' size={42} color={colors.fontSecondaryInfo} />
|
<View style={styles.icon}>
|
||||||
|
<CustomIcon name='clock' size={42} color={colors.fontSecondaryInfo} />
|
||||||
|
</View>
|
||||||
|
<Text style={styles.title}>{I18n.t('missing_room_e2ee_title')}</Text>
|
||||||
|
<Text style={styles.description}>{I18n.t('missing_room_e2ee_description')}</Text>
|
||||||
</View>
|
</View>
|
||||||
<Text style={styles.title}>{I18n.t('missing_room_e2ee_title')}</Text>
|
|
||||||
<Text style={styles.description}>{I18n.t('missing_room_e2ee_description')}</Text>
|
|
||||||
<Button
|
<Button
|
||||||
title={I18n.t('Learn_more')}
|
title={I18n.t('Learn_more')}
|
||||||
type='secondary'
|
type='secondary'
|
||||||
|
@ -41,9 +43,9 @@ const useStyle = () => {
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
marginHorizontal: 24,
|
marginHorizontal: 24,
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center'
|
justifyContent: 'center'
|
||||||
},
|
},
|
||||||
|
textView: { alignItems: 'center' },
|
||||||
icon: {
|
icon: {
|
||||||
width: 58,
|
width: 58,
|
||||||
height: 58,
|
height: 58,
|
||||||
|
|
|
@ -414,6 +414,18 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
|
||||||
return hideSystemMessages ?? [];
|
return hideSystemMessages ?? [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get missingRoomE2EEKey() {
|
||||||
|
const { room } = this.state;
|
||||||
|
const { encryptionEnabled } = this.props;
|
||||||
|
return (encryptionEnabled && 'encrypted' in room && room.encrypted && 'E2EKey' in room && !room.E2EKey) ?? false;
|
||||||
|
}
|
||||||
|
|
||||||
|
get e2eeDisabledEncryptedRoom() {
|
||||||
|
const { room } = this.state;
|
||||||
|
const { encryptionEnabled } = this.props;
|
||||||
|
return (!encryptionEnabled && 'encrypted' in room && room.encrypted) ?? false;
|
||||||
|
}
|
||||||
|
|
||||||
setHeader = () => {
|
setHeader = () => {
|
||||||
const { room, unreadsCount, roomUserId, joined, canForwardGuest, canReturnQueue, canPlaceLivechatOnHold } = this.state;
|
const { room, unreadsCount, roomUserId, joined, canForwardGuest, canReturnQueue, canPlaceLivechatOnHold } = this.state;
|
||||||
const { navigation, isMasterDetail, theme, baseUrl, user, route } = this.props;
|
const { navigation, isMasterDetail, theme, baseUrl, user, route } = this.props;
|
||||||
|
@ -501,6 +513,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
|
||||||
onPress={this.goRoomActionsView}
|
onPress={this.goRoomActionsView}
|
||||||
testID={`room-view-title-${title}`}
|
testID={`room-view-title-${title}`}
|
||||||
sourceType={sourceType}
|
sourceType={sourceType}
|
||||||
|
disabled={this.missingRoomE2EEKey || this.e2eeDisabledEncryptedRoom || !!tmid}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
headerRight: () => (
|
headerRight: () => (
|
||||||
|
@ -518,6 +531,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
|
||||||
showActionSheet={this.showActionSheet}
|
showActionSheet={this.showActionSheet}
|
||||||
departmentId={departmentId}
|
departmentId={departmentId}
|
||||||
notificationsDisabled={iSubRoom?.disableNotifications}
|
notificationsDisabled={iSubRoom?.disableNotifications}
|
||||||
|
disabled={this.missingRoomE2EEKey || this.e2eeDisabledEncryptedRoom}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
@ -1446,7 +1460,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
|
||||||
render() {
|
render() {
|
||||||
console.count(`${this.constructor.name}.render calls`);
|
console.count(`${this.constructor.name}.render calls`);
|
||||||
const { room, loading, action, selectedMessages } = this.state;
|
const { room, loading, action, selectedMessages } = this.state;
|
||||||
const { user, baseUrl, theme, width, serverVersion, encryptionEnabled, navigation } = this.props;
|
const { user, baseUrl, theme, width, serverVersion, navigation } = this.props;
|
||||||
const { rid, t } = room;
|
const { rid, t } = room;
|
||||||
let bannerClosed;
|
let bannerClosed;
|
||||||
let announcement;
|
let announcement;
|
||||||
|
@ -1455,13 +1469,13 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Missing room encryption key
|
// Missing room encryption key
|
||||||
if (encryptionEnabled && 'encrypted' in room && room.encrypted && 'E2EKey' in room && !room.E2EKey) {
|
if (this.missingRoomE2EEKey) {
|
||||||
return <MissingRoomE2EEKey />;
|
return <MissingRoomE2EEKey />;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Encrypted room, but user session is not encrypted
|
// Encrypted room, but user session is not encrypted
|
||||||
if (!encryptionEnabled && 'encrypted' in room && room.encrypted) {
|
if (this.e2eeDisabledEncryptedRoom) {
|
||||||
return <EncryptedRoom navigation={navigation} />;
|
return <EncryptedRoom navigation={navigation} roomName={getRoomTitle(room)} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue