/* Copyright (C) 2025 QuantumNous This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ import React from 'react'; import { Button, Dropdown, Modal, Switch, Typography, Select, } from '@douyinfe/semi-ui'; import CompactModeToggle from '../../common/ui/CompactModeToggle'; const ChannelsActions = ({ enableBatchDelete, batchDeleteChannels, setShowBatchSetTag, testAllChannels, fixChannelsAbilities, updateAllChannelsBalance, deleteAllDisabledChannels, compactMode, setCompactMode, idSort, setIdSort, setEnableBatchDelete, enableTagMode, setEnableTagMode, statusFilter, setStatusFilter, getFormValues, loadChannels, searchChannels, activeTypeKey, activePage, pageSize, setActivePage, t, }) => { return (
{/* 第一行:批量操作按钮 + 设置开关 */}
{/* 左侧:批量操作按钮 */}
} >
{/* 右侧:设置开关区域 */}
{t('使用ID排序')} { localStorage.setItem('id-sort', v + ''); setIdSort(v); const { searchKeyword, searchGroup, searchModel } = getFormValues(); if ( searchKeyword === '' && searchGroup === '' && searchModel === '' ) { loadChannels(activePage, pageSize, v, enableTagMode); } else { searchChannels( enableTagMode, activeTypeKey, statusFilter, activePage, pageSize, v, ); } }} />
{t('开启批量操作')} { localStorage.setItem('enable-batch-delete', v + ''); setEnableBatchDelete(v); }} />
{t('标签聚合模式')} { localStorage.setItem('enable-tag-mode', v + ''); setEnableTagMode(v); setActivePage(1); loadChannels(1, pageSize, idSort, v); }} />
{t('状态筛选')}
); }; export default ChannelsActions;