[PR #7084] feat(clients): tint rows and cards of depleting and ended clients #6638

Open
opened 2026-11-07 14:34:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/7084
Author: @Mo7amadd
Created: 11/5/2026
Status: 🔄 Open

Base: main ← Head: feat/clients-status-tint


📝 Commits (1)

  • 130c4b8 feat(clients): tint rows and cards of depleting and ended clients

📊 Changes

2 files changed (+59 additions, -4 deletions)

View changed files

📝 frontend/src/pages/clients/ClientsPage.css (+42 -0)
📝 frontend/src/pages/clients/ClientsPage.tsx (+17 -4)

📄 Description

Summary

Clients whose bucket is expiring get the warning background and depleted the error background, on the desktop table rows and on the mobile cards.

Why

Both states are already shown, but only as a small tag in one cell. In a list of 100+ clients that is easy to miss when you are scanning for who needs a renewal. A tinted row is visible at a glance without filtering.

What changed

  • ClientsPage.tsx: a rowClassName callback on the desktop <Table> and the same two classes on the mobile card, both derived from the existing clientBucket, so the tint always agrees with the Online tag and the summary counters.
  • ClientsPage.css: backgrounds from antd's own tokens (--ant-color-warning-bg / --ant-color-error-bg, their -hover variants for the table, and the matching -border for cards), so light, dark and ultra-dark themes all work without extra rules. Selected rows and cards keep antd's selection colour (:not(.ant-table-row-selected) / :not(.is-selected)).

Type of change

  • New feature

Areas affected

  • Frontend (UI / panel pages)

How was this tested?

  • npm run typecheck, npm run lint, npm run format:check, npm run build and npm run build-storybook pass; the existing unit and component suites pass.
  • No automated test: the change is a class name plus CSS, and the bucket logic it reads is unchanged. The manual check that demonstrates it, in npm run dev with a mocked API covering all four buckets: rows and cards for expiring and depleted are tinted, active and deactive are not, hover keeps the tint, selecting a row switches it to the selection colour, and the same holds in the dark and ultra-dark themes.

Screenshots / recordings

rows-light cards-mobile-light

Breaking changes

None.

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable). (CSS only; see above.)
  • go build ./... and the test suite pass locally. (Frontend-only change; no Go code touched, so the Go suite was not run.)
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/7084 **Author:** [@Mo7amadd](https://github.com/Mo7amadd) **Created:** 11/5/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/clients-status-tint` --- ### 📝 Commits (1) - [`130c4b8`](https://github.com/MHSanaei/3x-ui/commit/130c4b80102a7ad89a56ccf094a5379cf2a708c6) feat(clients): tint rows and cards of depleting and ended clients ### 📊 Changes **2 files changed** (+59 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/pages/clients/ClientsPage.css` (+42 -0) 📝 `frontend/src/pages/clients/ClientsPage.tsx` (+17 -4) </details> ### 📄 Description ## Summary Clients whose bucket is `expiring` get the warning background and `depleted` the error background, on the desktop table rows and on the mobile cards. ## Why Both states are already shown, but only as a small tag in one cell. In a list of 100+ clients that is easy to miss when you are scanning for who needs a renewal. A tinted row is visible at a glance without filtering. ## What changed - `ClientsPage.tsx`: a `rowClassName` callback on the desktop `<Table>` and the same two classes on the mobile card, both derived from the existing `clientBucket`, so the tint always agrees with the Online tag and the summary counters. - `ClientsPage.css`: backgrounds from antd's own tokens (`--ant-color-warning-bg` / `--ant-color-error-bg`, their `-hover` variants for the table, and the matching `-border` for cards), so light, dark and ultra-dark themes all work without extra rules. Selected rows and cards keep antd's selection colour (`:not(.ant-table-row-selected)` / `:not(.is-selected)`). ## Type of change - [x] New feature ## Areas affected - [x] Frontend (UI / panel pages) ## How was this tested? - `npm run typecheck`, `npm run lint`, `npm run format:check`, `npm run build` and `npm run build-storybook` pass; the existing unit and component suites pass. - No automated test: the change is a class name plus CSS, and the bucket logic it reads is unchanged. The manual check that demonstrates it, in `npm run dev` with a mocked API covering all four buckets: rows and cards for `expiring` and `depleted` are tinted, `active` and `deactive` are not, hover keeps the tint, selecting a row switches it to the selection colour, and the same holds in the dark and ultra-dark themes. ## Screenshots / recordings <img width="1290" height="700" alt="rows-light" src="https://github.com/user-attachments/assets/cb789e14-bfb7-441c-9edf-83b5cf86659b" /> <img width="1170" height="1745" alt="cards-mobile-light" src="https://github.com/user-attachments/assets/2184a166-5c1f-438a-b491-93af071d88f6" /> ## Breaking changes None. ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [ ] I added or updated tests for the new behavior (when applicable). *(CSS only; see above.)* - [ ] `go build ./...` and the test suite pass locally. *(Frontend-only change; no Go code touched, so the Go suite was not run.)* - [x] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6638
No description provided.