Files
clash-verge-rev/src/components/setting/mods/stack-mode-switch.tsx
T
Tunglies ce963d175a feat(tun): support mips stack from mihomo v1.19.31
Add `mips` to the TUN stack switch so the stack shipped in mihomo
v1.19.31 is selectable from the GUI. Older cores reject the value,
which the changelog entry discloses.
2026-09-15 00:50:20 +08:00

44 lines
1.2 KiB
TypeScript

import { Button, ButtonGroup } from '@mui/material'
interface Props {
value?: string
onChange?: (value: string) => void
}
export const StackModeSwitch = (props: Props) => {
const { value, onChange } = props
return (
<ButtonGroup size="small" sx={{ my: '4px' }}>
<Button
variant={value?.toLowerCase() === 'system' ? 'contained' : 'outlined'}
onClick={() => onChange?.('system')}
sx={{ textTransform: 'capitalize' }}
>
System
</Button>
<Button
variant={value?.toLowerCase() === 'gvisor' ? 'contained' : 'outlined'}
onClick={() => onChange?.('gvisor')}
sx={{ textTransform: 'capitalize' }}
>
gVisor
</Button>
<Button
variant={value?.toLowerCase() === 'mixed' ? 'contained' : 'outlined'}
onClick={() => onChange?.('mixed')}
sx={{ textTransform: 'capitalize' }}
>
Mixed
</Button>
<Button
variant={value?.toLowerCase() === 'mips' ? 'contained' : 'outlined'}
onClick={() => onChange?.('mips')}
sx={{ textTransform: 'capitalize' }}
>
Mips
</Button>
</ButtonGroup>
)
}