Skip to content

Commit

Permalink
chore: added fetchImageFromUrl on i18n and started visual changes
Browse files Browse the repository at this point in the history
  • Loading branch information
OtavioStasiak committed Nov 4, 2024
1 parent b8f9873 commit ca9779b
Show file tree
Hide file tree
Showing 28 changed files with 47 additions and 11 deletions.
7 changes: 4 additions & 3 deletions app/containers/TextInput/FormTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import sharedStyles from '../../views/Styles';
import ActivityIndicator from '../ActivityIndicator';
import { CustomIcon, TIconsName } from '../CustomIcon';
import { TextInput } from './TextInput';
import { themes } from '../../lib/constants';

const styles = StyleSheet.create({
error: {
Expand All @@ -20,7 +21,7 @@ const styles = StyleSheet.create({
},
label: {
fontSize: 16,
lineHeight: 22,
lineHeight: 24,
...sharedStyles.textMedium
},
input: {
Expand Down Expand Up @@ -85,7 +86,7 @@ export const FormTextInput = ({
placeholder,
...inputProps
}: IRCTextInputProps): React.ReactElement => {
const { colors } = useTheme();
const { colors, theme } = useTheme();
const [showPassword, setShowPassword] = useState(false);
const showClearInput = onClearInput && value && value.length > 0;
const Input = bottomSheet ? BottomSheetTextInput : TextInput;
Expand All @@ -105,7 +106,7 @@ export const FormTextInput = ({
(secureTextEntry || iconRight || showClearInput) && styles.inputIconRight,
{
backgroundColor: colors.surfaceRoom,
borderColor: colors.strokeLight,
borderColor: themes[theme].strokeMedium,
color: colors.fontTitlesLabels
},
error?.error && {
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
"Everyone_can_access_this_team": "يمكن للجميع الوصول إلى هذا الفريق",
"Expiration_Days": "انتهاء (أيام)",
"Favorites": "مفضلات",
"Fetch_image_from_URL": "جلب الصورة من الرابط",
"File_description": "وصف الملف",
"Files": "ملفات",
"Finish_recording": "إنهاء التسجيل",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/bn-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
"Expanded": "বিস্তৃত",
"Expiration_Days": "মেয়াদ শেষ (দিন)",
"Favorites": "প্রিয়সমূহ",
"Fetch_image_from_URL": "URL থেকে ছবি আনুন",
"File_description": "ফাইল বর্ণনা",
"Files": "ফাইলসমূহ",
"FileUpload_Error": "ফাইল আপলোড ত্রুটি",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@
"Expanded": "Rozšířený",
"Expiration_Days": "Vypršení platnosti (dny)",
"Favorites": "Oblíbené",
"Fetch_image_from_URL": "Načíst obrázek z URL",
"File_description": "Popis souboru",
"Files": "Soubory",
"FileUpload_Error": "Chyba nahrávání souboru",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
"Expanded": "Erweitert",
"Expiration_Days": "läuft ab (Tage)",
"Favorites": "Favoriten",
"Fetch_image_from_URL": "Bild von URL abrufen",
"File_description": "Dateibeschreibung",
"Files": "Dateien",
"FileUpload_Error": "Fehler bei Datei-Upload",
Expand Down
3 changes: 2 additions & 1 deletion app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@
"Expanded": "Expanded",
"Expiration_Days": "Expiration (days)",
"Favorites": "Favorites",
"Fetch_image_from_URL": "Fetch image from URL",
"File_description": "File description",
"Files": "Files",
"FileUpload_Error": "File upload error",
Expand Down Expand Up @@ -330,7 +331,7 @@
"I_Saved_My_E2E_Password": "I saved my E2E password",
"Ignore": "Ignore",
"Image": "Image",
"Images_uploaded": "Images uploaded",
"Images_uploaded": "Uploaded Images",
"In_app": "In-app",
"In_App_And_Desktop": "In-app and desktop",
"In_App_and_Desktop_Alert_info": "Displays a banner at the top of the screen when app is open, and displays a notification on desktop",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"error-you-are-last-owner": "Eres el único propietario existente. Debes establecer un nuevo propietario antes de abandonar la sala.",
"Everyone_can_access_this_channel": "Todos los usuarios pueden acceder a este canal",
"Favorites": "Favoritos",
"Fetch_image_from_URL": "Obtener imagen desde URL",
"File_description": "Descripción del archivo",
"Files": "Archivos",
"Finish_recording": "Finalizar grabación",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
"Expanded": "Laajennettu",
"Expiration_Days": "Vanheneminen (päivää)",
"Favorites": "Suosikit",
"Fetch_image_from_URL": "Hae kuva URL-osoitteesta",
"File_description": "Tiedoston kuvaus",
"Files": "Tiedostot",
"FileUpload_Error": "Tiedoston latausvirhe",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@
"Expanded": "Etendu",
"Expiration_Days": "Expiration (Jours)",
"Favorites": "Favoris",
"Fetch_image_from_URL": "Récupérer l'image depuis l'URL",
"File_description": "Description du fichier",
"Files": "Fichiers",
"Finish_recording": "Terminer l'enregistrement",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/hi-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
"Expanded": "विस्तारित",
"Expiration_Days": "समाप्ति (दिन)",
"Favorites": "पसंदीदा",
"Fetch_image_from_URL": "URL से छवि प्राप्त करें",
"File_description": "फ़ाइल विवरण",
"Files": "फ़ाइलें",
"FileUpload_Error": "फ़ाइल अपलोड त्रुटि",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
"Expanded": "Kibővített",
"Expiration_Days": "Lejárat (napokban)",
"Favorites": "Kedvencek",
"Fetch_image_from_URL": "Kép betöltése az URL-ről",
"File_description": "Fájl leírás",
"Files": "Fájlok",
"FileUpload_Error": "Fájlfeltöltési hiba",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"Everyone_can_access_this_team": "Tutti hanno accesso a questo team",
"Expiration_Days": "Scadenza (giorni)",
"Favorites": "Preferiti",
"Fetch_image_from_URL": "Recupera immagine da URL",
"File_description": "Descrizione file",
"Files": "File",
"Finish_recording": "Termina registrazione",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
"Everyone_can_access_this_team": "全員このチームにアクセスできます",
"Expiration_Days": "期限切れ (日)",
"Favorites": "お気に入り",
"Fetch_image_from_URL": "URLから画像を取得する",
"File_description": "ファイルの説明",
"Files": "ファイル",
"Finish_recording": "録音停止",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@
"Expanded": "Uitgebreid",
"Expiration_Days": "Vervaldatum (Dagen)",
"Favorites": "Favorieten",
"Fetch_image_from_URL": "Afbeelding ophalen van URL",
"File_description": "Bestandsbeschrijving",
"Files": "Bestanden",
"Finish_recording": "Opname beëindigen",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@
"Expanded": "Estendido",
"Expiration_Days": "Expira em (dias)",
"Favorites": "Favoritos",
"Fetch_image_from_URL": "Obter imagem da URL",
"File_description": "Descrição do arquivo",
"Files": "Arquivos",
"FileUpload_Error": "Erro de upload de arquivo",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
"Everyone_can_access_this_team": "Todos podem aceder a esta equipa",
"Expiration_Days": "Validade (Dias)",
"Favorites": "Favoritos",
"Fetch_image_from_URL": "Pesquisar imagem do URL",
"File_description": "Descrição do ficheiro",
"Files": "Ficheiros",
"Finish_recording": "Terminar a gravação",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
"Expanded": "Расширенный",
"Expiration_Days": "Срок действия (Дни)",
"Favorites": "Избранное",
"Fetch_image_from_URL": "получить изображение по URL",
"File_description": "Описание файла",
"Files": "Файлы",
"Finish_recording": "Завершить запись",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/sl-SI.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
"Expanded": "Razširjen",
"Expiration_Days": "Iztek (dnevi)",
"Favorites": "Priljubljeno",
"Fetch_image_from_URL": "Pridobi sliko iz URL",
"File_description": "Opis datoteke",
"Files": "Datoteke",
"Finish_recording": "Zaključek snemanja",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
"Expanded": "Expanderade",
"Expiration_Days": "Förfallotid (dagar)",
"Favorites": "Favoriter",
"Fetch_image_from_URL": "Hämta bild från URL",
"File_description": "Filbeskrivning",
"Files": "Filer",
"Finish_recording": "Avsluta inspelningen",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/ta-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
"Expanded": "பரப்பியது",
"Expiration_Days": "காலாவதி (நாட்கள்)",
"Favorites": "பிடித்தவை",
"Fetch_image_from_URL": "URL இலிருந்து படத்தைப் பெறவும்",
"File_description": "கோப்பு விளக்கம்",
"Files": "கோப்புகள்",
"FileUpload_Error": "கோப்பு பதிவேற்று பிழை",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/te-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
"Expanded": "విస్తృతం",
"Expiration_Days": "కాలాంతరం (రోజులు)",
"Favorites": "ఇష్టాలు",
"Fetch_image_from_URL": "URL నుండి చిత్రాన్ని పొందండి",
"File_description": "పిలుస్తూనే వివరణ",
"Files": "పిలుస్తూనే",
"FileUpload_Error": "ఫైల్ అప్లోడ్ లోపం",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
"Everyone_can_access_this_channel": "Bu kanala herkes erişebilir",
"Expiration_Days": "Geçerlilik Süresi (Gün)",
"Favorites": "Favoriler",
"Fetch_image_from_URL": "URL'den resim al",
"File_description": "Dosya açıklaması",
"Files": "Dosyalar",
"Finish_recording": "Kaydı bitir",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
"Everyone_can_access_this_channel": "每个人都可以访问此频道",
"Expiration_Days": "到期 (日)",
"Favorites": "收藏",
"Fetch_image_from_URL": "从URL获取图片",
"File_description": "文件描述",
"Files": "文件",
"Finish_recording": "完成录制",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
"Everyone_can_access_this_team": "所有人皆可存取此團隊",
"Expiration_Days": "到期 (日)",
"Favorites": "我的最愛",
"Fetch_image_from_URL": "從URL獲取圖片",
"File_description": "檔案描述",
"Files": "檔案",
"Finish_recording": "完成錄製",
Expand Down
2 changes: 1 addition & 1 deletion app/views/ChangeAvatarView/AvatarSuggestionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
marginRight: 20,
marginBottom: 12,

borderRadius: 4
}
});
Expand Down
1 change: 0 additions & 1 deletion app/views/ChangeAvatarView/AvatarUrl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const AvatarUrl = ({ submit }: { submit: (value: string) => void }) => {
return (
<FormTextInput
label={I18n.t('Avatar_Url')}
placeholder={I18n.t('insert_Avatar_URL')}
onChangeText={handleChangeText}
testID='change-avatar-view-avatar-url'
containerStyle={{ marginBottom: 0 }}
Expand Down
13 changes: 12 additions & 1 deletion app/views/ChangeAvatarView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const ChangeAvatarView = () => {
<StatusBar />
<SafeAreaView testID='change-avatar-view'>
<ScrollView
contentContainerStyle={sharedStyles.containerScrollView}
contentContainerStyle={{ ...sharedStyles.containerScrollView, paddingTop: 32 }}
testID='change-avatar-view-list'
{...scrollPersistTaps}>
<View style={styles.avatarContainer} testID='change-avatar-view-avatar'>
Expand Down Expand Up @@ -206,6 +206,17 @@ const ChangeAvatarView = () => {
}
/>
) : null}

<Button
title={I18n.t('Fetch_image_from_URL')}
type='secondary'
disabled={saving}
backgroundColor={colors.buttonBackgroundSecondaryDefault}
onPress={() => pickImage(true)}
testID='change-avatar-view-take-a-photo'
style={{ marginTop: 36 }}
/>

<List.Separator style={styles.separator} />
{context === 'profile' ? (
<AvatarSuggestion
Expand Down
10 changes: 6 additions & 4 deletions app/views/ChangeAvatarView/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ export default StyleSheet.create({
avatarContainer: {
alignItems: 'center',
justifyContent: 'center',
marginBottom: 24
marginBottom: 16
},
separator: {
marginVertical: 16
},
itemLabel: {
marginBottom: 12,
fontSize: 14,
...sharedStyles.textSemibold
fontSize: 16,
lineHeight: 24,
...sharedStyles.textMedium
},
containerImagesUploaded: {
flex: 1
flex: 1,
marginBottom: 36
},
containerAvatarSuggestion: {
flex: 1,
Expand Down

0 comments on commit ca9779b

Please sign in to comment.