1. 22 Jun, 2025 4 commits
    • feat(ui): Implement unified compact/adaptive table mode + icon refinement · 6bd4e202
      Summary
      • Added per-table “Compact / Adaptive” view toggle to all major table components (Tokens, Channels, Logs, MjLogs, TaskLogs, Redemptions, Users).
      • Persist user preference in a single localStorage entry (`table_compact_modes`) instead of scattered keys.
      
      Details
      1. utils.js
         • Re-implemented `getTableCompactMode` / `setTableCompactMode` to read & write a shared JSON object.
         • Imported storage-key constant from `constants`.
      
      2. hooks/useTableCompactMode.js
         • Hook now consumes the unified helpers and listens to `storage` events via the shared key constant.
      
      3. constants
         • Added `TABLE_COMPACT_MODES_KEY` to `common.constant.js` and re-exported via `constants/index.js`.
      
      4. Table components
         • Integrated `useTableCompactMode('<tableName>')`.
         • Dynamically remove `fixed: 'right'` column and horizontal `scroll` when in compact mode.
         • UI: toggle button placed at card title’s right; responsive layout on small screens.
      
      5. UI polish
         • Replaced all lucide-react `List`/`ListIcon` usages with Semi UI `IconDescend` for consistency.
         • Restored correct icons where `Hash` was intended (TaskLogsTable).
      
      Benefits
      • Consistent UX for switching list density across the app.
      • Cleaner localStorage footprint with easier future maintenance.
      t0ng7u committed
    • feat(tokens-table): add selectable copy modes for bulk token copy action · d11798cc
      This commit enhances the “Copy Selected Tokens to Clipboard” feature in `TokensTable.js` by introducing a user-friendly modal that lets users choose how they want to copy tokens.
      
      Changes made
      • Replaced direct copy logic with a `Modal.info` dialog.
      • Modal displays the prompt “Please choose your copy mode”.
      • Added two buttons in a custom footer:
        – **Name + Secret**: copies `tokenName    sk-tokenKey`.
        – **Secret Only**: copies `sk-tokenKey`.
      • Each button triggers the copy operation and closes the dialog.
      • Maintains existing validations (e.g., selection check, clipboard feedback).
      
      Benefits
      • Gives users clear control over copy format, reducing manual editing.
      • Aligns UI with Semi UI’s best practices via custom modal footer.
      
      No backend/API changes are involved; all updates are limited to the front-end UI logic.
      t0ng7u committed
    • 🗑️ feat(token): implement batch token deletion API & front-end integration · 1ad9c97d
      • 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.
      t0ng7u committed
  2. 21 Jun, 2025 21 commits
  3. 20 Jun, 2025 15 commits