From 9100e15e4e9c9b31bb46dc1348d99ec7c9e1383d Mon Sep 17 00:00:00 2001 From: CaIon Date: Fri, 19 Jun 2026 20:09:18 +0800 Subject: [PATCH] feat: add channel sensitive info toggle --- .../components/data-table/toolbar/toolbar.tsx | 42 ++++++++----- .../channels/components/channel-card.tsx | 17 +++++- .../channels/components/channels-columns.tsx | 50 ++++++++++----- .../channels/components/channels-provider.tsx | 5 ++ .../channels/components/channels-table.tsx | 61 ++++++++++++++----- .../components/dialogs/codex-usage-dialog.tsx | 15 ++++- 6 files changed, 141 insertions(+), 49 deletions(-) diff --git a/web/default/src/components/data-table/toolbar/toolbar.tsx b/web/default/src/components/data-table/toolbar/toolbar.tsx index cca09364..636ee94c 100644 --- a/web/default/src/components/data-table/toolbar/toolbar.tsx +++ b/web/default/src/components/data-table/toolbar/toolbar.tsx @@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com */ import * as React from 'react' import { useState, type ReactNode } from 'react' -import { type Table } from '@tanstack/react-table' +import type { Table } from '@tanstack/react-table' import { useDebounce } from '@/hooks' import { ChevronDown, Loader2, X as Cross2Icon } from 'lucide-react' import { useTranslation } from 'react-i18next' @@ -76,6 +76,11 @@ export type DataTableToolbarProps = { * search input and filter chips. */ additionalSearch?: ReactNode + /** + * Extra controls displayed immediately after the filter chips, before the + * right-aligned action cluster. + */ + afterFilters?: ReactNode /** * Whether non-table filters (e.g. `additionalSearch` or `expandable` * inputs) are currently active. Controls Reset button visibility @@ -282,20 +287,25 @@ export function DataTableToolbar(props: DataTableToolbarProps) { // Reset: outline text-only for form mode (always visible, disabled when // nothing to reset); ghost text + X for filter-as-you-type mode (only // visible when active filters exist). - const resetButton = hasSearch ? ( - - ) : isFiltered ? ( - - ) : null + let resetButton: ReactNode = null + if (hasSearch) { + resetButton = ( + + ) + } else if (isFiltered) { + resetButton = ( + + ) + } const searchButton = hasSearch ? (