feat(inbounds): clearer client validation errors on save

When an inbound save fails Zod validation, the toast previously showed a
raw path like `settings.clients.494.tgId: Invalid input`, which gave no
hint which of hundreds of clients was at fault. Resolve the client array
index back to the client email, name the field, and append a "(+N more)"
count when several fields fail. console.error now logs a readable list of
every issue instead of dumping the whole form.

Adds the invalidClientField/invalidField/moreIssues toast strings across
all 13 translations.
This commit is contained in:
MHSanaei
2026-05-31 22:41:58 +02:00
parent 61e8bed3e0
commit 76dbbfc1f8
16 changed files with 167 additions and 25 deletions
+4 -1
View File
@@ -442,7 +442,10 @@
"trafficGetError": "خطا در دریافت ترافیک‌ها",
"getNewX25519CertError": "خطا در دریافت گواهی X25519.",
"getNewmldsa65Error": "خطا در دریافت گواهی mldsa65.",
"getNewVlessEncError": "خطا در دریافت گواهی VlessEnc."
"getNewVlessEncError": "خطا در دریافت گواهی VlessEnc.",
"invalidClientField": "کلاینت {client}: فیلد {field} — {reason}",
"invalidField": "{field} — {reason}",
"moreIssues": "{message} (+{count} مورد دیگر)"
},
"form": {
"moveUp": "بالا",