[feat] basic path selection + common dir notification
This commit is contained in:
@@ -70,20 +70,20 @@ interface CfgxCardProps {
|
||||
|
||||
function CfgxCard(props: CfgxCardProps) {
|
||||
return (
|
||||
<li className="flex flex-col gap-2 p-4 rounded-md bg-zinc-50 ">
|
||||
<li className="flex flex-col gap-2 p-4 rounded-md bg-zinc-50 dark:bg-zinc-900">
|
||||
<span className="flex items-center gap-3">
|
||||
<h3 className="text-xl font-semibold">{props.title}</h3>
|
||||
<Chip size="sm" className="bg-zinc-200">
|
||||
<Chip size="sm" className="bg-zinc-200 dark:bg-zinc-800">
|
||||
{props.version}
|
||||
</Chip>
|
||||
<Chip size="sm" className="bg-zinc-200">
|
||||
<Chip size="sm" className="bg-zinc-200 dark:bg-zinc-800">
|
||||
{props.author}
|
||||
</Chip>
|
||||
</span>
|
||||
<p className="text-zinc-600">{props.description}</p>
|
||||
<p className="text-zinc-600 dark:text-zinc-300">{props.description}</p>
|
||||
<Code className="p-3 whitespace-pre-line">{props.content}</Code>
|
||||
{props.alias_list && (
|
||||
<p className="text-zinc-600">
|
||||
<p className="text-zinc-600 dark:text-zinc-300">
|
||||
{props.alias_list.id} {props.alias_list.info} {props.alias_list.value}
|
||||
</p>
|
||||
)}
|
||||
|
||||
@@ -11,7 +11,7 @@ export default function PreferenceLayout({
|
||||
const pathname = usePathname()
|
||||
|
||||
return (
|
||||
<Card className="h-full max-w-full overflow-y-scroll">
|
||||
<Card className="h-full max-w-full">
|
||||
<CardHeader>
|
||||
<CardIcon
|
||||
type="menu"
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function PreferenceLayout({
|
||||
const pathname = usePathname()
|
||||
|
||||
return (
|
||||
<Card className="max-w-full overflow-y-scroll">
|
||||
<Card className="max-w-full">
|
||||
<CardHeader>
|
||||
<CardIcon
|
||||
type="menu"
|
||||
|
||||
64
src/app/(main)/users/layout.tsx
Normal file
64
src/app/(main)/users/layout.tsx
Normal file
@@ -0,0 +1,64 @@
|
||||
"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,
|
||||
Videocamera,
|
||||
} from "@icon-park/react"
|
||||
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()
|
||||
|
||||
return (
|
||||
<div className="flex w-full gap-3">
|
||||
<Card className="flex-grow max-w-ful">
|
||||
<CardHeader>
|
||||
<CardIcon
|
||||
type="menu"
|
||||
onClick={() => router.push("/preference/general")}
|
||||
className={cn(pathname === "/preference/general" && "bg-black/5")}
|
||||
>
|
||||
<SettingConfig /> 通用
|
||||
</CardIcon>
|
||||
<CardIcon
|
||||
type="menu"
|
||||
onClick={() => router.push("/preference/path")}
|
||||
className={cn(pathname === "/preference/path" && "bg-black/5")}
|
||||
>
|
||||
<AssemblyLine /> 路径
|
||||
</CardIcon>
|
||||
|
||||
<CardTool>
|
||||
<ToolButton>
|
||||
<UploadOne />
|
||||
云同步
|
||||
</ToolButton>
|
||||
{/* <ToolButton>
|
||||
<HardDisk />
|
||||
保存
|
||||
</ToolButton> */}
|
||||
</CardTool>
|
||||
</CardHeader>
|
||||
<CardBody>{children}</CardBody>
|
||||
</Card>
|
||||
{/* Steam用户区域 */}
|
||||
<SteamUsers />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user