[chore] update styles and remove path select tests at launch page
This commit is contained in:
@@ -11,6 +11,7 @@ body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
||||
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
||||
border-radius: 10px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
a {
|
||||
|
||||
@@ -15,7 +15,7 @@ export default function RootLayout({
|
||||
}) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className="bg-[rgba(242, 241, 243, 0.65)] dark:bg-zinc-900">
|
||||
<body className="bg-zinc-100 dark:bg-zinc-900">
|
||||
<Providers>{children}</Providers>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,44 +1,46 @@
|
||||
"use client"
|
||||
|
||||
import { open } from "@tauri-apps/plugin-dialog"
|
||||
import { Button } from "@heroui/react"
|
||||
// import { open } from "@tauri-apps/plugin-dialog"
|
||||
import { useRouter } from "next/navigation"
|
||||
import React from "react"
|
||||
|
||||
const Home = () => {
|
||||
const router = useRouter()
|
||||
const [file, setFile] = React.useState<string | null>("")
|
||||
// const [file, setFile] = React.useState<string | null>("")
|
||||
|
||||
const openFile = async () => {
|
||||
const filePath = await open({
|
||||
multiple: true,
|
||||
directory: false,
|
||||
})
|
||||
// const openFile = async () => {
|
||||
// const filePath = await open({
|
||||
// multiple: true,
|
||||
// directory: false,
|
||||
// })
|
||||
|
||||
setFile(filePath?.join("\n") || " ")
|
||||
}
|
||||
// setFile(filePath?.join("\n") || " ")
|
||||
// }
|
||||
return (
|
||||
<main
|
||||
className="flex flex-col items-center justify-center w-full h-screen gap-6"
|
||||
data-tauri-drag-region
|
||||
>
|
||||
<h1 className="text-4xl font-bold tracking-wide text-zinc-800">
|
||||
<h1 className="text-4xl font-bold tracking-wide">
|
||||
CS 工具箱
|
||||
</h1>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => router.push("/home")}
|
||||
className="px-4 py-1 rounded bg-zinc-200"
|
||||
<Button
|
||||
onPress={() => router.push("/home")}
|
||||
variant="solid"
|
||||
color="primary"
|
||||
size="sm"
|
||||
>
|
||||
进入
|
||||
</button>
|
||||
<button
|
||||
</Button>
|
||||
{/* <button
|
||||
type="button"
|
||||
onClick={openFile}
|
||||
className="px-4 py-1 text-white bg-blue-500 rounded"
|
||||
>
|
||||
选择文件
|
||||
</button>
|
||||
<p className="text-center bg-zinc-50">{file}</p>
|
||||
<p className="text-center bg-zinc-50">{file}</p> */}
|
||||
</main>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -5,11 +5,15 @@ interface RoundedButtonProps {
|
||||
children?: React.ReactNode
|
||||
}
|
||||
|
||||
const RoundedButton = ({ children }: RoundedButtonProps) => {
|
||||
const RoundedButton = ({
|
||||
children,
|
||||
...props
|
||||
}: RoundedButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>) => {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
className="flex items-center justify-center px-3 py-1 transition rounded-full select-none min-w-fit active:scale-95 hover:bg-black/10 text-zinc-700 dark:text-zinc-100 bg-black/5"
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
@@ -26,13 +30,13 @@ const CommonDir = () => {
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<div className="flex gap-1.5">
|
||||
<RoundedButton>Steam安装位置</RoundedButton>
|
||||
<RoundedButton>CS2游戏目录</RoundedButton>
|
||||
<RoundedButton>地图文件</RoundedButton>
|
||||
<RoundedButton>游戏CFG目录</RoundedButton>
|
||||
<RoundedButton>个人CFG目录</RoundedButton>
|
||||
<RoundedButton>完美平台录像</RoundedButton>
|
||||
<RoundedButton>5E平台录像</RoundedButton>
|
||||
<RoundedButton onClick={()=> {alert("hello")}}>Steam安装位置</RoundedButton>
|
||||
<RoundedButton onClick={()=> {}}>CS2游戏目录</RoundedButton>
|
||||
<RoundedButton onClick={()=> {}}>地图文件</RoundedButton>
|
||||
<RoundedButton onClick={()=> {}}>游戏CFG目录</RoundedButton>
|
||||
<RoundedButton onClick={()=> {}}>个人CFG目录</RoundedButton>
|
||||
<RoundedButton onClick={()=> {}}>完美平台录像</RoundedButton>
|
||||
<RoundedButton onClick={()=> {}}>5E平台录像</RoundedButton>
|
||||
</div>
|
||||
</CardBody>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user