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
..
2024-12-29 16:50:26 +08:00
2025-06-05 18:16:37 +08:00
2025-06-20 16:12:41 +08:00
2025-06-21 21:50:03 +08:00
2025-06-15 03:12:34 +08:00
2024-11-18 18:52:14 +08:00
2025-06-18 18:00:49 +08:00
2025-03-15 19:10:12 +08:00
2024-11-18 18:52:14 +08:00
2025-04-28 11:25:04 +08:00
2025-06-12 17:25:25 +08:00
2025-06-18 21:23:06 +08:00
2025-06-19 15:16:26 +08:00
2025-03-11 22:00:31 +08:00
2025-06-18 18:00:49 +08:00
2025-06-18 11:06:15 +08:00
2025-06-18 18:00:49 +08:00
2025-06-19 08:57:34 +08:00
2025-06-21 20:24:52 +08:00
2025-06-13 20:51:20 +08:00
2025-06-19 11:53:42 +08:00
2025-06-13 12:28:26 +08:00
2025-06-19 11:53:47 +08:00
2025-06-19 11:53:42 +08:00
2024-09-25 17:15:59 +08:00
2025-06-22 16:35:30 +08:00
2025-06-20 17:48:55 +08:00
2025-06-15 02:54:54 +08:00
2024-01-13 01:32:23 +08:00
2025-06-16 22:15:12 +08:00
2025-02-10 20:52:33 +08:00