fix:1.优化移动端项目主页的布局
This commit is contained in:
@@ -307,104 +307,120 @@ export default function ProjectList() {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col xs={24} sm={12} md={14}>
|
<Col xs={24} sm={12} md={14}>
|
||||||
{window.innerWidth <= 768 ? (
|
{window.innerWidth <= 768 ? (
|
||||||
// 移动端:按钮分两行显示
|
// 移动端:优化布局
|
||||||
<Space direction="vertical" size={8} style={{ width: '100%' }}>
|
<Space direction="vertical" size={8} style={{ width: '100%' }}>
|
||||||
<Space size={8} style={{ width: '100%' }}>
|
{/* 第一行:主要创建按钮 */}
|
||||||
<Button
|
<Row gutter={8}>
|
||||||
type="primary"
|
<Col span={12}>
|
||||||
size="middle"
|
<Button
|
||||||
icon={<BulbOutlined />}
|
type="primary"
|
||||||
onClick={() => navigate('/inspiration')}
|
size="middle"
|
||||||
style={{
|
icon={<BulbOutlined />}
|
||||||
flex: 1,
|
onClick={() => navigate('/inspiration')}
|
||||||
borderRadius: 8,
|
block
|
||||||
background: 'linear-gradient(135deg, #ffd700 0%, #ff8c00 100%)',
|
style={{
|
||||||
border: 'none',
|
borderRadius: 8,
|
||||||
boxShadow: '0 2px 8px rgba(255, 215, 0, 0.4)',
|
background: 'linear-gradient(135deg, #ffd700 0%, #ff8c00 100%)',
|
||||||
color: '#fff'
|
border: 'none',
|
||||||
}}
|
boxShadow: '0 2px 8px rgba(255, 215, 0, 0.4)',
|
||||||
>
|
color: '#fff',
|
||||||
灵感模式
|
height: 40
|
||||||
</Button>
|
}}
|
||||||
<Button
|
>
|
||||||
type="primary"
|
灵感模式
|
||||||
size="middle"
|
</Button>
|
||||||
icon={<RocketOutlined />}
|
</Col>
|
||||||
onClick={() => navigate('/wizard')}
|
<Col span={12}>
|
||||||
style={{
|
<Button
|
||||||
flex: 1,
|
type="primary"
|
||||||
borderRadius: 8,
|
size="middle"
|
||||||
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
icon={<RocketOutlined />}
|
||||||
border: 'none',
|
onClick={() => navigate('/wizard')}
|
||||||
boxShadow: '0 2px 8px rgba(102, 126, 234, 0.4)'
|
block
|
||||||
}}
|
style={{
|
||||||
>
|
borderRadius: 8,
|
||||||
向导创建
|
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
||||||
</Button>
|
border: 'none',
|
||||||
<Button
|
boxShadow: '0 2px 8px rgba(102, 126, 234, 0.4)',
|
||||||
type="default"
|
height: 40
|
||||||
size="middle"
|
}}
|
||||||
icon={<SettingOutlined />}
|
>
|
||||||
onClick={() => navigate('/settings')}
|
向导创建
|
||||||
style={{
|
</Button>
|
||||||
flex: 1,
|
</Col>
|
||||||
borderRadius: 8,
|
</Row>
|
||||||
borderColor: '#d9d9d9',
|
{/* 第二行:功能按钮 */}
|
||||||
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.08)'
|
<Row gutter={8}>
|
||||||
}}
|
<Col span={8}>
|
||||||
>
|
<Button
|
||||||
API设置
|
type="default"
|
||||||
</Button>
|
size="middle"
|
||||||
<UserMenu />
|
icon={<SettingOutlined />}
|
||||||
</Space>
|
onClick={() => navigate('/settings')}
|
||||||
<Space size={8} style={{ width: '100%' }}>
|
block
|
||||||
<Button
|
style={{
|
||||||
type="default"
|
borderRadius: 8,
|
||||||
size="middle"
|
borderColor: '#d9d9d9',
|
||||||
icon={<DownloadOutlined />}
|
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.08)',
|
||||||
onClick={handleOpenExportModal}
|
height: 36,
|
||||||
disabled={exportableProjects.length === 0}
|
padding: '0 8px'
|
||||||
style={{
|
}}
|
||||||
flex: 1,
|
>
|
||||||
borderRadius: 8,
|
设置
|
||||||
borderColor: '#1890ff',
|
</Button>
|
||||||
color: '#1890ff',
|
</Col>
|
||||||
boxShadow: '0 2px 8px rgba(24, 144, 255, 0.2)'
|
<Col span={8}>
|
||||||
}}
|
<Dropdown
|
||||||
>
|
menu={{
|
||||||
导出
|
items: [
|
||||||
</Button>
|
{
|
||||||
<Button
|
key: 'export',
|
||||||
type="default"
|
label: '导出项目',
|
||||||
size="middle"
|
icon: <DownloadOutlined />,
|
||||||
icon={<UploadOutlined />}
|
onClick: handleOpenExportModal,
|
||||||
onClick={() => setImportModalVisible(true)}
|
disabled: exportableProjects.length === 0
|
||||||
style={{
|
},
|
||||||
flex: 1,
|
{
|
||||||
borderRadius: 8,
|
key: 'import',
|
||||||
borderColor: '#52c41a',
|
label: '导入项目',
|
||||||
color: '#52c41a',
|
icon: <UploadOutlined />,
|
||||||
boxShadow: '0 2px 8px rgba(82, 196, 26, 0.2)'
|
onClick: () => setImportModalVisible(true)
|
||||||
}}
|
},
|
||||||
>
|
{
|
||||||
导入
|
type: 'divider'
|
||||||
</Button>
|
},
|
||||||
<Button
|
{
|
||||||
type="default"
|
key: 'mcp',
|
||||||
size="middle"
|
label: 'MCP插件',
|
||||||
icon={<ApiOutlined />}
|
icon: <ApiOutlined />,
|
||||||
onClick={() => navigate('/mcp-plugins')}
|
onClick: () => navigate('/mcp-plugins')
|
||||||
style={{
|
}
|
||||||
flex: 1,
|
]
|
||||||
borderRadius: 8,
|
}}
|
||||||
borderColor: '#722ed1',
|
placement="bottomRight"
|
||||||
color: '#722ed1',
|
trigger={['click']}
|
||||||
boxShadow: '0 2px 8px rgba(114, 46, 209, 0.2)'
|
>
|
||||||
}}
|
<Button
|
||||||
>
|
size="middle"
|
||||||
MCP
|
icon={<MoreOutlined />}
|
||||||
</Button>
|
block
|
||||||
</Space>
|
style={{
|
||||||
|
borderRadius: 8,
|
||||||
|
borderColor: '#d9d9d9',
|
||||||
|
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.08)',
|
||||||
|
height: 36
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
更多
|
||||||
|
</Button>
|
||||||
|
</Dropdown>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||||
|
<UserMenu />
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
</Space>
|
</Space>
|
||||||
) : (
|
) : (
|
||||||
// PC端:优化后的布局 - 主要按钮 + 下拉菜单
|
// PC端:优化后的布局 - 主要按钮 + 下拉菜单
|
||||||
|
|||||||
Reference in New Issue
Block a user