[dep] update to eslint 9
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
export default function Page() {
|
||||
return <div>Console</div>;
|
||||
return <div>Console</div>
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default function Page() {
|
||||
return <div>Gear</div>;
|
||||
return <div>Gear</div>
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
"use client";
|
||||
"use client"
|
||||
|
||||
import CommonDir from "@/components/cstb/CommonDir";
|
||||
import FastLaunch from "@/components/cstb/FastLaunch";
|
||||
import ForceQuit from "@/components/cstb/ForceQuit";
|
||||
import LaunchOption from "@/components/cstb/LaunchOption";
|
||||
import Notice from "@/components/cstb/Notice";
|
||||
import PowerPlan from "@/components/cstb/PowerPlan";
|
||||
import SmartTransfer from "@/components/cstb/SmartTranser";
|
||||
import CommonDir from "@/components/cstb/CommonDir"
|
||||
import FastLaunch from "@/components/cstb/FastLaunch"
|
||||
import ForceQuit from "@/components/cstb/ForceQuit"
|
||||
import LaunchOption from "@/components/cstb/LaunchOption"
|
||||
import Notice from "@/components/cstb/Notice"
|
||||
import PowerPlan from "@/components/cstb/PowerPlan"
|
||||
import SmartTransfer from "@/components/cstb/SmartTranser"
|
||||
|
||||
const Home = () => {
|
||||
return (
|
||||
@@ -25,7 +25,7 @@ const Home = () => {
|
||||
<FastLaunch />
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export default Home;
|
||||
export default Home
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
"use client"
|
||||
import Header from "@/components/window/Header";
|
||||
import Nav from "@/components/window/Nav";
|
||||
import SideBar from "@/components/window/SideBar";
|
||||
import clsx from "clsx";
|
||||
import Header from "@/components/window/Header"
|
||||
import Nav from "@/components/window/Nav"
|
||||
import SideBar from "@/components/window/SideBar"
|
||||
import clsx from "clsx"
|
||||
// import { platform } from "@tauri-apps/plugin-os"
|
||||
|
||||
export default function BaseLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<div className="w-full h-full bg-transparent">
|
||||
@@ -20,7 +20,7 @@ export default function BaseLayout({
|
||||
|
||||
<main
|
||||
className={clsx(
|
||||
"flex flex-col h-full pb-5 pr-5 ml-20 overflow-hidden"
|
||||
"flex flex-col h-full pb-5 pr-5 ml-20 overflow-hidden",
|
||||
// platform() === "windows" ? "ml-20" : "ml-[4.25rem]"
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default function Page() {
|
||||
return <div>Movie</div>;
|
||||
return <div>Movie</div>
|
||||
}
|
||||
|
||||
@@ -1,12 +1,26 @@
|
||||
"use client"
|
||||
import { Card, CardHeader, CardIcon, CardTool, CardBody } from "@/components/window/Card"
|
||||
import {
|
||||
Card,
|
||||
CardBody,
|
||||
CardHeader,
|
||||
CardIcon,
|
||||
CardTool,
|
||||
} from "@/components/window/Card"
|
||||
import { ToolButton } from "@/components/window/ToolButton"
|
||||
import { SettingConfig, UploadOne, HardDisk, AssemblyLine, Videocamera } from "@icon-park/react"
|
||||
import {
|
||||
AssemblyLine,
|
||||
HardDisk,
|
||||
SettingConfig,
|
||||
UploadOne,
|
||||
Videocamera,
|
||||
} from "@icon-park/react"
|
||||
import clsx from "clsx"
|
||||
import { usePathname, useRouter } from "next/navigation"
|
||||
// import { platform } from "@tauri-apps/plugin-os"
|
||||
|
||||
export default function PreferenceLayout({ children }: { children: React.ReactNode }) {
|
||||
export default function PreferenceLayout({
|
||||
children,
|
||||
}: { children: React.ReactNode }) {
|
||||
const router = useRouter()
|
||||
const pathname = usePathname()
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default function Page() {
|
||||
return <div>Tool</div>;
|
||||
return <div>Tool</div>
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ body {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu,
|
||||
Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
||||
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
||||
/* background: transparent; */
|
||||
background: rgba(242, 241, 243, 0.65);
|
||||
border-radius: 10px;
|
||||
|
||||
@@ -2,9 +2,9 @@ export const metadata = {
|
||||
title: "CS工具箱",
|
||||
description: "Generated by Next.js",
|
||||
icons: ["/favicon.ico"],
|
||||
};
|
||||
}
|
||||
|
||||
import "./globals.css";
|
||||
import "./globals.css"
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
"use client";
|
||||
"use client"
|
||||
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useRouter } from "next/navigation"
|
||||
|
||||
const Home = () => {
|
||||
const router = useRouter();
|
||||
const router = useRouter()
|
||||
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">CS 工具箱</h1>
|
||||
<button onClick={() => router.push("/home")} className="px-4 py-1 rounded bg-zinc-200">
|
||||
<h1 className="text-4xl font-bold tracking-wide text-zinc-800">
|
||||
CS 工具箱
|
||||
</h1>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => router.push("/home")}
|
||||
className="px-4 py-1 rounded bg-zinc-200"
|
||||
>
|
||||
进入
|
||||
</button>
|
||||
</main>
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
export default Home;
|
||||
export default Home
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import Nav from "@/components/window/Nav"
|
||||
|
||||
export default function BaseLayout({ children }: { children: React.ReactNode }) {
|
||||
export default function BaseLayout({
|
||||
children,
|
||||
}: { children: React.ReactNode }) {
|
||||
return (
|
||||
<div className="w-full h-full">
|
||||
<Nav />
|
||||
|
||||
@@ -8,7 +8,9 @@ export default function Page() {
|
||||
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">CS工具箱</h1>
|
||||
<h1 className="text-4xl font-bold tracking-wide text-zinc-800">
|
||||
CS工具箱
|
||||
</h1>
|
||||
<p>准备环节</p>
|
||||
|
||||
<div className="flex flex-col w-full gap-6 p-5 border rounded-lg bg-white/40">
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
"use client"
|
||||
import { CardButton } from "@/components/test/CardButton";
|
||||
import { useGlobalShortcut } from "@/hooks/tauri/shortcuts";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { useCallback, useState } from "react";
|
||||
import { CardButton } from "@/components/test/CardButton"
|
||||
import { useGlobalShortcut } from "@/hooks/tauri/shortcuts"
|
||||
import { invoke } from "@tauri-apps/api/core"
|
||||
import { useCallback, useState } from "react"
|
||||
|
||||
export default function Page() {
|
||||
const [buttonDesc, setButtonDesc] = useState<string>(
|
||||
"Waiting to be clicked. This calls 'on_button_clicked' from Rust."
|
||||
);
|
||||
"Waiting to be clicked. This calls 'on_button_clicked' from Rust.",
|
||||
)
|
||||
const onButtonClick = () => {
|
||||
invoke<string>("on_button_clicked")
|
||||
.then((value) => {
|
||||
setButtonDesc(value);
|
||||
setButtonDesc(value)
|
||||
})
|
||||
.catch(() => {
|
||||
setButtonDesc("Failed to invoke Rust command 'on_button_clicked'");
|
||||
});
|
||||
};
|
||||
setButtonDesc("Failed to invoke Rust command 'on_button_clicked'")
|
||||
})
|
||||
}
|
||||
|
||||
const shortcutHandler = useCallback(() => {
|
||||
console.log("Ctrl+P was pressed!");
|
||||
}, []);
|
||||
useGlobalShortcut("CommandOrControl+P", shortcutHandler);
|
||||
console.log("Ctrl+P was pressed!")
|
||||
}, [])
|
||||
useGlobalShortcut("CommandOrControl+P", shortcutHandler)
|
||||
|
||||
return (
|
||||
<div className="flex flex-col">
|
||||
@@ -54,5 +54,5 @@ export default function Page() {
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user