2026-06-20 03:49:58 +08:00
|
|
|
import { useA11yStore } from "@/stores/a11yStore";
|
2026-07-26 06:42:41 +08:00
|
|
|
import { Switch } from "@heroui/react";
|
|
|
|
|
import { SettingCard, SettingRow, PageHeader, SectionTitle } from "@/components/setting";
|
2026-06-20 03:49:58 +08:00
|
|
|
|
|
|
|
|
export function A11ySetting() {
|
|
|
|
|
const { reduceMotion, setReduceMotion, reduceTransparency, setReduceTransparency, highContrast, setHighContrast } = useA11yStore();
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
2026-07-26 06:42:41 +08:00
|
|
|
<PageHeader title="辅助功能" desc="调整动画、透明度与对比度以改善使用体验" />
|
2026-06-20 03:49:58 +08:00
|
|
|
|
|
|
|
|
<div className="space-y-6">
|
|
|
|
|
<div>
|
2026-07-26 06:42:41 +08:00
|
|
|
<SectionTitle>显示</SectionTitle>
|
2026-06-20 03:49:58 +08:00
|
|
|
<div className="space-y-3">
|
2026-07-26 06:42:41 +08:00
|
|
|
<SettingCard>
|
2026-06-20 03:49:58 +08:00
|
|
|
<SettingRow label="减少动画" desc="关闭页面切换动画和背景动效">
|
2026-07-26 06:42:41 +08:00
|
|
|
<Switch isSelected={reduceMotion} onValueChange={setReduceMotion}>
|
|
|
|
|
<Switch.Control>
|
|
|
|
|
<Switch.Thumb />
|
|
|
|
|
</Switch.Control>
|
|
|
|
|
</Switch>
|
2026-06-20 03:49:58 +08:00
|
|
|
</SettingRow>
|
2026-07-26 06:42:41 +08:00
|
|
|
</SettingCard>
|
2026-06-20 03:49:58 +08:00
|
|
|
|
2026-07-26 06:42:41 +08:00
|
|
|
<SettingCard>
|
2026-06-20 03:49:58 +08:00
|
|
|
<SettingRow label="减少透明度" desc="将磨砂玻璃效果替换为纯色背景,提升可读性">
|
2026-07-26 06:42:41 +08:00
|
|
|
<Switch isSelected={reduceTransparency} onValueChange={setReduceTransparency}>
|
|
|
|
|
<Switch.Control>
|
|
|
|
|
<Switch.Thumb />
|
|
|
|
|
</Switch.Control>
|
|
|
|
|
</Switch>
|
2026-06-20 03:49:58 +08:00
|
|
|
</SettingRow>
|
2026-07-26 06:42:41 +08:00
|
|
|
</SettingCard>
|
2026-06-20 03:49:58 +08:00
|
|
|
|
2026-07-26 06:42:41 +08:00
|
|
|
<SettingCard>
|
2026-06-20 03:49:58 +08:00
|
|
|
<SettingRow label="高对比度" desc="增强文字与背景的对比度,改善可读性">
|
2026-07-26 06:42:41 +08:00
|
|
|
<Switch isSelected={highContrast} onValueChange={setHighContrast}>
|
|
|
|
|
<Switch.Control>
|
|
|
|
|
<Switch.Thumb />
|
|
|
|
|
</Switch.Control>
|
|
|
|
|
</Switch>
|
2026-06-20 03:49:58 +08:00
|
|
|
</SettingRow>
|
2026-07-26 06:42:41 +08:00
|
|
|
</SettingCard>
|
2026-06-20 03:49:58 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|