feat: 自行开发设计 ui样式优化 超管端-控制台 相关的页面
This commit is contained in:
@@ -19,8 +19,11 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
|
||||
import React from 'react';
|
||||
import { Tabs, TabPane, Tag } from '@/components/ui';
|
||||
import { Button } from 'antd';
|
||||
import { Plus } from 'lucide-react';
|
||||
import { CHANNEL_OPTIONS } from '../../../constants';
|
||||
import { getChannelIcon } from '../../../helpers';
|
||||
import { getChannelIcon, isRoot } from '../../../helpers';
|
||||
import './channels-tabs.css';
|
||||
|
||||
const ChannelsTabs = ({
|
||||
enableTagMode,
|
||||
@@ -33,9 +36,30 @@ const ChannelsTabs = ({
|
||||
pageSize,
|
||||
idSort,
|
||||
setActivePage,
|
||||
setEditingChannel,
|
||||
setShowEdit,
|
||||
t,
|
||||
}) => {
|
||||
if (enableTagMode) return null;
|
||||
const createButton = isRoot() ? (
|
||||
<Button
|
||||
className='console-create-action'
|
||||
type='primary'
|
||||
size='middle'
|
||||
icon={<Plus size={16} />}
|
||||
onClick={() => {
|
||||
setEditingChannel({ id: undefined });
|
||||
setShowEdit(true);
|
||||
}}
|
||||
>
|
||||
{t('创建渠道')}
|
||||
</Button>
|
||||
) : null;
|
||||
|
||||
if (enableTagMode) {
|
||||
return createButton ? (
|
||||
<div className='flex justify-end'>{createButton}</div>
|
||||
) : null;
|
||||
}
|
||||
|
||||
const handleTabChange = (key) => {
|
||||
setActiveTypeKey(key);
|
||||
@@ -46,10 +70,10 @@ const ChannelsTabs = ({
|
||||
return (
|
||||
<Tabs
|
||||
activeKey={activeTypeKey}
|
||||
type='card'
|
||||
collapsible
|
||||
type='line'
|
||||
onChange={handleTabChange}
|
||||
className='mb-2'
|
||||
className='channels-tabs mb-2'
|
||||
tabBarExtraContent={createButton}
|
||||
>
|
||||
<TabPane
|
||||
itemKey='all'
|
||||
|
||||
Reference in New Issue
Block a user