diff --git a/src/components/EditPicture.tsx b/src/components/EditPicture.tsx index 3400d3d..e1dbd6a 100644 --- a/src/components/EditPicture.tsx +++ b/src/components/EditPicture.tsx @@ -144,6 +144,7 @@ export const EditPicture = ({ allowsEditing: true, aspect: [1, 1], quality: 0.5, + base64: true, exif: false, }); @@ -153,10 +154,11 @@ export const EditPicture = ({ if (!asset) { throw new Error("Failed to get image asset"); } - const filename = `${domain}-${+Date.now()}.jpg`; + const image = asset.uri.startsWith("data:image") ? asset.uri : asset.base64 || undefined; + if (!image) { throw new Error("Failed to get image"); } diff --git a/src/locales/en/messages.po b/src/locales/en/messages.po index 4d367a9..e280dbc 100644 --- a/src/locales/en/messages.po +++ b/src/locales/en/messages.po @@ -123,7 +123,7 @@ msgstr "" #: src/components/CreateSubdomainModal.tsx:92 #: src/components/DeleteModal.tsx:92 -#: src/components/EditPicture.tsx:217 +#: src/components/EditPicture.tsx:219 #: src/components/TransferModal.tsx:109 msgid "Cancel" msgstr "" @@ -137,7 +137,7 @@ msgstr "" msgid "Change language" msgstr "" -#: src/components/EditPicture.tsx:181 +#: src/components/EditPicture.tsx:183 msgid "Change profile picture" msgstr "" @@ -444,7 +444,7 @@ msgstr "" msgid "New {domain}.sol owner" msgstr "" -#: src/components/EditPicture.tsx:206 +#: src/components/EditPicture.tsx:208 msgid "New picture URL" msgstr "" @@ -501,7 +501,7 @@ msgstr "" msgid "Pic" msgstr "" -#: src/components/EditPicture.tsx:204 +#: src/components/EditPicture.tsx:206 msgid "Picture URL" msgstr "" @@ -564,7 +564,7 @@ msgstr "" msgid "Revert" msgstr "" -#: src/components/EditPicture.tsx:224 +#: src/components/EditPicture.tsx:226 #: src/screens/DomainView.tsx:689 msgid "Save" msgstr "" @@ -764,7 +764,7 @@ msgstr "" msgid "Unwrap your domain from NFT" msgstr "" -#: src/components/EditPicture.tsx:198 +#: src/components/EditPicture.tsx:200 msgid "Upload a picture..." msgstr "" diff --git a/src/locales/es/messages.po b/src/locales/es/messages.po index ff908c5..9df1c20 100644 --- a/src/locales/es/messages.po +++ b/src/locales/es/messages.po @@ -89,7 +89,7 @@ msgstr "Al hacer clic en \"{actionName}\", se te pedirá una confirmación desde #: src/components/CreateSubdomainModal.tsx:92 #: src/components/DeleteModal.tsx:92 -#: src/components/EditPicture.tsx:217 +#: src/components/EditPicture.tsx:219 #: src/components/TransferModal.tsx:109 msgid "Cancel" msgstr "Cancelar" @@ -103,7 +103,7 @@ msgstr "Carrito" msgid "Change language" msgstr "Cambiar idioma" -#: src/components/EditPicture.tsx:181 +#: src/components/EditPicture.tsx:183 msgid "Change profile picture" msgstr "Cambiar foto de perfil" @@ -361,7 +361,7 @@ msgstr "" msgid "New {domain}.sol owner" msgstr "Nuevo propietario de {domain}.sol" -#: src/components/EditPicture.tsx:206 +#: src/components/EditPicture.tsx:208 msgid "New picture URL" msgstr "Nueva URL de imagen" @@ -410,7 +410,7 @@ msgstr "Se requiere permiso para acceder al álbum de fotos" msgid "Pic" msgstr "Foto" -#: src/components/EditPicture.tsx:204 +#: src/components/EditPicture.tsx:206 msgid "Picture URL" msgstr "URL de la foto" @@ -469,7 +469,7 @@ msgstr "Descuento de registro" msgid "Revert" msgstr "Revertir" -#: src/components/EditPicture.tsx:224 +#: src/components/EditPicture.tsx:226 #: src/screens/DomainView.tsx:689 msgid "Save" msgstr "Guardar" @@ -612,7 +612,7 @@ msgstr "Desenvolver NFT" msgid "Unwrap your domain from NFT" msgstr "Desenvolver tu dominio del NFT" -#: src/components/EditPicture.tsx:198 +#: src/components/EditPicture.tsx:200 msgid "Upload a picture..." msgstr "Subir una imagen..." diff --git a/src/locales/fr/messages.po b/src/locales/fr/messages.po index aefb7e0..03da1d4 100644 --- a/src/locales/fr/messages.po +++ b/src/locales/fr/messages.po @@ -91,7 +91,7 @@ msgstr "En cliquant sur \"{actionName}\", votre portefeuille vous demandera une #: src/components/CreateSubdomainModal.tsx:92 #: src/components/DeleteModal.tsx:92 -#: src/components/EditPicture.tsx:217 +#: src/components/EditPicture.tsx:219 #: src/components/TransferModal.tsx:109 msgid "Cancel" msgstr "Annuler" @@ -105,7 +105,7 @@ msgstr "Panier" msgid "Change language" msgstr "Changez la langue" -#: src/components/EditPicture.tsx:181 +#: src/components/EditPicture.tsx:183 msgid "Change profile picture" msgstr "Changez votre photo de profil" @@ -381,7 +381,7 @@ msgstr "" "\n" "" -#: src/components/EditPicture.tsx:206 +#: src/components/EditPicture.tsx:208 msgid "New picture URL" msgstr "Nouvelle photo de profil" @@ -436,7 +436,7 @@ msgstr "" msgid "Pic" msgstr "Photo" -#: src/components/EditPicture.tsx:204 +#: src/components/EditPicture.tsx:206 msgid "Picture URL" msgstr "URL de la photo" @@ -495,7 +495,7 @@ msgstr "Remise sur l'enregistrement" msgid "Revert" msgstr "Annuler" -#: src/components/EditPicture.tsx:224 +#: src/components/EditPicture.tsx:226 #: src/screens/DomainView.tsx:689 msgid "Save" msgstr "Sauvegarder" @@ -638,7 +638,7 @@ msgstr "Désenvelopper le NFT" msgid "Unwrap your domain from NFT" msgstr "Désenveloppez votre domaine du NFT" -#: src/components/EditPicture.tsx:198 +#: src/components/EditPicture.tsx:200 msgid "Upload a picture..." msgstr "Téléchargez une photo..." diff --git a/src/locales/kr/messages.po b/src/locales/kr/messages.po index 0fa4123..5877f98 100644 --- a/src/locales/kr/messages.po +++ b/src/locales/kr/messages.po @@ -125,7 +125,7 @@ msgstr "{actionName}\"을(를) 클릭하면 지갑에서 승인 확인을 받게 #: src/components/CreateSubdomainModal.tsx:92 #: src/components/DeleteModal.tsx:92 -#: src/components/EditPicture.tsx:217 +#: src/components/EditPicture.tsx:219 #: src/components/TransferModal.tsx:109 msgid "Cancel" msgstr "취소" @@ -139,7 +139,7 @@ msgstr "장바구니" msgid "Change language" msgstr "언어 변경" -#: src/components/EditPicture.tsx:181 +#: src/components/EditPicture.tsx:183 msgid "Change profile picture" msgstr "프로필 사진 변경" @@ -448,7 +448,7 @@ msgstr "" msgid "New {domain}.sol owner" msgstr "새로운 {domain}.sol 소유자" -#: src/components/EditPicture.tsx:206 +#: src/components/EditPicture.tsx:208 msgid "New picture URL" msgstr "사진 업로드 URL" @@ -509,7 +509,7 @@ msgstr "사진 앨범에 접근하기 위한 권한이 필요합니다" msgid "Pic" msgstr "사진" -#: src/components/EditPicture.tsx:204 +#: src/components/EditPicture.tsx:206 msgid "Picture URL" msgstr "사진 URL" @@ -572,7 +572,7 @@ msgstr "등록 할인" msgid "Revert" msgstr "취소" -#: src/components/EditPicture.tsx:224 +#: src/components/EditPicture.tsx:226 #: src/screens/DomainView.tsx:689 msgid "Save" msgstr "저장" @@ -767,7 +767,7 @@ msgstr "NFT 언랩하기" msgid "Unwrap your domain from NFT" msgstr "NFT에서 도메인을 언랩하기" -#: src/components/EditPicture.tsx:198 +#: src/components/EditPicture.tsx:200 msgid "Upload a picture..." msgstr "사진 업로드..." diff --git a/src/locales/tr/messages.po b/src/locales/tr/messages.po index 5c4833b..af402b0 100644 --- a/src/locales/tr/messages.po +++ b/src/locales/tr/messages.po @@ -89,7 +89,7 @@ msgstr "\"{actionName}\"ya tıklayınca cüzdan onayı vermeniz istenecektir. " #: src/components/CreateSubdomainModal.tsx:92 #: src/components/DeleteModal.tsx:92 -#: src/components/EditPicture.tsx:217 +#: src/components/EditPicture.tsx:219 #: src/components/TransferModal.tsx:109 msgid "Cancel" msgstr "İptal" @@ -103,7 +103,7 @@ msgstr "Araç" msgid "Change language" msgstr "Dili değiştir" -#: src/components/EditPicture.tsx:181 +#: src/components/EditPicture.tsx:183 msgid "Change profile picture" msgstr "Profil resmini değiştir" @@ -361,7 +361,7 @@ msgstr "" msgid "New {domain}.sol owner" msgstr "{domain}.sol'un yeni sahibi" -#: src/components/EditPicture.tsx:206 +#: src/components/EditPicture.tsx:208 msgid "New picture URL" msgstr "Yeni resim URL'si" @@ -410,7 +410,7 @@ msgstr "Fotoğraf albümüne erişim izni gereklidir" msgid "Pic" msgstr "Resim" -#: src/components/EditPicture.tsx:204 +#: src/components/EditPicture.tsx:206 msgid "Picture URL" msgstr "Resim URL'si" @@ -469,7 +469,7 @@ msgstr "Kaydetme indirimi" msgid "Revert" msgstr "Eski haline getir" -#: src/components/EditPicture.tsx:224 +#: src/components/EditPicture.tsx:226 #: src/screens/DomainView.tsx:689 msgid "Save" msgstr "Kaydet" @@ -612,7 +612,7 @@ msgstr "NFT'yi geri katla (unwrapping)" msgid "Unwrap your domain from NFT" msgstr "Domaini, NFT'den geri katla (unwrapping)" -#: src/components/EditPicture.tsx:198 +#: src/components/EditPicture.tsx:200 msgid "Upload a picture..." msgstr "Bir resim yükle..." diff --git a/src/locales/zh-Hans/messages.po b/src/locales/zh-Hans/messages.po index fae3f97..f2bfc2c 100644 --- a/src/locales/zh-Hans/messages.po +++ b/src/locales/zh-Hans/messages.po @@ -89,7 +89,7 @@ msgstr "点击\"{actionName}\",在您的钱包中完成确认" #: src/components/CreateSubdomainModal.tsx:92 #: src/components/DeleteModal.tsx:92 -#: src/components/EditPicture.tsx:217 +#: src/components/EditPicture.tsx:219 #: src/components/TransferModal.tsx:109 msgid "Cancel" msgstr "取消" @@ -103,7 +103,7 @@ msgstr "购物车" msgid "Change language" msgstr "更换语言" -#: src/components/EditPicture.tsx:181 +#: src/components/EditPicture.tsx:183 msgid "Change profile picture" msgstr "更换个人头像" @@ -363,7 +363,7 @@ msgstr "" msgid "New {domain}.sol owner" msgstr "新的 {domain}.sol 所有者" -#: src/components/EditPicture.tsx:206 +#: src/components/EditPicture.tsx:208 msgid "New picture URL" msgstr "新的图片网址" @@ -412,7 +412,7 @@ msgstr "请求获取相册权限" msgid "Pic" msgstr "图片" -#: src/components/EditPicture.tsx:204 +#: src/components/EditPicture.tsx:206 msgid "Picture URL" msgstr "图片网址" @@ -471,7 +471,7 @@ msgstr "注册折扣" msgid "Revert" msgstr "返回" -#: src/components/EditPicture.tsx:224 +#: src/components/EditPicture.tsx:226 #: src/screens/DomainView.tsx:689 msgid "Save" msgstr "保存" @@ -614,7 +614,7 @@ msgstr "将NFT解除封装" msgid "Unwrap your domain from NFT" msgstr "将NFT解除封装为你的域名" -#: src/components/EditPicture.tsx:198 +#: src/components/EditPicture.tsx:200 msgid "Upload a picture..." msgstr "上传一张图片..."