From 078de21839ba139413b9ae32ae83513661d44a85 Mon Sep 17 00:00:00 2001 From: plebeius Date: Tue, 9 Dec 2025 18:22:39 +0100 Subject: [PATCH] refactor(settings-modal): align avatar settings UI with crypto wallets Refactor avatar settings to match crypto wallets UI structure and styling. Use flexbox layout for consistent spacing, align input widths, use ErrorDisplay component for errors, and add delete avatar functionality with translations. --- public/translations/ar/default.json | 3 +- public/translations/bn/default.json | 3 +- public/translations/cs/default.json | 3 +- public/translations/da/default.json | 3 +- public/translations/de/default.json | 3 +- public/translations/el/default.json | 3 +- public/translations/en/default.json | 1 + public/translations/es/default.json | 3 +- public/translations/fa/default.json | 3 +- public/translations/fi/default.json | 3 +- public/translations/fil/default.json | 3 +- public/translations/fr/default.json | 3 +- public/translations/he/default.json | 3 +- public/translations/hi/default.json | 3 +- public/translations/hu/default.json | 3 +- public/translations/id/default.json | 3 +- public/translations/it/default.json | 3 +- public/translations/ja/default.json | 3 +- public/translations/ko/default.json | 3 +- public/translations/mr/default.json | 3 +- public/translations/nl/default.json | 3 +- public/translations/no/default.json | 3 +- public/translations/pl/default.json | 3 +- public/translations/pt/default.json | 3 +- public/translations/ro/default.json | 3 +- public/translations/ru/default.json | 3 +- public/translations/sq/default.json | 3 +- public/translations/sv/default.json | 3 +- public/translations/te/default.json | 3 +- public/translations/th/default.json | 3 +- public/translations/tr/default.json | 3 +- public/translations/uk/default.json | 3 +- public/translations/ur/default.json | 3 +- public/translations/vi/default.json | 3 +- public/translations/zh/default.json | 3 +- .../avatar-settings.module.css | 81 +++++++++++++------ .../avatar-settings/avatar-settings.tsx | 79 ++++++++++-------- .../crypto-wallets-setting.module.css | 11 ++- 38 files changed, 181 insertions(+), 93 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index fd5d3ecd..aa6b0ed2 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} مواضيع منذ {{currentTimeFilterName}} — [<1>عرض المزيد من المواضيع من السنة الماضية]", "moderator_of_this_board": "هذا المستخدم هو مشرف على هذا المنتدى", "administrator_of_this_board": "هذا المستخدم هو مسؤول عن هذا المنتدى", - "copy_content_id": "نسخ معرف المحتوى" + "copy_content_id": "نسخ معرف المحتوى", + "delete_avatar": "حذف الصورة الرمزية" } diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 4e230c99..fc0936dc 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} থ্রেড {{currentTimeFilterName}} থেকে — [<1>গত বছরের আরও থ্রেড দেখান]", "moderator_of_this_board": "এই ব্যবহারকারী এই বোর্ডের একজন মডারেটর", "administrator_of_this_board": "এই ব্যবহারকারী এই বোর্ডের একজন প্রশাসক", - "copy_content_id": "কনটেন্ট আইডি কপি করুন" + "copy_content_id": "কনটেন্ট আইডি কপি করুন", + "delete_avatar": "অবতার মুছুন" } diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index e1f7e5d8..80408ea4 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} příspěvků od {{currentTimeFilterName}} — [<1>Zobrazit více příspěvků z minulého roku]", "moderator_of_this_board": "Tento uživatel je moderátorem tohoto fóra", "administrator_of_this_board": "Tento uživatel je administrátorem tohoto fóra", - "copy_content_id": "kopírovat ID obsahu" + "copy_content_id": "kopírovat ID obsahu", + "delete_avatar": "Smazat avatar" } diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 46ceeb0e..c1f0f9a0 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} tråde siden {{currentTimeFilterName}} — [<1>Vis flere tråde fra sidste år]", "moderator_of_this_board": "Denne bruger er moderator for dette board", "administrator_of_this_board": "Denne bruger er administrator for dette board", - "copy_content_id": "kopier indhold-ID" + "copy_content_id": "kopier indhold-ID", + "delete_avatar": "Slet avatar" } diff --git a/public/translations/de/default.json b/public/translations/de/default.json index 854bd4c2..a05db211 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} Threads seit {{currentTimeFilterName}} — [<1>Mehr Threads vom letzten Jahr anzeigen]", "moderator_of_this_board": "Dieser Benutzer ist Moderator dieses Boards", "administrator_of_this_board": "Dieser Benutzer ist Administrator dieses Boards", - "copy_content_id": "Inhalts-ID kopieren" + "copy_content_id": "Inhalts-ID kopieren", + "delete_avatar": "Avatar löschen" } diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 81f2d598..5488c163 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} νήματα από {{currentTimeFilterName}} — [<1>Προβολή περισσότερων νημάτων από το περασμένο έτος]", "moderator_of_this_board": "Αυτός ο χρήστης είναι συντονιστής αυτού του πίνακα", "administrator_of_this_board": "Αυτός ο χρήστης είναι διαχειριστής αυτού του πίνακα", - "copy_content_id": "αντιγραφή ID περιεχομένου" + "copy_content_id": "αντιγραφή ID περιεχομένου", + "delete_avatar": "Διαγραφή avatar" } diff --git a/public/translations/en/default.json b/public/translations/en/default.json index 6e778db7..dfc3a109 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -245,6 +245,7 @@ "reset_changes": "Reset Changes", "crypto_address_yours": "Crypto address belongs to this account.", "delete_wallet": "Delete Wallet", + "delete_avatar": "Delete Avatar", "loading_board": "Loading board", "last_bumped": "Last Bumped", "threads_without_images_tip": "Only display threads that link to embeddable media", diff --git a/public/translations/es/default.json b/public/translations/es/default.json index 1ea2d451..c054ee03 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} hilos desde {{currentTimeFilterName}} — [<1>Ver más hilos del año pasado]", "moderator_of_this_board": "Este usuario es moderador de este tablero", "administrator_of_this_board": "Este usuario es administrador de este tablero", - "copy_content_id": "Copiar ID de contenido" + "copy_content_id": "Copiar ID de contenido", + "delete_avatar": "Eliminar avatar" } diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index efe055d4..baafe471 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} پست از {{currentTimeFilterName}} — [<1>نمایش بیشتر پست‌های سال گذشته]", "moderator_of_this_board": "این کاربر مدیر این انجمن است", "administrator_of_this_board": "این کاربر مدیرکل این انجمن است", - "copy_content_id": "کپی شناسه محتوا" + "copy_content_id": "کپی شناسه محتوا", + "delete_avatar": "حذف آواتار" } diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 5812e9ac..ddc88e44 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} ketjua sitten {{currentTimeFilterName}} — [<1>Näytä lisää viime vuoden ketjuja]", "moderator_of_this_board": "Tämä käyttäjä on tämän taulun moderaattori", "administrator_of_this_board": "Tämä käyttäjä on tämän taulun järjestelmänvalvoja", - "copy_content_id": "kopioi sisältö-ID" + "copy_content_id": "kopioi sisältö-ID", + "delete_avatar": "Poista avatar" } diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index cef59755..b10ede4b 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} mga thread mula {{currentTimeFilterName}} — [<1>Ipakita ang higit pang mga thread mula noong nakaraang taon]", "moderator_of_this_board": "Ang user na ito ay moderator ng board na ito", "administrator_of_this_board": "Ang user na ito ay administrator ng board na ito", - "copy_content_id": "kopyahin ang content ID" + "copy_content_id": "kopyahin ang content ID", + "delete_avatar": "Tanggalin ang avatar" } diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index bf427dff..2b2d4c26 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} fils depuis {{currentTimeFilterName}} — [<1>Afficher plus de fils de l'année dernière]", "moderator_of_this_board": "Cet utilisateur est modérateur de ce tableau", "administrator_of_this_board": "Cet utilisateur est administrateur de ce tableau", - "copy_content_id": "Copier l'ID du contenu" + "copy_content_id": "Copier l'ID du contenu", + "delete_avatar": "Supprimer l'avatar" } diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 71d414a1..0cdb8a05 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} חוטים מאז {{currentTimeFilterName}} — [<1>הצג עוד חוטים מהשנה שעברה]", "moderator_of_this_board": "משתמש זה הוא מנהל של הלוח הזה", "administrator_of_this_board": "משתמש זה הוא מנהל מערכת של הלוח הזה", - "copy_content_id": "העתק מזהה תוכן" + "copy_content_id": "העתק מזהה תוכן", + "delete_avatar": "מחק אווטר" } diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index a863332b..8c315d64 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} थ्रेड्स {{currentTimeFilterName}} से — [<1>पिछले साल के अधिक थ्रेड्स दिखाएं]", "moderator_of_this_board": "यह उपयोगकर्ता इस बोर्ड का मॉडरेटर है", "administrator_of_this_board": "यह उपयोगकर्ता इस बोर्ड का प्रशासक है", - "copy_content_id": "कंटेंट ID कॉपी करें" + "copy_content_id": "कंटेंट ID कॉपी करें", + "delete_avatar": "अवतार हटाएं" } diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index 361d0ec3..a68c38dd 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} szál {{currentTimeFilterName}} óta — [<1>Több szál megjelenítése a múlt évből]", "moderator_of_this_board": "Ez a felhasználó ennek a táblának a moderátora", "administrator_of_this_board": "Ez a felhasználó ennek a táblának a rendszergazdája", - "copy_content_id": "tartalom ID másolása" + "copy_content_id": "tartalom ID másolása", + "delete_avatar": "Avatar törlése" } diff --git a/public/translations/id/default.json b/public/translations/id/default.json index ded3510c..019d411b 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} thread sejak {{currentTimeFilterName}} — [<1>Tampilkan lebih banyak thread dari tahun lalu]", "moderator_of_this_board": "Pengguna ini adalah moderator papan ini", "administrator_of_this_board": "Pengguna ini adalah administrator papan ini", - "copy_content_id": "salin ID konten" + "copy_content_id": "salin ID konten", + "delete_avatar": "Hapus avatar" } diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 20bbbd47..43f4fb34 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} thread da {{currentTimeFilterName}} — [<1>Mostra altri thread dell'anno scorso]", "moderator_of_this_board": "Questo utente è moderatore di questa bacheca", "administrator_of_this_board": "Questo utente è amministratore di questa bacheca", - "copy_content_id": "Copia ID contenuto" + "copy_content_id": "Copia ID contenuto", + "delete_avatar": "Elimina avatar" } diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 68febef2..69f32ac5 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} スレッド {{currentTimeFilterName}} から — [<1>去年のスレッドをさらに表示]", "moderator_of_this_board": "このユーザーはこのボードのモデレーターです", "administrator_of_this_board": "このユーザーはこのボードの管理者です", - "copy_content_id": "コンテンツIDをコピー" + "copy_content_id": "コンテンツIDをコピー", + "delete_avatar": "アバターを削除" } diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index b0def60b..409b0eb0 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} 스레드 {{currentTimeFilterName}} 이후 — [<1>작년의 스레드 더 보기]", "moderator_of_this_board": "이 사용자는 이 게시판의 관리자입니다", "administrator_of_this_board": "이 사용자는 이 게시판의 관리자입니다", - "copy_content_id": "콘텐츠 ID 복사" + "copy_content_id": "콘텐츠 ID 복사", + "delete_avatar": "아바타 삭제" } diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 34fda63c..209f71c5 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} ध糀ं {{currentTimeFilterName}} पासून — [<1>गेल्या वर्षातील आणखी थ्रेड्स दाखवा]", "moderator_of_this_board": "हा वापरकर्ता या बोर्डचा मॉडरेटर आहे", "administrator_of_this_board": "हा वापरकर्ता या बोर्डचा प्रशासक आहे", - "copy_content_id": "कंटेंट ID कॉपी करा" + "copy_content_id": "कंटेंट ID कॉपी करा", + "delete_avatar": "अवतार हटवा" } diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 1909770e..445c7b06 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} threads sinds {{currentTimeFilterName}} — [<1>Meer threads van afgelopen jaar tonen]", "moderator_of_this_board": "Deze gebruiker is moderator van dit bord", "administrator_of_this_board": "Deze gebruiker is beheerder van dit bord", - "copy_content_id": "kopieer inhoud-ID" + "copy_content_id": "kopieer inhoud-ID", + "delete_avatar": "Avatar verwijderen" } diff --git a/public/translations/no/default.json b/public/translations/no/default.json index ca400413..91279587 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} tråder siden {{currentTimeFilterName}} — [<1>Vis flere tråder fra forrige år]", "moderator_of_this_board": "Denne brukeren er moderator for dette tavlet", "administrator_of_this_board": "Denne brukeren er administrator for dette tavlet", - "copy_content_id": "kopier innhold-ID" + "copy_content_id": "kopier innhold-ID", + "delete_avatar": "Slett avatar" } diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 7fe844cf..25f5cc0c 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} wątki od {{currentTimeFilterName}} — [<1>Pokaż więcej wątków z zeszłego roku]", "moderator_of_this_board": "Ten użytkownik jest moderatorem tego forum", "administrator_of_this_board": "Ten użytkownik jest administratorem tego forum", - "copy_content_id": "skopiuj ID treści" + "copy_content_id": "skopiuj ID treści", + "delete_avatar": "Usuń avatar" } diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index a0ece426..960106cf 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} tópicos desde {{currentTimeFilterName}} — [<1>Mostrar mais tópicos do ano passado]", "moderator_of_this_board": "Este usuário é moderador deste quadro", "administrator_of_this_board": "Este usuário é administrador deste quadro", - "copy_content_id": "Copiar ID do conteúdo" + "copy_content_id": "Copiar ID do conteúdo", + "delete_avatar": "Excluir avatar" } diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index 1d9f92e8..d83c6315 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} subiecte din {{currentTimeFilterName}} — [<1>Afișați mai multe subiecte de anul trecut]", "moderator_of_this_board": "Acest utilizator este moderator al acestui forum", "administrator_of_this_board": "Acest utilizator este administrator al acestui forum", - "copy_content_id": "copiați ID-ul conținutului" + "copy_content_id": "copiați ID-ul conținutului", + "delete_avatar": "Șterge avatar" } diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index 6c812038..f0264f8e 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} темы с {{currentTimeFilterName}} — [<1>Показать больше тем с прошлого года]", "moderator_of_this_board": "Этот пользователь является модератором этого форума", "administrator_of_this_board": "Этот пользователь является администратором этого форума", - "copy_content_id": "копировать ID контента" + "copy_content_id": "копировать ID контента", + "delete_avatar": "Удалить аватар" } diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 990ce141..17bbe19c 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} tema nga {{currentTimeFilterName}} — [<1>Shfaq më shumë tema nga viti i kaluar]", "moderator_of_this_board": "Ky përdorues është moderator i këtij bordi", "administrator_of_this_board": "Ky përdorues është administrator i këtij bordi", - "copy_content_id": "kopjo ID e përmbajtjes" + "copy_content_id": "kopjo ID e përmbajtjes", + "delete_avatar": "Fshi avatarin" } diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 4108c506..288de1fc 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} trådar sedan {{currentTimeFilterName}} — [<1>Visa fler trådar från förra året]", "moderator_of_this_board": "Denna användare är moderator för detta forum", "administrator_of_this_board": "Denna användare är administratör för detta forum", - "copy_content_id": "kopiera innehålls-ID" + "copy_content_id": "kopiera innehålls-ID", + "delete_avatar": "Ta bort avatar" } diff --git a/public/translations/te/default.json b/public/translations/te/default.json index c574e05c..7f214fea 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} థ్రెడ్‌లు {{currentTimeFilterName}} నుండి — [<1>గత సంవత్సరం నుండి మరిన్ని థ్రెడ్‌లను చూపించండి]", "moderator_of_this_board": "ఈ వినియోగదారు ఈ బోర్డ్ యొక్క మోడరేటర్", "administrator_of_this_board": "ఈ వినియోగదారు ఈ బోర్డ్ యొక్క నిర్వాహకుడు", - "copy_content_id": "కంటెంట్ ID కాపీ చేయండి" + "copy_content_id": "కంటెంట్ ID కాపీ చేయండి", + "delete_avatar": "అవతార్ను తొలగించు" } diff --git a/public/translations/th/default.json b/public/translations/th/default.json index 17799c5d..6ce20d84 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} กระทู้ตั้งแต่ {{currentTimeFilterName}} — [<1>แสดงกระทู้จากปีที่แล้วเพิ่มเติม]", "moderator_of_this_board": "ผู้ใช้รายนี้เป็นผู้ดูแลของบอร์ดนี้", "administrator_of_this_board": "ผู้ใช้รายนี้เป็นผู้ดูแลระบบของบอร์ดนี้", - "copy_content_id": "คัดลอก ID เนื้อหา" + "copy_content_id": "คัดลอก ID เนื้อหา", + "delete_avatar": "ลบอวตาร" } diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 9d26f691..7c77d465 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} konu {{currentTimeFilterName}} itibariyle — [<1>Geçen yıldan daha fazla konu göster]", "moderator_of_this_board": "Bu kullanıcı bu panonun moderatörüdür", "administrator_of_this_board": "Bu kullanıcı bu panonun yöneticisidir", - "copy_content_id": "içerik ID'sini kopyala" + "copy_content_id": "içerik ID'sini kopyala", + "delete_avatar": "Avatarı sil" } diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 430203fa..8fb1655b 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} тем з {{currentTimeFilterName}} — [<1>Показати більше тем з минулого року]", "moderator_of_this_board": "Цей користувач є модератором цього форуму", "administrator_of_this_board": "Цей користувач є адміністратором цього форуму", - "copy_content_id": "копіювати ID контенту" + "copy_content_id": "копіювати ID контенту", + "delete_avatar": "Видалити аватар" } diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 96b60bd3..c3539c1c 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} تھریڈز {{currentTimeFilterName}} سے — [<1>گزشتہ سال کے مزید تھریڈز دکھائیں]", "moderator_of_this_board": "یہ صارف اس بورڈ کا ماڈریٹر ہے", "administrator_of_this_board": "یہ صارف اس بورڈ کا منتظم ہے", - "copy_content_id": "مواد کی شناخت کاپی کریں" + "copy_content_id": "مواد کی شناخت کاپی کریں", + "delete_avatar": "اوتار حذف کریں" } diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 696a1102..16cd76ed 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} chủ đề từ {{currentTimeFilterName}} — [<1>Hiển thị thêm các chủ đề từ năm ngoái]", "moderator_of_this_board": "Người dùng này là người điều hành của bảng này", "administrator_of_this_board": "Người dùng này là quản trị viên của bảng này", - "copy_content_id": "sao chép ID nội dung" + "copy_content_id": "sao chép ID nội dung", + "delete_avatar": "Xóa avatar" } diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 6ce7a1ba..0c70a188 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -296,5 +296,6 @@ "more_threads_last_year": "{{count}} 主题自 {{currentTimeFilterName}} — [<1>显示更多去年的主题]", "moderator_of_this_board": "此用户是此版块的版主", "administrator_of_this_board": "此用户是此版块的管理员", - "copy_content_id": "复制内容ID" + "copy_content_id": "复制内容ID", + "delete_avatar": "删除头像" } diff --git a/src/components/settings-modal/avatar-settings/avatar-settings.module.css b/src/components/settings-modal/avatar-settings/avatar-settings.module.css index 409947bb..33433cbe 100644 --- a/src/components/settings-modal/avatar-settings/avatar-settings.module.css +++ b/src/components/settings-modal/avatar-settings/avatar-settings.module.css @@ -26,61 +26,94 @@ } .avatarSettingsForm { - padding: 10px 0 15px 10px; + padding: 5px 0 15px 10px; } -.avatarSettingsForm input { - width: 200px; +.settingField { + margin-top: 5px; + margin-left: 5px; + position: relative; + display: flex; + align-items: center; + flex-wrap: nowrap; +} + +.settingField input { + flex: 0 1 200px; + min-width: 0; + max-width: 200px; padding: 2px; + margin-left: 5px; + box-shadow: var(--box-shadow-input); } -.avatarSettingInput input { - margin-bottom: 10px; - display: block; +.settingField[class*='step']::before { + margin-left: -5px; } -.avatarSettingInput a { - color: var(--link-primary); +.settingField.step1::before { + content: '1.\00a0'; } -.avatarSettingInput a { +.settingField.step2::before { + content: '2.\00a0'; +} + +.settingField.step3::before { + content: '3.\00a0'; +} + +.settingField.step4::before { + content: '4.\00a0'; +} + +.settingField a { color: var(--post-link-text-color); text-decoration: var(--post-content-link-text-decoration); } -.avatarSettingInput a:hover { +.settingField a:hover { color: var(--post-link-text-color-hover); text-decoration: var(--post-content-link-text-decoration-hover); } .settingTitle { - font-style: italic; - text-transform: lowercase; + font-style: inherit; + text-transform: none; + white-space: nowrap; + flex-shrink: 0; } -.copyMessage { - padding-bottom: 10px; +.timestampfield { + margin-left: 10px; } -.pasteSignature span { - display: block; -} - -.pasteSignature button { +.buttons { + margin-top: 10px; margin-left: 5px; } +.save { + margin-right: 5px; +} + .state { + text-transform: lowercase; padding-top: 10px; padding-left: 10px; max-width: 300px; color: var(--post-mobile-abbr-text-color); } -.copyMessage a { - color: var(--text-primary); +.error { + color: red; } -.copyMessage a:hover { - text-decoration: underline; -} \ No newline at end of file +.deleteAvatarContainer { + margin-top: 20px; + margin-left: 5px; +} + +.removeAvatar { + color: red; +} diff --git a/src/components/settings-modal/avatar-settings/avatar-settings.tsx b/src/components/settings-modal/avatar-settings/avatar-settings.tsx index f3b03acc..1fc7e242 100644 --- a/src/components/settings-modal/avatar-settings/avatar-settings.tsx +++ b/src/components/settings-modal/avatar-settings/avatar-settings.tsx @@ -4,6 +4,8 @@ import { setAccount, useAccount, useAuthorAvatar } from '@plebbit/plebbit-react- import styles from './avatar-settings.module.css'; import { Trans, useTranslation } from 'react-i18next'; import LoadingEllipsis from '../../loading-ellipsis'; +import ErrorDisplay from '../../error-display/error-display'; +import _ from 'lodash'; const AvatarPreview = ({ avatar }: any) => { const { t } = useTranslation(); @@ -31,7 +33,7 @@ const AvatarPreview = ({ avatar }: any) => { {state !== 'succeeded' && account?.author?.avatar && (
- {!error && stateText} {error && error?.message} + {!error && stateText} {error && }
)} @@ -111,15 +113,26 @@ const AvatarSettings = () => { return alert(t('missing_signature')); } setAccount({ ...account, author: { ...account?.author, avatar } }); - alert(`saved`); + alert(t('saved')); + }; + + const _removeAvatar = () => { + if (window.confirm(t('delete_confirm', { value: 'avatar', interpolation: { escapeValue: false } }))) { + setAccount({ ...account, author: { ...account?.author, avatar: undefined } }); + setChainTicker(undefined); + setTokenAddress(undefined); + setTokenId(undefined); + setTimestamp(undefined); + setSignature(undefined); + } }; return (
-
- {t('chain_ticker')} +
+ {_.capitalize(t('chain_ticker'))}: { onChange={(e) => setChainTicker(e.target.value)} />
-
+
{ ), }} /> + :{' '} { onChange={(e) => setTokenAddress(e.target.value)} />
-
- {t('token_id')} - setTokenId(e.target.value)} - /> +
+ + , + // eslint-disable-next-line + 2: , + }} + /> +
- -
- {t('timestamp')} +
+ {_.capitalize(t('timestamp'))}: setTimestamp(Number(e.target.value))} />
-
- {t('paste_signature')} +
+ {_.capitalize(t('paste_signature'))}: { defaultValue={account?.author?.avatar?.signature?.signature} onChange={(e) => setSignature(e.target.value)} /> - +
+
+ +
+
+
diff --git a/src/components/settings-modal/crypto-wallets-setting/crypto-wallets-setting.module.css b/src/components/settings-modal/crypto-wallets-setting/crypto-wallets-setting.module.css index 0b7268e9..4a599555 100644 --- a/src/components/settings-modal/crypto-wallets-setting/crypto-wallets-setting.module.css +++ b/src/components/settings-modal/crypto-wallets-setting/crypto-wallets-setting.module.css @@ -52,9 +52,16 @@ content: '5. '; } -.walletField input { - width: 200px; +.walletField { + position: relative; +} + +.settingField input { + flex: 1 1 auto; + min-width: 0; + max-width: 100%; padding: 2px; + margin-left: 5px; box-shadow: var(--box-shadow-input); }