fix: 优化移动端页面体验

- repos 页面:标题和按钮移动端换行显示,响应式布局优化
- config 页面:移动端无边框,全屏宽度,按钮垂直堆叠
- gitea config 页面:同 config 页面优化
- BuildConfig、RepoCard、Dialog 等组件响应式优化
This commit is contained in:
xiongxiao
2026-03-13 05:39:26 +08:00
committed by cnb
parent a40cc2175e
commit 500ceb2e42
8 changed files with 120 additions and 118 deletions

View File

@@ -31,13 +31,13 @@ export const App = () => {
return <div>Loading...</div>
}
return (
<div className="p-2 flex-col flex gap-2 h-full">
<div className="px-4 h-full scrollbar flex-col flex gap-4 overflow-hidden">
<div className="flex border-b mb-4">
<div className="p-2 md:p-4 flex-col flex gap-2 md:gap-4 h-full">
<div className="px-2 md:px-4 h-full scrollbar flex-col flex gap-3 md:gap-4 overflow-hidden">
<div className="flex border-b overflow-x-auto">
{tabs.map(tab => (
<div
key={tab.key}
className={`px-4 py-2 cursor-pointer ${activeTab === tab.key ? 'border-b-2 border-gray-500' : ''}`}
className={`px-3 md:px-4 py-2 cursor-pointer whitespace-nowrap text-sm md:text-base ${activeTab === tab.key ? 'border-b-2 border-gray-500 font-medium' : ''}`}
onClick={() => {
setActiveTab(tab.key)
history.replaceState(null, '', `?repo=${params.repo}&tab=${tab.key}`)
@@ -49,10 +49,10 @@ export const App = () => {
</div>
{activeTab === 'build' && <BuildConfig />}
{activeTab === 'info' && (
<div className="flex flex-col gap-4 h-full">
<div className="flex flex-col gap-3 md:gap-4 h-full">
<RepoCard repo={repoStore.editRepo} showReturn />
<div className="p-4 border rounded bg-white h-full overflow-auto scrollbar">
<pre className="whitespace-pre-wrap break-all">{JSON.stringify(repoStore.editRepo, null, 2)}</pre>
<div className="p-3 md:p-4 border rounded bg-white h-full overflow-auto scrollbar">
<pre className="whitespace-pre-wrap break-all text-xs md:text-sm">{JSON.stringify(repoStore.editRepo, null, 2)}</pre>
</div>
</div>
)}