mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
use grid layout
This commit is contained in:
parent
fbd52a40f6
commit
a8e886b9bb
@ -51,11 +51,8 @@ const App: React.FC = () => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="m-2">
|
||||
<div className="grid grid-cols-2 gap-2 mx-2">
|
||||
<OutboundModeSwitcher />
|
||||
</div>
|
||||
{/* <div className="grid">
|
||||
<SysproxySwitcher />
|
||||
<TunSwitcher />
|
||||
<ProfileCard />
|
||||
@ -66,10 +63,10 @@ const App: React.FC = () => {
|
||||
<SniffCard />
|
||||
<LogCard />
|
||||
<RuleCard />
|
||||
<TestCard />
|
||||
<ResourceCard />
|
||||
<OverrideCard />
|
||||
</div> */}
|
||||
<div className="flex justify-between mx-2 mb-2">
|
||||
</div>
|
||||
{/* <div className="flex justify-between mx-2 mb-2">
|
||||
<SysproxySwitcher />
|
||||
<TunSwitcher />
|
||||
</div>
|
||||
@ -91,7 +88,7 @@ const App: React.FC = () => {
|
||||
<div className="flex justify-between mx-2">
|
||||
<ResourceCard />
|
||||
<OverrideCard />
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
<Divider orientation="vertical" />
|
||||
<div className="main w-[calc(100%-251px)] h-full overflow-y-auto">{page}</div>
|
||||
|
||||
@ -26,7 +26,7 @@ const ConnCard: React.FC = () => {
|
||||
return (
|
||||
<Card
|
||||
fullWidth
|
||||
className={`mb-2 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-2 ${match ? 'bg-primary' : ''}`}
|
||||
isPressable
|
||||
onPress={() => navigate('/connections')}
|
||||
>
|
||||
|
||||
@ -20,7 +20,7 @@ const DNSCard: React.FC = () => {
|
||||
|
||||
return (
|
||||
<Card
|
||||
className={`w-[50%] mr-1 mb-2 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-1 ${match ? 'bg-primary' : ''}`}
|
||||
isPressable
|
||||
onPress={() => navigate('/dns')}
|
||||
>
|
||||
|
||||
@ -8,7 +8,7 @@ const LogCard: React.FC = () => {
|
||||
const match = location.pathname.includes('/logs')
|
||||
return (
|
||||
<Card
|
||||
className={`w-[50%] mr-1 mb-2 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-1 ${match ? 'bg-primary' : ''}`}
|
||||
isPressable
|
||||
onPress={() => navigate('/logs')}
|
||||
>
|
||||
|
||||
@ -35,7 +35,7 @@ const MihomoCoreCard: React.FC = () => {
|
||||
fullWidth
|
||||
isPressable
|
||||
onPress={() => navigate('/mihomo')}
|
||||
className={`mb-2 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-2 ${match ? 'bg-primary' : ''}`}
|
||||
>
|
||||
<CardBody>
|
||||
<div className="flex justify-between h-[32px]">
|
||||
|
||||
@ -22,6 +22,7 @@ const OutboundModeSwitcher: React.FC = () => {
|
||||
<Tabs
|
||||
fullWidth
|
||||
color="primary"
|
||||
className="col-span-2"
|
||||
selectedKey={mode}
|
||||
onSelectionChange={(key: Key) => onChangeMode(key as OutboundMode)}
|
||||
>
|
||||
|
||||
@ -12,7 +12,7 @@ const OverrideCard: React.FC = () => {
|
||||
|
||||
return (
|
||||
<Card
|
||||
className={`w-[50%] ml-1 mb-2 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-1 ${match ? 'bg-primary' : ''}`}
|
||||
isPressable
|
||||
onPress={() => navigate('/override')}
|
||||
>
|
||||
|
||||
@ -36,7 +36,7 @@ const ProfileCard: React.FC = () => {
|
||||
{showRuntimeConfig && <ConfigViewer onClose={() => setShowRuntimeConfig(false)} />}
|
||||
<Card
|
||||
fullWidth
|
||||
className={`mb-2 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-2 ${match ? 'bg-primary' : ''}`}
|
||||
isPressable
|
||||
onPress={() => navigate('/profiles')}
|
||||
>
|
||||
|
||||
@ -18,7 +18,7 @@ const ProxyCard: React.FC = () => {
|
||||
return (
|
||||
<Card
|
||||
fullWidth
|
||||
className={`mb-2 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-2 ${match ? 'bg-primary' : ''}`}
|
||||
isPressable
|
||||
onPress={() => navigate('/proxies')}
|
||||
>
|
||||
|
||||
@ -10,7 +10,7 @@ const ResourceCard: React.FC = () => {
|
||||
|
||||
return (
|
||||
<Card
|
||||
className={`w-[50%] mr-1 mb-2 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-1 ${match ? 'bg-primary' : ''}`}
|
||||
isPressable
|
||||
onPress={() => navigate('/resources')}
|
||||
>
|
||||
|
||||
@ -14,7 +14,7 @@ const RuleCard: React.FC = () => {
|
||||
|
||||
return (
|
||||
<Card
|
||||
className={`w-[50%] ml-1 mb-2 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-1 ${match ? 'bg-primary' : ''}`}
|
||||
isPressable
|
||||
onPress={() => navigate('/rules')}
|
||||
>
|
||||
|
||||
@ -20,7 +20,7 @@ const SniffCard: React.FC = () => {
|
||||
|
||||
return (
|
||||
<Card
|
||||
className={`w-[50%] ml-1 mb-2 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-1 ${match ? 'bg-primary' : ''}`}
|
||||
isPressable
|
||||
onPress={() => navigate('/sniffer')}
|
||||
>
|
||||
|
||||
@ -25,7 +25,7 @@ const SysproxySwitcher: React.FC = () => {
|
||||
|
||||
return (
|
||||
<Card
|
||||
className={`w-[50%] mr-1 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-1 ${match ? 'bg-primary' : ''}`}
|
||||
isPressable
|
||||
onPress={() => navigate('/sysproxy')}
|
||||
>
|
||||
|
||||
@ -52,7 +52,7 @@ const TunSwitcher: React.FC = () => {
|
||||
/>
|
||||
)}
|
||||
<Card
|
||||
className={`w-[50%] ml-1 ${match ? 'bg-primary' : ''}`}
|
||||
className={`col-span-1 ${match ? 'bg-primary' : ''}`}
|
||||
isPressable
|
||||
onPress={() => navigate('/tun')}
|
||||
>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user