[feat] optimization for getting cs2 path + add Toast for auto path

This commit is contained in:
Purp1e
2025-03-23 01:08:50 +08:00
parent ad5a1bd870
commit e7b6d81319
12 changed files with 184 additions and 81 deletions

View File

@@ -1,26 +1,13 @@
"use client"
import SteamUsers from "@/components/cstb/SteamUsers"
import {
Card,
CardBody,
CardHeader,
CardIcon,
CardTool,
} from "@/components/window/Card"
import { ToolButton } from "@/components/window/ToolButton"
import { cn } from "@heroui/react"
import {
AssemblyLine, HardDisk, SettingConfig,
UploadOne
} from "@icon-park/react"
import { usePathname, useRouter } from "next/navigation"
// import { usePathname, useRouter } from "next/navigation"
// import { platform } from "@tauri-apps/plugin-os"
export default function PreferenceLayout({
children,
}: { children: React.ReactNode }) {
const router = useRouter()
const pathname = usePathname()
// const router = useRouter()
// const pathname = usePathname()
return (
<div className="flex w-full gap-3">

View File

@@ -13,13 +13,10 @@ export default function Providers({ children }: { children: React.ReactNode }) {
return (
<HeroUIProvider
className={cn(
"h-full bg-zinc-100/90 dark:bg-zinc-900",
os === "macos" && "rounded-lg",
)}
className={cn("h-full bg-zinc-200/90 dark:bg-zinc-900", os === "macos" && "rounded-lg")}
>
<NextThemesProvider attribute="class" defaultTheme="light">
<ToastProvider toastOffset={10} placement="top-center" />
<ToastProvider toastOffset={10} placement="top-center" toastProps={{ timeout: 3000 }} />
{children}
</NextThemesProvider>
</HeroUIProvider>