[feat] fps test results gathering

This commit is contained in:
2025-11-05 13:20:50 +08:00
parent c19adcc3f8
commit ce410f7a26
17 changed files with 363 additions and 116 deletions

View File

@@ -5,7 +5,11 @@ import { Chip, Code, Skeleton } from "@heroui/react"
import useSWR from "swr"
export default function Page() {
return <CfgxList />
return (
<section className="flex flex-col gap-4 overflow-hidden">
<CfgxList />
</section>
)
}
function CfgxList() {

View File

@@ -28,7 +28,7 @@ export default function Page() {
radius="full"
classNames={{
base: "min-w-0",
tabList: "gap-1",
tabList: "gap-0 p-0",
tab: "min-w-0 px-3",
tabContent: "text-xs",
}}

View File

@@ -12,12 +12,12 @@ import { Refresh, SettingConfig } from "@icon-park/react"
// import { version } from "@tauri-apps/plugin-os"
import { useEffect, useState } from "react"
import { type AllSystemInfo, allSysInfo } from "tauri-plugin-system-info-api"
import { FpsTest } from "@/components/cstb/FpsTest"
export default function Page() {
return (
<section className="flex flex-col gap-4 overflow-hidden rounded-lg">
<div className="flex flex-col gap-4 overflow-y-auto h-full hide-scrollbar">
<Card>
<div className="flex flex-col h-full gap-4 overflow-hidden hide-scrollbar">
<Card className="overflow-hidden">
<CardHeader>
<CardIcon type="menu">
<SettingConfig />
@@ -37,7 +37,6 @@ export default function Page() {
<HardwareInfo />
</CardBody>
</Card>
<FpsTest />
</div>
</section>
)

View File

@@ -10,7 +10,7 @@ import SmartTransfer from "@/components/cstb/SmartTranser"
const Home = () => {
return (
<section className="flex flex-col h-full gap-4">
<section className="flex flex-col h-full gap-4 overflow-hidden">
<div className="flex flex-grow w-full gap-4">
<Notice />
<SmartTransfer />

View File

@@ -12,42 +12,44 @@ export default function Page() {
const githubRepo = process.env.NEXT_PUBLIC_GITHUB_REPO || ""
return (
<div className="flex flex-col items-start gap-4 pt-2 pb-1">
<section className="flex flex-col gap-4 overflow-hidden">
<div className="flex flex-col items-start gap-4 pt-2 pb-1">
<div className="space-y-2">
<p className="text-sm">{app.state.version}</p>
<p className="text-sm">{app.state.hasUpdate ? "有" : "无"}</p>
<p className="text-sm">使{app.state.useMirror ? "是" : "否"}</p>
</div>
<div className="w-full border-t border-zinc-200 dark:border-zinc-800 pt-4">
<h3 className="text-sm font-semibold mb-3"></h3>
{/* <div className="w-full pt-4 border-t border-zinc-200 dark:border-zinc-800">
<h3 className="mb-3 text-sm font-semibold">更新检查</h3>
<UpdateChecker customEndpoint={customEndpoint} githubRepo={githubRepo} />
</div>
</div> */}
<div className="w-full border-t border-zinc-200 dark:border-zinc-800 pt-4 space-y-3">
<h3 className="text-sm font-semibold mb-3"></h3>
<div className="flex flex-col w-full pt-4 space-y-3 border-t border-zinc-200 dark:border-zinc-800">
<h3 className="mb-3 text-sm font-semibold"></h3>
<Switch
isSelected={app.state.autoStart}
size="sm"
onChange={(e) => app.setAutoStart(e.target.checked)}
>
{app.state.autoStart ? "开" : "关"}
</Switch>
<Switch
isSelected={app.state.startHidden}
size="sm"
onChange={(e) => app.setStartHidden(e.target.checked)}
>
{app.state.startHidden ? "开" : "关"}
</Switch>
<Switch
isSelected={app.state.hiddenOnClose}
size="sm"
onChange={(e) => app.setHiddenOnClose(e.target.checked)}
>
{app.state.hiddenOnClose ? "开" : "关"}
</Switch>
</div>
</div>
</div>
</section>
)
}

View File

@@ -5,12 +5,14 @@ export default function Page() {
const steam = useSteamStore()
return (
<div className="flex flex-col items-start gap-3 pt-2 pb-1">
<p>Steam路径{steam.state.steamDir}</p>
<p>{steam.state.cs2Dir}</p>
<p>Steam路径有效{steam.state.steamDirValid ? "是" : "否"}</p>
<p>{steam.state.cs2DirValid ? "是" : "否"}</p>
<p>Steam账号{steam.currentUser()?.account_name || " "}</p>
</div>
<section className="flex flex-col gap-4 overflow-hidden">
<div className="flex flex-col items-start gap-3 pt-2 pb-1">
<p>Steam路{steam.state.steamDir}</p>
<p>{steam.state.cs2Dir}</p>
<p>Steam路径有{steam.state.steamDirValid ? "是" : "否"}</p>
<p>{steam.state.cs2DirValid ? "是" : "否"}</p>
<p>Steam账号{steam.currentUser()?.account_name || " "}</p>
</div>
</section>
)
}

View File

@@ -1,4 +1,8 @@
"use client"
export default function Page() {
return <>Replay</>
return (
<section className="flex flex-col gap-4 overflow-hidden">
<>Replay</>
</section>
)
}

View File

@@ -1,11 +1,15 @@
"use client"
import VideoSetting from "@/components/cstb/VideoSetting"
import { FpsTest } from "@/components/cstb/FpsTest"
export default function Page() {
return (
<section className="flex flex-col h-full gap-4">
<VideoSetting />
<section className="flex flex-col h-full gap-4 overflow-hidden">
<div className="flex flex-col h-full gap-4 overflow-y-auto rounded-lg hide-scrollbar">
<VideoSetting />
<FpsTest />
</div>
</section>
)
}

View File

@@ -1,4 +1,8 @@
"use client"
export default function Page() {
return <div>Users</div>
return (
<section className="flex flex-col gap-4 overflow-hidden">
<div>Users</div>
</section>
)
}