From bc371778b6a27e6bd327859655ad157c3df4d5b1 Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Mon, 23 Jun 2025 23:40:34 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20feat:=20add=20enabled/disabled?= =?UTF-8?q?=20channel=20filtering=20&=20optimize=20type-based=20pagination?= =?UTF-8?q?=20(#1289)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WHAT’S NEW • Backend – Introduced `parseStatusFilter` helper to normalize `status` query across handlers. – `GET /api/channel` & `GET /api/channel/search` now accept `status=enabled|disabled` to return only enabled or disabled channels. – Tag-mode branch respects both `statusFilter` and `typeFilter`; SQL paths trimmed to one query + one lightweight `GROUP BY` for `type_counts`. • Frontend (`ChannelsTable.js`) – Added “Status Filter” ` { + localStorage.setItem('channel-status-filter', v); + setStatusFilter(v); + setActivePage(1); + loadChannels(1, pageSize, idSort, enableTagMode, activeTypeKey, v); + }} + size="small" + > + {t('全部')} + {t('已启用')} + {t('已禁用')} + + diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index d7f87efd..b3b5b37a 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -1732,5 +1732,6 @@ "确认冲突项修改": "Confirm conflict item modification", "该模型存在固定价格与倍率计费方式冲突,请确认选择": "The model has a fixed price and ratio billing method conflict, please confirm the selection", "当前计费": "Current billing", - "修改为": "Modify to" + "修改为": "Modify to", + "状态筛选": "Status filter" } \ No newline at end of file