[chore] update styles and remove path select tests at launch page

This commit is contained in:
Purp1e
2025-03-13 17:53:02 +08:00
parent b77cf75010
commit 9a87b24a14
5 changed files with 364 additions and 32 deletions

View File

@@ -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 {

View File

@@ -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>

View File

@@ -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>
)
}