[PR #5421] [MERGED] feat: replace notification checkboxes with card-based layout #5877

Closed
opened 2026-11-02 04:04:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5421
Author: @Ssentiago
Created: 6/17/2026
Status: ✅ Merged
Merged: 6/20/2026
Merged by: @MHSanaei

Base: main ← Head: feat/notification-cards-ui


📝 Commits (1)

  • 591c6c1 feat: replace notification checkboxes with card-based layout

📊 Changes

13 files changed (+365 additions, -162 deletions)

View changed files

➖ frontend/src/components/ui/EventBusCheckboxes.tsx (+0 -147)
📝 frontend/src/components/ui/index.ts (+0 -1)
➕ frontend/src/components/ui/notifications/EmailNotifications.tsx (+94 -0)
➕ frontend/src/components/ui/notifications/NotificationCard.tsx (+23 -0)
➕ frontend/src/components/ui/notifications/NotificationEvent.tsx (+26 -0)
➕ frontend/src/components/ui/notifications/NotificationGroup.tsx (+60 -0)
➕ frontend/src/components/ui/notifications/NotificationHeader.tsx (+27 -0)
➕ frontend/src/components/ui/notifications/NotificationLayout.tsx (+13 -0)
➕ frontend/src/components/ui/notifications/TelegramNotifications.tsx (+94 -0)
➕ frontend/src/components/ui/notifications/index.ts (+8 -0)
➕ frontend/src/components/ui/notifications/types.ts (+14 -0)
📝 frontend/src/pages/settings/EmailTab.tsx (+3 -7)
📝 frontend/src/pages/settings/TelegramTab.tsx (+3 -7)

📄 Description

Related to closed #5326

Summary

Replace the event notification checkboxes with a card-based layout. Each event group (Outbound, Xray, Node, System, Security) gets its own card with a grid layout, group-level master checkbox, and inline parameter inputs.

Why

The old EventBusCheckboxes component used accordion + inline inputs that were confusing:

  • No clear labels for parameter inputs (CPU threshold)
  • Collapsed groups hidden important options
  • Hard to scan at a glance
  • Not extensible: adding multiple configurable options per event required modifying the generic extra prop pattern, leading to tangled logic

The new card-based layout:

  • Shows all groups at once in a responsive grid
  • Each group is a self-contained card with clear header
  • Parameter inputs appear below their checkbox when enabled
  • Easy to extend: add a new event with custom input by writing one extra render function in the config

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

What changed

  • Deleted EventBusCheckboxes component
  • Added frontend/src/components/ui/notifications/ directory with:
    • types.ts — NotificationEventConfig, NotificationGroupConfig interfaces
    • NotificationLayout.tsx — CSS Grid container (auto-fit, minmax(260px, 1fr))
    • NotificationCard.tsx — Ant Design Card wrapper with theme-adaptive borders
    • NotificationHeader.tsx — Group header with icon, name, counter, master checkbox
    • NotificationEvent.tsx — Checkbox + optional children (for parameter inputs)
    • NotificationGroup.tsx — Renders a group of events using config
    • TelegramNotifications.tsx — Telegram-specific event groups and toggle logic
    • EmailNotifications.tsx — Email-specific event groups and toggle logic
  • Update TelegramTab.tsx to use TelegramNotifications
  • Update EmailTab.tsx to use EmailNotifications

Screenshots / recordings

image

Breaking changes

None. This is a UI-only change.


🔄 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/5421 **Author:** [@Ssentiago](https://github.com/Ssentiago) **Created:** 6/17/2026 **Status:** ✅ Merged **Merged:** 6/20/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `feat/notification-cards-ui` --- ### 📝 Commits (1) - [`591c6c1`](https://github.com/MHSanaei/3x-ui/commit/591c6c133e7996c44e167e579f546fe7b79beda6) feat: replace notification checkboxes with card-based layout ### 📊 Changes **13 files changed** (+365 additions, -162 deletions) <details> <summary>View changed files</summary> ➖ `frontend/src/components/ui/EventBusCheckboxes.tsx` (+0 -147) 📝 `frontend/src/components/ui/index.ts` (+0 -1) ➕ `frontend/src/components/ui/notifications/EmailNotifications.tsx` (+94 -0) ➕ `frontend/src/components/ui/notifications/NotificationCard.tsx` (+23 -0) ➕ `frontend/src/components/ui/notifications/NotificationEvent.tsx` (+26 -0) ➕ `frontend/src/components/ui/notifications/NotificationGroup.tsx` (+60 -0) ➕ `frontend/src/components/ui/notifications/NotificationHeader.tsx` (+27 -0) ➕ `frontend/src/components/ui/notifications/NotificationLayout.tsx` (+13 -0) ➕ `frontend/src/components/ui/notifications/TelegramNotifications.tsx` (+94 -0) ➕ `frontend/src/components/ui/notifications/index.ts` (+8 -0) ➕ `frontend/src/components/ui/notifications/types.ts` (+14 -0) 📝 `frontend/src/pages/settings/EmailTab.tsx` (+3 -7) 📝 `frontend/src/pages/settings/TelegramTab.tsx` (+3 -7) </details> ### 📄 Description Related to closed #5326 ## Summary Replace the event notification checkboxes with a card-based layout. Each event group (Outbound, Xray, Node, System, Security) gets its own card with a grid layout, group-level master checkbox, and inline parameter inputs. ## Why The old `EventBusCheckboxes` component used accordion + inline inputs that were confusing: - No clear labels for parameter inputs (CPU threshold) - Collapsed groups hidden important options - Hard to scan at a glance - Not extensible: adding multiple configurable options per event required modifying the generic `extra` prop pattern, leading to tangled logic The new card-based layout: - Shows all groups at once in a responsive grid - Each group is a self-contained card with clear header - Parameter inputs appear below their checkbox when enabled - Easy to extend: add a new event with custom input by writing one `extra` render function in the config ## Type of change - [ ] Bug fix - [x] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [x] Frontend (UI / panel pages) - [ ] Backend (API endpoints, login, settings) - [ ] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## What changed - Deleted `EventBusCheckboxes` component - Added `frontend/src/components/ui/notifications/` directory with: - `types.ts` — `NotificationEventConfig`, `NotificationGroupConfig` interfaces - `NotificationLayout.tsx` — CSS Grid container (`auto-fit, minmax(260px, 1fr)`) - `NotificationCard.tsx` — Ant Design Card wrapper with theme-adaptive borders - `NotificationHeader.tsx` — Group header with icon, name, counter, master checkbox - `NotificationEvent.tsx` — Checkbox + optional children (for parameter inputs) - `NotificationGroup.tsx` — Renders a group of events using config - `TelegramNotifications.tsx` — Telegram-specific event groups and toggle logic - `EmailNotifications.tsx` — Email-specific event groups and toggle logic - Update `TelegramTab.tsx` to use `TelegramNotifications` - Update `EmailTab.tsx` to use `EmailNotifications` ## Screenshots / recordings <img width="1169" height="363" alt="image" src="https://github.com/user-attachments/assets/b09693e0-d67a-40f9-a6f8-d636ca8d994c" /> ## Breaking changes None. This is a UI-only change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:43 +07:00
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#5877
No description provided.