/* 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 } from '@/components/ui'; import CompactModeToggle from '../../common/ui/CompactModeToggle'; import { isRoot } from '../../../helpers'; // 批量删除/删除禁用渠道的确认文案:批量场景不逐个查反向引用,给固定影响说明 const renderBatchDeleteContent = (t) => (
{t('此修改将不可逆')}
{t('被删除的渠道若被其他渠道列为兜底,会自动从这些兜底链中移除')}
); const ChannelsActions = ({ selectedChannels, batchDeleteChannels, setShowBatchSetTag, testAllChannels, fixChannelsAbilities, updateAllChannelsBalance, deleteAllDisabledChannels, compactMode, setCompactMode, idSort, enableTagMode, setEnableTagMode, loadChannels, pageSize, setActivePage, t, }) => { return (
{/* 第一行:批量操作按钮 + 设置开关 */}
{/* 左侧:批量操作按钮 */}
{isRoot() && ( )} {isRoot() && ( )} {isRoot() && ( )} {isRoot() && ( )} {isRoot() && ( )} {isRoot() && ( )} } >
{/* 右侧:设置开关区域 */}
{t('标签聚合模式')} { localStorage.setItem('enable-tag-mode', v + ''); setEnableTagMode(v); setActivePage(1); loadChannels(1, pageSize, idSort, v); }} />
); }; export default ChannelsActions;