danmu-sim/app/danmu/page.tsx

51 lines
1.7 KiB
TypeScript
Raw Normal View History

2024-04-07 01:53:46 +08:00
import { getToken } from "@/lib/actions/token";
import Controls from "./controls";
2024-04-07 03:23:34 +08:00
import Danmu from "./danmu";
import { listLives } from "@/lib/actions/live";
import { listSongs } from "../songs/actions";
2024-04-07 04:25:19 +08:00
import DanmuProvider from "./provider";
import LiveCheck from "./live-check";
import SongCheck from "./song-check";
import CurrentInput from "./current-input";
2024-04-06 02:12:38 +08:00
2024-04-07 01:53:46 +08:00
export default async function Page() {
const token = await getToken();
2024-04-07 03:23:34 +08:00
const lives = await listLives();
const songs = await listSongs();
2024-04-06 02:12:38 +08:00
return (
2024-04-07 01:53:46 +08:00
<div className="flex flex-col md:flex-row">
2024-04-07 04:25:19 +08:00
<DanmuProvider>
<section className="basis-1/3 card">
<div className="h-[50vh] md:h-[80vh] overflow-auto card bg-base-100 card-bordered m-8">
<div className="card-body">
<div className="card-title"></div>
<LiveCheck lives={lives} />
</div>
2024-04-07 03:23:34 +08:00
</div>
2024-04-07 04:25:19 +08:00
</section>
<section className="basis-1/3 card">
<div className="h-[50vh] md:h-[80vh] overflow-auto card bg-base-100 card-bordered m-8">
<div className="card-body">
<div className="card-title"></div>
<SongCheck songs={songs} />
2024-04-07 01:53:46 +08:00
</div>
2024-04-07 04:25:19 +08:00
</div>
</section>
<section className="basis-1/3 card">
<div className="card-body">
<div className="mockup-browser border">
<div className="mockup-browser-toolbar">
<CurrentInput />
</div>
<div className="divide-y divide-gray-300">
<Controls />
<Danmu token={token} />
</div>
2024-04-06 02:12:38 +08:00
</div>
</div>
2024-04-07 04:25:19 +08:00
</section>
</DanmuProvider>
2024-04-06 02:12:38 +08:00
</div>
);
}