visual-novel-web/src/app/(main)/character/[id]/chat/page.tsx

49 lines
1.4 KiB
TypeScript
Raw Normal View History

2025-10-28 07:59:26 +00:00
'use client';
import { cn } from '@/lib';
import SettingForm from './Right';
import { useAtom } from 'jotai';
import { settingOpenAtom } from './atoms';
import Main from './Main';
import Left from './Left';
import { Drawer } from '@/components';
import './index.css';
import { ExitFullScreenIcon, FullScreenIcon } from '@/assets/common';
export default function CharacterChat() {
const [settingOpen, setSettingOpen] = useAtom(settingOpenAtom);
console.log('settingOpen', settingOpen);
2025-10-28 07:59:26 +00:00
return (
<div
2025-11-03 10:03:34 +00:00
style={{
background:
'linear-gradient(0deg, rgba(23, 0, 18, 0.6) 0%, rgba(0, 0, 0, 0.1) 100%)',
}}
2025-10-28 07:59:26 +00:00
className="relative flex h-full w-full justify-center overflow-hidden"
>
<Main />
2025-11-03 10:03:34 +00:00
{/* 左侧 */}
<Drawer open={settingOpen} position="left" width={448} destroyOnClose>
<Left />
</Drawer>
{/* 右侧设置 */}
<Drawer open={settingOpen} position="right" width={448} destroyOnClose>
<SettingForm />
</Drawer>
2025-10-28 07:59:26 +00:00
{/* 设置按钮 */}
<div
className={cn(
2025-11-03 10:03:34 +00:00
'absolute top-8 right-10 h-10 w-10 select-none hover:cursor-pointer',
2025-10-28 07:59:26 +00:00
'text-text-color/10 hover:text-text-color/20'
)}
onClick={() => setSettingOpen(!settingOpen)}
>
{settingOpen ? <FullScreenIcon /> : <ExitFullScreenIcon />}
</div>
</div>
);
}