refactor: update layout of AgentsPage and AppsPage, remove Navbar components

- Refactored AgentsPage and AppsPage to enhance layout by replacing Navbar components with div wrappers.
- Integrated Tailwind CSS for improved styling consistency.
- Adjusted input components for better alignment and spacing.
This commit is contained in:
MyPrototypeWhat 2025-06-09 15:43:34 +08:00
parent 278397f7c8
commit 38330c4c81
4 changed files with 51 additions and 54 deletions

View File

@ -41,6 +41,7 @@ export default defineConfig({
}, },
renderer: { renderer: {
plugins: [ plugins: [
tailwindcssPlugin(),
react({ react({
plugins: [ plugins: [
[ [
@ -54,7 +55,6 @@ export default defineConfig({
] ]
] ]
}), }),
tailwindcssPlugin(),
...visualizerPlugin('renderer') ...visualizerPlugin('renderer')
], ],
resolve: { resolve: {

View File

@ -1,5 +1,4 @@
import { ImportOutlined, PlusOutlined } from '@ant-design/icons' import { ImportOutlined, PlusOutlined } from '@ant-design/icons'
import { Navbar, NavbarCenter } from '@renderer/components/app/Navbar'
import CustomTag from '@renderer/components/CustomTag' import CustomTag from '@renderer/components/CustomTag'
import ListItem from '@renderer/components/ListItem' import ListItem from '@renderer/components/ListItem'
import Scrollbar from '@renderer/components/Scrollbar' import Scrollbar from '@renderer/components/Scrollbar'
@ -152,9 +151,7 @@ const AgentsPage: FC = () => {
return ( return (
<Container> <Container>
<Navbar> <div className="p-4">
<NavbarCenter style={{ borderRight: 'none', justifyContent: 'space-between' }}>
{t('agents.title')}
<Input <Input
placeholder={t('common.search')} placeholder={t('common.search')}
className="nodrag" className="nodrag"
@ -170,9 +167,7 @@ const AgentsPage: FC = () => {
onPressEnter={handleSearch} onPressEnter={handleSearch}
/> />
<div style={{ width: 80 }} /> <div style={{ width: 80 }} />
</NavbarCenter> </div>
</Navbar>
<Main id="content-container"> <Main id="content-container">
<AgentsGroupList> <AgentsGroupList>
{Object.entries(agentGroups).map(([group]) => ( {Object.entries(agentGroups).map(([group]) => (

View File

@ -1,4 +1,3 @@
import { Navbar, NavbarMain } from '@renderer/components/app/Navbar'
import { useMinapps } from '@renderer/hooks/useMinapps' import { useMinapps } from '@renderer/hooks/useMinapps'
import { Button, Input } from 'antd' import { Button, Input } from 'antd'
import { Search, SettingsIcon, X } from 'lucide-react' import { Search, SettingsIcon, X } from 'lucide-react'
@ -41,9 +40,10 @@ const AppsPage: FC = () => {
return ( return (
<Container onContextMenu={handleContextMenu}> <Container onContextMenu={handleContextMenu}>
<Navbar> {/* <Navbar> */}
<NavbarMain> {/* <NavbarMain> */}
{t('minapp.title')} {/* {t('minapp.title')} */}
<div className="p-2">
<Input <Input
placeholder={t('common.search')} placeholder={t('common.search')}
className="nodrag" className="nodrag"
@ -68,8 +68,9 @@ const AppsPage: FC = () => {
icon={isSettingsOpen ? <X size={18} /> : <SettingsIcon size={18} color="var(--color-text-2)" />} icon={isSettingsOpen ? <X size={18} /> : <SettingsIcon size={18} color="var(--color-text-2)" />}
onClick={() => setIsSettingsOpen(!isSettingsOpen)} onClick={() => setIsSettingsOpen(!isSettingsOpen)}
/> />
</NavbarMain> </div>
</Navbar> {/* </NavbarMain> */}
{/* </Navbar> */}
<ContentContainer id="content-container"> <ContentContainer id="content-container">
{isSettingsOpen && <MiniAppSettings />} {isSettingsOpen && <MiniAppSettings />}
{!isSettingsOpen && ( {!isSettingsOpen && (

View File

@ -24,7 +24,8 @@ export default defineConfig({
// 渲染进程单元测试配置 // 渲染进程单元测试配置
{ {
extends: true, extends: true,
plugins: rendererConfig.plugins, // exclude tailwindcss plugin
plugins: rendererConfig.plugins.slice(1),
resolve: { resolve: {
alias: rendererConfig.resolve.alias alias: rendererConfig.resolve.alias
}, },