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-14 18:15:45 +08:00
2025-06-17 21:05:35 +08:00
2025-06-18 02:33:18 +08:00
2025-06-14 18:23:25 +08:00
2025-06-19 17:17:32 +08:00
2025-06-12 17:25:25 +08:00
2025-06-20 16:22:00 +08:00
2025-06-18 18:00:49 +08:00
2025-06-13 20:51:20 +08:00
2025-04-03 18:57:15 +08:00
2025-06-12 17:25:25 +08:00
2025-06-17 03:24:39 +08:00
2025-06-22 16:35:30 +08:00
2025-03-08 21:59:18 +08:00
2024-12-12 16:18:14 +08:00
2025-06-17 03:24:39 +08:00
2025-06-16 03:20:54 +08:00
2025-06-19 19:34:57 +08:00