refactor(devices): close all MED/LOW review items

- Extract DEVICE_ALIAS_MAX_LENGTH to src/constants/devices.ts so the
  user page and admin page share one source of truth (mirroring the
  bot's ALIAS_MAX_LENGTH=64). Was duplicated as a magic 64 in both
  files (MED-5).
- Replace ✓ / ✕ / ✏️ glyphs in AdminUserDetail.tsx with inline SVGs,
  matching the icon style already used by Subscription.tsx for the
  same rename/save/cancel actions. Eliminates the platform-dependent
  emoji rendering inconsistency (MED-4).
- Add haptic feedback to the user-side renameDeviceMutation —
  notification('success') on save, notification('error') on failure.
  Brings it in line with the other Subscription.tsx mutations
  (LOW-9).
- Translate the new rename keys into zh.json and fa.json (en.json
  already covered in the previous follow-up). Cabinet now ships full
  parity across all 4 locales for the rename UI.
This commit is contained in:
Fringg
2026-05-16 04:07:25 +03:00
parent d1e5ce873b
commit e964780e6f
5 changed files with 88 additions and 10 deletions

View File

@@ -454,6 +454,11 @@
"month": "月",
"myDevices": "我的设备",
"noDevices": "没有已连接的设备",
"renameDevice": "重命名",
"renameDeviceSave": "保存",
"renameDeviceCancel": "取消",
"renameDevicePlaceholder": "设备名称",
"deviceRenamed": "设备名称已更新",
"perExtraDevice": "/ 额外设备",
"perMonth": "/月",
"purchasedTraffic": "已购流量",
@@ -2666,7 +2671,10 @@
"none": "没有已连接的设备",
"resetAll": "重置全部",
"deleted": "设备已删除",
"allDeleted": "所有设备已重置"
"allDeleted": "所有设备已重置",
"rename": "重命名",
"renameSave": "保存",
"renamed": "设备名称已更新"
},
"referral": {
"title": "推荐计划",