创建界面(createWindow.ts):更新hash为options.hash的子字符串

♻️ 重构组件(FooterMenu/index.tsx):移除数据库配置组件
♻️ 重构组件(Search/index.tsx):更新'配置信息'文本为'点击配置',添加CSS样式 cursor-pointer
This commit is contained in:
yuruo
2024-06-24 10:35:08 +08:00
parent 9037a0a4a3
commit ac5054d6c0
3 changed files with 5 additions and 8 deletions

View File

@@ -46,7 +46,7 @@ export function createWindow(options: OptionsType): BrowserWindow { // Create t
pathname: join(__dirname, '../renderer/index.html'),
protocol: 'file',
slashes: true,
hash: 'config/category/contentList'
hash: options.hash?.substring(1)
})
)
}

View File

@@ -1,5 +1,5 @@
import { Add, DatabaseConfig } from '@icon-park/react'
import { Link, useSubmit } from 'react-router-dom'
import { Add } from '@icon-park/react'
import { useSubmit } from 'react-router-dom'
export const FooterMenu = () => {
const submit = useSubmit()
@@ -9,9 +9,6 @@ export const FooterMenu = () => {
<Add theme="outline" size="20" fill="#333" onClick={(_e)=>
submit(null, {method:'POST'})
}/>
<Link to="/config">
<DatabaseConfig theme="outline" size="20" fill="#333"/>
</Link>
</div>
</>
)

View File

@@ -24,9 +24,9 @@ export default function Search(): JSX.Element {
autoFocus
/>
</div>
<section className="text-center text-slate-600 text-xs mt-2 no-drag">
<section className="text-center text-slate-600 text-xs mt-2 no-drag select-none">
autoMate
<span className="text-blue-600" onClick={()=>window.api.openWindow('config')}></span>
<span className="text-blue-600 cursor-pointer" onClick={()=>window.api.openWindow('config')}></span>
</section>
</main>
)