切换按钮样式

This commit is contained in:
北枳 2025-09-18 21:45:34 +08:00
parent de2c08f243
commit ee3a866a27

View File

@ -392,15 +392,14 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
{/* 剧本扩展开关 */}
<Tooltip title="Enable script expansion" placement="top" trigger={isDesktop ? "hover" : "click"}>
<div data-alt="config-expansion-mode" className="flex items-center gap-2 px-2">
{/* <span className="text-sm text-white/80">Script Expansion</span> */}
<Switch
size="small"
checked={configOptions.expansion_mode}
onChange={(checked) => onConfigChange('expansion_mode', checked)}
style={{
backgroundColor: 'rgba(255,255,255,0.45)',
}}
/>
{/* 仅在未选中时显示背景色,避免覆盖选中态 */}
<div className={`${configOptions.expansion_mode ? 'bg-transparent' : 'bg-white/40'} rounded-full p-0.5 transition-colors`}>
<Switch
size="small"
checked={configOptions.expansion_mode}
onChange={(checked) => onConfigChange('expansion_mode', checked)}
/>
</div>
<span className={`text-xs text-white/50`}>
{configOptions.expansion_mode ? 'On' : 'Off'}
</span>