diff --git a/src/components/FollowButton/index.tsx b/src/components/FollowButton/index.tsx index d44ae8c..7896c0c 100644 --- a/src/components/FollowButton/index.tsx +++ b/src/components/FollowButton/index.tsx @@ -1,3 +1,14 @@ +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger +} from '@/components/ui/alert-dialog' import { Button } from '@/components/ui/button' import { useToast } from '@/hooks' import { useFollowList } from '@/providers/FollowListProvider' @@ -12,6 +23,7 @@ export default function FollowButton({ pubkey }: { pubkey: string }) { const { pubkey: accountPubkey, checkLogin } = useNostr() const { followings, follow, unfollow } = useFollowList() const [updating, setUpdating] = useState(false) + const [hover, setHover] = useState(false) const isFollowing = useMemo(() => followings.includes(pubkey), [followings, pubkey]) if (!accountPubkey || (pubkey && pubkey === accountPubkey)) return null @@ -57,16 +69,41 @@ export default function FollowButton({ pubkey }: { pubkey: string }) { } return isFollowing ? ( - + + + + + + + {t('Unfollow')}? + + {t('Are you sure you want to unfollow this user?')} + + + + {t('Cancel')} + + {t('Unfollow')} + + + + ) : ( - ) diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts index 6444283..b868add 100644 --- a/src/i18n/locales/ar.ts +++ b/src/i18n/locales/ar.ts @@ -201,6 +201,9 @@ export default { 'Your donation helps me maintain Jumble and make it better! 😊': 'تبرعك يساعد في صيانة Jumble وتحسينه! 😊', 'Earlier notifications': 'الإشعارات السابقة', - 'Temporarily display this note': 'عرض هذه الملاحظة مؤقتاً' + 'Temporarily display this note': 'عرض هذه الملاحظة مؤقتاً', + buttonFollowing: 'جارٍ المتابعة', + 'Are you sure you want to unfollow this user?': + 'هل أنت متأكد أنك تريد إلغاء متابعة هذا المستخدم؟' } } diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts index d540b7e..63e3726 100644 --- a/src/i18n/locales/de.ts +++ b/src/i18n/locales/de.ts @@ -206,6 +206,9 @@ export default { 'Your donation helps me maintain Jumble and make it better! 😊': 'Deine Spende hilft mir, Jumble zu pflegen und zu verbessern! 😊', 'Earlier notifications': 'Frühere Benachrichtigungen', - 'Temporarily display this note': 'Notiz vorübergehend anzeigen' + 'Temporarily display this note': 'Notiz vorübergehend anzeigen', + buttonFollowing: 'Folge', + 'Are you sure you want to unfollow this user?': + 'Möchtest du diesem Benutzer wirklich nicht mehr folgen?' } } diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index c2756c3..f8235d0 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -202,6 +202,8 @@ export default { 'Your donation helps me maintain Jumble and make it better! 😊': 'Your donation helps me maintain Jumble and make it better! 😊', 'Earlier notifications': 'Earlier notifications', - 'Temporarily display this note': 'Temporarily display this note' + 'Temporarily display this note': 'Temporarily display this note', + buttonFollowing: 'Following', + 'Are you sure you want to unfollow this user?': 'Are you sure you want to unfollow this user?' } } diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index 4679b69..478b80e 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -206,6 +206,9 @@ export default { 'Your donation helps me maintain Jumble and make it better! 😊': '¡Tu donación me ayuda a mantener y mejorar Jumble! 😊', 'Earlier notifications': 'Notificaciones anteriores', - 'Temporarily display this note': 'Mostrar esta nota temporalmente' + 'Temporarily display this note': 'Mostrar esta nota temporalmente', + buttonFollowing: 'Siguiendo', + 'Are you sure you want to unfollow this user?': + '¿Estás seguro de que deseas dejar de seguir a este usuario?' } } diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts index 0bce6c4..0fc8098 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -204,6 +204,9 @@ export default { 'Your donation helps me maintain Jumble and make it better! 😊': "Votre don m'aide à maintenir Jumble et à l'améliorer ! 😊", 'Earlier notifications': 'Notifications antérieures', - 'Temporarily display this note': 'Afficher temporairement cette note' + 'Temporarily display this note': 'Afficher temporairement cette note', + buttonFollowing: 'Suivi', + 'Are you sure you want to unfollow this user?': + 'Êtes-vous sûr de vouloir arrêter de suivre cet utilisateur ?' } } diff --git a/src/i18n/locales/ja.ts b/src/i18n/locales/ja.ts index 4b5d3b5..8ddd3cf 100644 --- a/src/i18n/locales/ja.ts +++ b/src/i18n/locales/ja.ts @@ -203,6 +203,8 @@ export default { 'Your donation helps me maintain Jumble and make it better! 😊': 'あなたの寄付はJumbleの維持と改善に役立ちます! 😊', 'Earlier notifications': '以前の通知', - 'Temporarily display this note': 'このノートを一時的に表示' + 'Temporarily display this note': 'このノートを一時的に表示', + buttonFollowing: 'フォロー中', + 'Are you sure you want to unfollow this user?': 'このユーザーのフォローを解除しますか?' } } diff --git a/src/i18n/locales/pl.ts b/src/i18n/locales/pl.ts index 9e0be8f..c7f018f 100644 --- a/src/i18n/locales/pl.ts +++ b/src/i18n/locales/pl.ts @@ -204,6 +204,9 @@ export default { 'Earlier notifications': 'Wcześniejsze powiadomienia', // NOTE: The translations below were generated by ChatGPT and have not yet been verified. - 'Temporarily display this note': 'Tymczas wyświetl ten wpis' + 'Temporarily display this note': 'Tymczas wyświetl ten wpis', + buttonFollowing: 'Obserwujesz', + 'Are you sure you want to unfollow this user?': + 'Czy na pewno chcesz przestać obserwować tego użytkownika?' } } diff --git a/src/i18n/locales/pt.ts b/src/i18n/locales/pt.ts index 08a0cad..b48b1c8 100644 --- a/src/i18n/locales/pt.ts +++ b/src/i18n/locales/pt.ts @@ -204,6 +204,9 @@ export default { 'Your donation helps me maintain Jumble and make it better! 😊': 'Sua doação me ajuda a manter o Jumble e torná-lo melhor! 😊', 'Earlier notifications': 'Notificações anteriores', - 'Temporarily display this note': 'Exibir esta nota temporariamente' + 'Temporarily display this note': 'Exibir esta nota temporariamente', + buttonFollowing: 'Seguindo', + 'Are you sure you want to unfollow this user?': + 'Tem certeza de que deseja deixar de seguir este usuário?' } } diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts index 92b9071..d6a470c 100644 --- a/src/i18n/locales/ru.ts +++ b/src/i18n/locales/ru.ts @@ -206,6 +206,9 @@ export default { 'Your donation helps me maintain Jumble and make it better! 😊': 'Ваше пожертвование помогает поддерживать и улучшать Jumble! 😊', 'Earlier notifications': 'Ранние уведомления', - 'Temporarily display this note': 'Временно отобразить эту заметку' + 'Temporarily display this note': 'Временно отобразить эту заметку', + buttonFollowing: 'Подписан', + 'Are you sure you want to unfollow this user?': + 'Вы уверены, что хотите отписаться от этого пользователя?' } } diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts index 80b98af..e17d349 100644 --- a/src/i18n/locales/zh.ts +++ b/src/i18n/locales/zh.ts @@ -203,6 +203,8 @@ export default { 'Your donation helps me maintain Jumble and make it better! 😊': '您的捐赠帮助我维护 Jumble 并使其更好!😊', 'Earlier notifications': '更早的通知', - 'Temporarily display this note': '临时显示此笔记' + 'Temporarily display this note': '临时显示此笔记', + buttonFollowing: '已关注', + 'Are you sure you want to unfollow this user?': '确定要取消关注此用户吗?' } } diff --git a/src/pages/secondary/ProfilePage/index.tsx b/src/pages/secondary/ProfilePage/index.tsx index 8bfe9ea..22713c5 100644 --- a/src/pages/secondary/ProfilePage/index.tsx +++ b/src/pages/secondary/ProfilePage/index.tsx @@ -90,12 +90,7 @@ const ProfilePage = forwardRef(({ id, index }: { id?: string; index?: number },
-
- {isFollowingYou && ( -
- {t('Follows you')} -
- )} +
{isSelf ? (