From 02af0f030b7be29c0cb63383367e95011cc48df3 Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Tue, 10 Dec 2024 14:32:45 -0300 Subject: [PATCH] fix: updated margin, removed unused i18n translation and improved code --- app/i18n/locales/ar.json | 1 - app/i18n/locales/bn-IN.json | 1 - app/i18n/locales/cs.json | 1 - app/i18n/locales/de.json | 1 - app/i18n/locales/en.json | 1 - app/i18n/locales/es.json | 1 - app/i18n/locales/fi.json | 1 - app/i18n/locales/fr.json | 1 - app/i18n/locales/hi-IN.json | 1 - app/i18n/locales/hu.json | 1 - app/i18n/locales/it.json | 1 - app/i18n/locales/ja.json | 1 - app/i18n/locales/nl.json | 1 - app/i18n/locales/pt-BR.json | 1 - app/i18n/locales/pt-PT.json | 1 - app/i18n/locales/ru.json | 1 - app/i18n/locales/sl-SI.json | 1 - app/i18n/locales/sv.json | 1 - app/i18n/locales/ta-IN.json | 1 - app/i18n/locales/te-IN.json | 1 - app/i18n/locales/tr.json | 1 - app/i18n/locales/zh-CN.json | 1 - app/i18n/locales/zh-TW.json | 1 - app/views/StatusView/index.tsx | 22 +++++++++++----------- 24 files changed, 11 insertions(+), 34 deletions(-) diff --git a/app/i18n/locales/ar.json b/app/i18n/locales/ar.json index d7737e6375..52a042aec9 100644 --- a/app/i18n/locales/ar.json +++ b/app/i18n/locales/ar.json @@ -185,7 +185,6 @@ "Invalid_or_expired_invite_token": "رمز الدعوة غير صالح أو منتهي الصلاحية", "Invalid_server_version": "الخادم الذي تحاول الاتصال به يستخدم إصدارا لم يعد مدعوماً: {{currentVersion}}.\n\n النسخ المدعومة تبدأ من {{minVersion}}", "Invalid_workspace_URL": "عنوان URL لمساحة العمل غير صالح", - "Invisible": "غير مرئي", "Invite_Link": "رابط الدعوة", "Invite_user_to_join_channel": "دعوة مستخدم واحد إلى الانضمام إلى هذه القناة", "Invite_user_to_join_channel_all_from": "دعوة جميع المستخدمين من [‎#channel] إلى الانضمام إلى هذه القناة", diff --git a/app/i18n/locales/bn-IN.json b/app/i18n/locales/bn-IN.json index 05a8b97690..4e52b56584 100644 --- a/app/i18n/locales/bn-IN.json +++ b/app/i18n/locales/bn-IN.json @@ -303,7 +303,6 @@ "Invalid_or_expired_invite_token": "অকার্যকর বা মেয়াদ উত্তীর্ণ ইনভাইট টোকেন", "Invalid_server_version": "আপনি যাচাই করতে চেষ্টা করছেন তার একটি সংস্করণ ব্যবহার করছেন যা এখনও অ্যাপ দ্বারা সাপোর্ট করা হয়নি: {{currentVersion}}।\n\nআমরা সংস্করণ {{minVersion}} প্রয়োজন প্রয়োজন", "Invalid_workspace_URL": "অবৈধ ওয়ার্কস্পেস URL", - "Invisible": "অদৃশ্য", "Invite_Link": "আমন্ত্রণ লিঙ্ক", "Invite_users": "ব্যবহারকারীদের আমন্ত্রণ করুন", "IP": "IP", diff --git a/app/i18n/locales/cs.json b/app/i18n/locales/cs.json index b146ea912d..b93c4c3ac7 100644 --- a/app/i18n/locales/cs.json +++ b/app/i18n/locales/cs.json @@ -327,7 +327,6 @@ "Invalid_or_expired_invite_token": "Neplatný nebo vypršela platnost tokenu pozvánky", "Invalid_server_version": "Pracovní prostor, který se pokoušíte připojit, používá verzi, která již není aplikací podporována: {{currentVersion}}.\n\nPožadujeme verzi {{minVersion}}", "Invalid_workspace_URL": "Neplatná URL adresa pracovního prostoru", - "Invisible": "Neviditelný", "Invite_Link": "Odkaz na pozvánku", "Invite_user_to_join_channel": "Pozvat jednoho uživatele, aby se připojil k tomuto kanálu", "Invite_user_to_join_channel_all_from": "Pozvat všechny uživatele z [#channel], aby se připojili k tomuto kanálu", diff --git a/app/i18n/locales/de.json b/app/i18n/locales/de.json index e982bc4a95..b044ed5693 100644 --- a/app/i18n/locales/de.json +++ b/app/i18n/locales/de.json @@ -296,7 +296,6 @@ "Invalid_or_expired_invite_token": "Ungültiger oder abgelaufener Einladungscode", "Invalid_server_version": "Der Server, mit dem Sie sich verbinden möchten, verwendet eine Version, die von der App nicht mehr unterstützt wird: {{currentVersion}}.\n\nWir benötigen Version {{minVersion}}.", "Invalid_workspace_URL": "Ungültige Arbeitsbereichs-URL", - "Invisible": "Unsichtbar", "Invite_Link": "Einladungs-Link", "Invite_user_to_join_channel": "Benutzer in diesen Channel einladen", "Invite_user_to_join_channel_all_from": "Alle Benutzer des Channels [#channel] einladen, diesem Channel zu folgen", diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index a7ca7c2d07..393f99f4f5 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -344,7 +344,6 @@ "Invalid_or_expired_invite_token": "Invalid or expired invite token", "Invalid_server_version": "The workspace you're trying to connect is using a version that's not supported by the app anymore: {{currentVersion}}.\n\nWe require version {{minVersion}}", "Invalid_workspace_URL": "Invalid workspace URL", - "Invisible": "Invisible", "Invite_Link": "Invite link", "Invite_user_to_join_channel": "Invite one user to join this channel", "Invite_user_to_join_channel_all_from": "Invite all users from [#channel] to join this channel", diff --git a/app/i18n/locales/es.json b/app/i18n/locales/es.json index efebea7d26..b046dda275 100644 --- a/app/i18n/locales/es.json +++ b/app/i18n/locales/es.json @@ -124,7 +124,6 @@ "In_App_and_Desktop_Alert_info": "Muestra un banner en la parte superior de la pantalla cuando la aplicación esté abierta y muestra una notificación en el escritorio", "Invalid_server_version": "El servidor que intentas conectar está usando una versión que ya no está soportada por la aplicación : {{currentVersion}}. Se requiere una versión {{minVersion}}.", "Invalid_workspace_URL": "URL del espacio de trabajo no válida", - "Invisible": "Invisible", "Invite_user_to_join_channel": "Invitar a un usuario a unirse a este canal", "Invite_user_to_join_channel_all_from": "Invitar a todos los usuarios de [#channell] a que se unan a este canal", "Invite_user_to_join_channel_all_to": "Invitar a todos los usuarios de este canal a unirse a [#channel]", diff --git a/app/i18n/locales/fi.json b/app/i18n/locales/fi.json index f790899ef2..354b684c49 100644 --- a/app/i18n/locales/fi.json +++ b/app/i18n/locales/fi.json @@ -278,7 +278,6 @@ "Invalid_or_expired_invite_token": "Virheellinen tai vanhentunut kutsutunnus", "Invalid_server_version": "Palvelin, johon yrität muodostaa yhteyttä, käyttää versiota, jota sovellus ei enää tue: {{currentVersion}}.\n\nEdellytämme versiota {{minVersion}}", "Invalid_workspace_URL": "Virheellinen työtilan URL-osoite", - "Invisible": "Näkymätön", "Invite_Link": "Kutsulinkki", "Invite_user_to_join_channel": "Kutsu käyttäjä liittymään tälle kanavalle", "Invite_user_to_join_channel_all_from": "Kutsu kaikki käyttäjät kanavalta [#channel] liittymään tälle kanavalle", diff --git a/app/i18n/locales/fr.json b/app/i18n/locales/fr.json index 0dd86a7d0d..3c5016f2ce 100644 --- a/app/i18n/locales/fr.json +++ b/app/i18n/locales/fr.json @@ -242,7 +242,6 @@ "Invalid_or_expired_invite_token": "Jeton d'invitation non valide ou expiré", "Invalid_server_version": "Le serveur auquel vous essayez de vous connecter utilise une version qui n'est plus prise en charge par l'application : {{currentVersion}}.\n\nNous exigeons la version {{minVersion}}", "Invalid_workspace_URL": "URL d’espace de travail invalide", - "Invisible": "Invisible", "Invite_Link": "Lien d'invitation", "Invite_user_to_join_channel": "Inviter un utilisateur à rejoindre le canal", "Invite_user_to_join_channel_all_from": "Inviter tous les utilisateurs de [#channel] à rejoindre ce canal", diff --git a/app/i18n/locales/hi-IN.json b/app/i18n/locales/hi-IN.json index e3bb050324..dc4875edf1 100644 --- a/app/i18n/locales/hi-IN.json +++ b/app/i18n/locales/hi-IN.json @@ -303,7 +303,6 @@ "Invalid_or_expired_invite_token": "अमान्य या समाप्त होने वाला निमंत्रण टोकन", "Invalid_server_version": "यह कार्यस्थान जिससे आप कनेक्ट करने का प्रयास कर रहे हैं, वह ऐप द्वारा अब समर्थित नहीं है: {{currentVersion}}।\n\nहमें {{minVersion}} संस्करण की आवश्यकता है", "Invalid_workspace_URL": "अमान्य कार्यक्षेत्र URL", - "Invisible": "अदृश्य", "Invite_Link": "निमंत्रण लिंक", "Invite_users": "उपयोगकर्ताओं को निमंत्रित करें", "IP": "आईपी", diff --git a/app/i18n/locales/hu.json b/app/i18n/locales/hu.json index 8da73c81ce..35e6dc7687 100644 --- a/app/i18n/locales/hu.json +++ b/app/i18n/locales/hu.json @@ -303,7 +303,6 @@ "Invalid_or_expired_invite_token": "Érvénytelen vagy lejárt meghívási token", "Invalid_server_version": "A munkaterület, amelyhez csatlakozni próbál, olyan verziót használ, amelyet az alkalmazás már nem támogat: {{currentVersion}}. \n\nA {{minVersion}} verzióra van szükségünk", "Invalid_workspace_URL": "Érvénytelen munkaterület URL", - "Invisible": "Láthatatlan", "Invite_Link": "Meghívási hivatkozás", "Invite_users": "Felhasználók meghívása", "IP": "IP-cím", diff --git a/app/i18n/locales/it.json b/app/i18n/locales/it.json index d0daedc937..0e2e90b0aa 100644 --- a/app/i18n/locales/it.json +++ b/app/i18n/locales/it.json @@ -214,7 +214,6 @@ "Invalid_or_expired_invite_token": "Token di invito non valido o scaduto", "Invalid_server_version": "Il server a cui stai cercando di connetterti sta utilizzando una versione non più supportata dall'app: {{currentVersion}}.\n\nVersione minima richiesta: {{minVersion}}", "Invalid_workspace_URL": "URL dello spazio di lavoro non valido", - "Invisible": "Invisibile", "Invite_Link": "Link di invito", "Invite_user_to_join_channel": "Invita un utente ad entrare in questo canale", "Invite_user_to_join_channel_all_from": "Invita tutti gli utenti da [#channell] per unirsi a questo canale", diff --git a/app/i18n/locales/ja.json b/app/i18n/locales/ja.json index 0066136880..75d6b8ab06 100644 --- a/app/i18n/locales/ja.json +++ b/app/i18n/locales/ja.json @@ -186,7 +186,6 @@ "Invalid_or_expired_invite_token": "招待トークンが無効か、期限が切れています", "Invalid_server_version": "接続しようとしているサーバーのバージョン({{currentVersion}})はサポートされていません。\n\nサポートする最低バージョンは {{minVersion}} です", "Invalid_workspace_URL": "無効なワークスペースのURL", - "Invisible": "状態を隠す", "Invite_Link": "招待リンク", "Invite_user_to_join_channel": "1ユーザーをこのチャネルに招待", "Invite_user_to_join_channel_all_from": "[#channel]のすべてのユーザーをこのチャネルに招待", diff --git a/app/i18n/locales/nl.json b/app/i18n/locales/nl.json index c50cd93760..be28da60f3 100644 --- a/app/i18n/locales/nl.json +++ b/app/i18n/locales/nl.json @@ -242,7 +242,6 @@ "Invalid_or_expired_invite_token": "Ongeldige of verlopen uitnodigingstoken", "Invalid_server_version": "De server waarmee je probeert te verbinden, gebruikt een versie die niet meer door de app wordt ondersteund: {{currentVersion}}.\n\nWe hebben versie {{minVersion}} nodig", "Invalid_workspace_URL": "Ongeldige werkruimte-URL", - "Invisible": "Onzichtbaar", "Invite_Link": "Uitnodigingslink", "Invite_user_to_join_channel": "Nodig een gebruiker uit om lid te worden van dit kanaal", "Invite_user_to_join_channel_all_from": "Nodig alle gebruikers van [#kanaal] uit om lid te worden van dit kanaal", diff --git a/app/i18n/locales/pt-BR.json b/app/i18n/locales/pt-BR.json index 7c19061709..20c14b61c4 100644 --- a/app/i18n/locales/pt-BR.json +++ b/app/i18n/locales/pt-BR.json @@ -337,7 +337,6 @@ "Invalid_or_expired_invite_token": "Token de convite inválido ou vencido", "Invalid_server_version": "O servidor que você está conectando não é suportado mais por esta versão do aplicativo: {{currentVersion}}.\n\nEsta versão do aplicativo requer a versão {{minVersion}} da workspace para funcionar corretamente.", "Invalid_workspace_URL": "URL de workspace inválida", - "Invisible": "Invisível", "Invite_Link": "Link de convite", "Invite_user_to_join_channel": "Convidar um usuário para ingressar neste canal", "Invite_user_to_join_channel_all_from": "Convidar todos os usuários de [#channel] para ingressar neste canal", diff --git a/app/i18n/locales/pt-PT.json b/app/i18n/locales/pt-PT.json index c621bb0397..1901be246e 100644 --- a/app/i18n/locales/pt-PT.json +++ b/app/i18n/locales/pt-PT.json @@ -181,7 +181,6 @@ "Invalid_or_expired_invite_token": "Token de convite invalido ou expirado", "Invalid_server_version": "O servidor ao qual esta tentando ligar-se, utiliza uma versão que não é suporta pela aplicação: {{currentVersion}}.\n\nA versão mínima requerida é {{minVersion}}", "Invalid_workspace_URL": "URL de espaço de trabalho inválida", - "Invisible": "Invisível", "Invite_Link": "Link de convite", "Invite_user_to_join_channel": "Convidar um utilizador para juntar-se a este canal", "Invite_user_to_join_channel_all_from": "Convide todos os utilizadores de [#channel] a participar deste canal", diff --git a/app/i18n/locales/ru.json b/app/i18n/locales/ru.json index 8ee8836595..fa4bae9990 100644 --- a/app/i18n/locales/ru.json +++ b/app/i18n/locales/ru.json @@ -268,7 +268,6 @@ "Invalid_or_expired_invite_token": "Токен приглашения не действителен или с истекшим сроком действия", "Invalid_server_version": "Сервер, к которому вы пытаетесь подключиться, использует версию, которая больше не поддерживается приложением: {{currentVersion}}.\n\nНам нужна версия {{minVersion}}", "Invalid_workspace_URL": "Недействительный URL рабочего пространства", - "Invisible": "Невидимый", "Invite_Link": "Ссылка Приглашения", "Invite_user_to_join_channel": "Пригласить пользователя в канал", "Invite_user_to_join_channel_all_from": "Пригласить всех пользователей из [#channel] присоединиться к этому каналу", diff --git a/app/i18n/locales/sl-SI.json b/app/i18n/locales/sl-SI.json index 79f5418090..de38f19c1a 100644 --- a/app/i18n/locales/sl-SI.json +++ b/app/i18n/locales/sl-SI.json @@ -252,7 +252,6 @@ "Invalid_or_expired_invite_token": "Neveljaven ali iztekel žeton povabila", "Invalid_server_version": "Strežnik, ki ga poskušate povezati, uporablja različico, ki je aplikacija ne podpira več: {{currentVersion}}.\n\nZahtevamo različico {{minVersion}}", "Invalid_workspace_URL": "Neveljaven URL delovnega prostora", - "Invisible": "Neviden", "Invite_Link": "Povezava povabila", "Invite_user_to_join_channel": "Povabi uporabnika, da se pridruži kanalu", "Invite_user_to_join_channel_all_from": "Povabi vse uporabnike iz [#channel], da se pridružijo kanalu", diff --git a/app/i18n/locales/sv.json b/app/i18n/locales/sv.json index f3071025c4..74b7d4f06b 100644 --- a/app/i18n/locales/sv.json +++ b/app/i18n/locales/sv.json @@ -277,7 +277,6 @@ "Invalid_or_expired_invite_token": "Ogiltig eller utgången inbjudningstoken", "Invalid_server_version": "Den server du försöker ansluta till använder en version som appen inte har stöd för längre: {{currentVersion}}.\n\nDu måste ha version {{minVersion}}", "Invalid_workspace_URL": "Ogiltig arbetsytas URL", - "Invisible": "Dold", "Invite_Link": "Inbjudningslänk", "Invite_user_to_join_channel": "Bjud in en användare till att ansluta till denna kanal.", "Invite_user_to_join_channel_all_from": "Bjud in alla användare från [#kanalen] för att gå med i den här kanalen", diff --git a/app/i18n/locales/ta-IN.json b/app/i18n/locales/ta-IN.json index 75c3fe05c2..3e9e5a52a2 100644 --- a/app/i18n/locales/ta-IN.json +++ b/app/i18n/locales/ta-IN.json @@ -303,7 +303,6 @@ "Invalid_or_expired_invite_token": "தவறான அல்லது காலாவதி அழைப்பு டோக்கன்", "Invalid_server_version": "நீங்கள் இணைக்க முயற்சிக்கின்றீர்கள் பயன்பாட்டை ஆதரிக்காத பதிப்புக்கு உள்ள வெளிப்புற படைப்புக்கு உபயோகிக்கிற பேனல்: {{currentVersion}}.\n\nஎங்களுக்கு பதிப்பு தேவைப்படுகின்றது {{minVersion}}", "Invalid_workspace_URL": "தவறான வேலைத்தள URL", - "Invisible": "தெரியாதது", "Invite_Link": "அழைப்பு இணைப்பு", "Invite_users": "பயனர்களை அழை", "IP": "IP", diff --git a/app/i18n/locales/te-IN.json b/app/i18n/locales/te-IN.json index 2d5908ac9b..4fe2b60ee6 100644 --- a/app/i18n/locales/te-IN.json +++ b/app/i18n/locales/te-IN.json @@ -303,7 +303,6 @@ "Invalid_or_expired_invite_token": "అమాయక లేదా అవధిచుక్తాయిన అమర్పు టోకెన్", "Invalid_server_version": "మీరు కనెక్ట్ చేయడానికి ప్రయాసిస్తున్న వర్క్‌స్పేస్ యొక్క ఒక అవసరం లేదు: {{currentVersion}}.\n\nమేము వినియోగించే అప్లికేషన్ యొక్క ఆవశ్యకానికి అయితే మేము అవసరం ఉన్న సంస్కరణం: {{minVersion}}", "Invalid_workspace_URL": "చెల్లని వర్క్‌స్పేస్ URL", - "Invisible": "కనిపించదు", "Invite_Link": "ఆమంత్రణ లింక్", "Invite_users": "వాడికి ఆమంత్రణం పంపండి", "IP": "IP", diff --git a/app/i18n/locales/tr.json b/app/i18n/locales/tr.json index 73ee5e5ad5..d5e3267542 100644 --- a/app/i18n/locales/tr.json +++ b/app/i18n/locales/tr.json @@ -200,7 +200,6 @@ "Invalid_or_expired_invite_token": "Geçersiz veya süresi dolmuş davet belirteci (token)", "Invalid_server_version": "Bağlanmaya çalıştığınız sunucu artık uygulama tarafından desteklenmeyen bir sürüm kullanıyor: {{currentVersion}}.\n\n{{minVersion}} sürümüne ihtiyacımız var", "Invalid_workspace_URL": "Geçersiz çalışma alanı URL'si", - "Invisible": "Görünmez", "Invite_Link": "Davet Bağlantısı", "Invite_user_to_join_channel": "Bu kanala katılması için bir kullanıcı davet", "Invite_user_to_join_channel_all_from": "[#kanal] 'daki tüm kullanıcıları bu kanala katılmaya davet et", diff --git a/app/i18n/locales/zh-CN.json b/app/i18n/locales/zh-CN.json index 0c8d65a929..1307389e7b 100644 --- a/app/i18n/locales/zh-CN.json +++ b/app/i18n/locales/zh-CN.json @@ -192,7 +192,6 @@ "Invalid_or_expired_invite_token": "无效或到期的邀请 token", "Invalid_server_version": "此 App 版本已不支援您正在连线之服务器版本。当前版本: {{currentVersion}}.\\n\\n最低版本要求: {{minVersion}}", "Invalid_workspace_URL": "无效的工作区 URL", - "Invisible": "隐身", "Invite_Link": "邀请链接", "Invite_users": "邀请用戶", "IP": "IP", diff --git a/app/i18n/locales/zh-TW.json b/app/i18n/locales/zh-TW.json index 1e88808dad..175bafc2ac 100644 --- a/app/i18n/locales/zh-TW.json +++ b/app/i18n/locales/zh-TW.json @@ -202,7 +202,6 @@ "Invalid_or_expired_invite_token": "無效或到期的邀請 token", "Invalid_server_version": "此 App 版本已不支援您正在連線之伺服器版本。當前版本: {{currentVersion}}.\\n\\n最低版本要求: {{minVersion}}", "Invalid_workspace_URL": "無效的工作區 URL", - "Invisible": "隱身", "Invite_Link": "邀請連結", "Invite_user_to_join_channel": "邀請使用者加入此頻道", "Invite_user_to_join_channel_all_from": "邀請[#channel]中的所有使用者加入此頻道", diff --git a/app/views/StatusView/index.tsx b/app/views/StatusView/index.tsx index 6083bc4b95..496ced8946 100644 --- a/app/views/StatusView/index.tsx +++ b/app/views/StatusView/index.tsx @@ -47,7 +47,7 @@ const STATUS: IStatus[] = [ const styles = StyleSheet.create({ inputContainer: { - paddingHorizontal: 12, + paddingHorizontal: 16, marginTop: 24, marginBottom: 12 }, @@ -58,7 +58,7 @@ const styles = StyleSheet.create({ }, footerComponent: { marginTop: 36, - paddingHorizontal: 12 + paddingHorizontal: 16 } }); @@ -75,7 +75,7 @@ const Status = ({ return ( <> { const key = `STATUS_${statusType.id.toUpperCase()}` as keyof typeof events; @@ -146,16 +146,16 @@ const StatusView = (): React.ReactElement => { const statusType = Accounts_AllowInvisibleStatusOption ? STATUS : STATUS.filter(s => s.id !== 'offline'); + const isStatusMatching = () => { + const isStatusEqual = status === user.status; + const isStatusTextEqual = (!!user.statusText && user.statusText === statusText) || (!user.statusText && !statusText); + + return isStatusEqual && isStatusTextEqual; + }; + const FooterComponent = () => ( -