t0ng7u
093d86040f
🗑️ feat(token): implement batch token deletion API & front-end integration
• Back-end
• model/token.go
• Add `BatchDeleteTokens(ids []int, userId int)` – transactional DB removal + async Redis cache cleanup.
• controller/token.go
• Introduce `TokenBatch` DTO and `DeleteTokenBatch` handler calling the model layer; returns amount deleted.
• router/api-router.go
• Register `POST /api/token/batch` route (user-scoped).
• Front-end (TokensTable.js)
• Replace per-token deletion loops with single request to `/api/token/batch`.
• Display dynamic i18n message: “Deleted {{count}} tokens!”.
• Add modal confirmation:
• Title “Batch delete token”.
• Content “Are you sure you want to delete the selected {{count}} tokens?”.
• UI/UX tweaks
• Responsive button group (flex-wrap, mobile line-break).
• Clear `selectedKeys` after refresh / successful deletion to avoid ghost selections.
• i18n
• Ensure placeholder style matches translation keys (`{{count}}`).
This commit delivers efficient, scalable token management and an improved user experience across devices.
2025-06-22 16:35:30 +08:00
..
2025-06-09 13:43:50 +08:00
2025-06-22 16:35:30 +08:00
2023-04-22 20:39:27 +08:00
2025-04-04 17:37:27 +08:00
2025-06-08 03:28:36 +08:00
2024-12-28 20:43:26 +08:00
2025-06-11 12:38:51 +08:00
2025-05-06 01:36:23 +08:00
2025-05-06 01:36:23 +08:00
2023-04-22 20:39:27 +08:00
2025-06-11 12:38:51 +08:00