[chore] remove unusable files
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import { toolStore, setLaunchOption, setLaunchIndex } from "@/store/tool"
|
||||
import { setLaunchIndex, setLaunchOption, toolStore } from "@/store/tool"
|
||||
import { Plus, SettingConfig, Switch } from "@icon-park/react"
|
||||
import { useSnapshot } from "valtio"
|
||||
import { Card, CardBody, CardHeader, CardIcon, CardTool } from "../window/Card"
|
||||
import { ToolButton } from "../window/ToolButton"
|
||||
import { useSnapshot } from "valtio"
|
||||
import { use, useEffect, useState } from "react"
|
||||
|
||||
const LaunchOption = () => {
|
||||
toolStore.start()
|
||||
void toolStore.start()
|
||||
const { launchOptions, launchIndex } = useSnapshot(toolStore.state)
|
||||
|
||||
return (
|
||||
@@ -33,7 +32,9 @@ const LaunchOption = () => {
|
||||
<textarea
|
||||
placeholder="请输入启动选项"
|
||||
value={launchOptions[launchIndex] || ""}
|
||||
onChange={(e) => launchIndex !== -1 && setLaunchOption(e.target.value, launchIndex)}
|
||||
onChange={(e) =>
|
||||
launchIndex !== -1 && setLaunchOption(e.target.value, launchIndex)
|
||||
}
|
||||
className="w-full font-mono text-base bg-transparent outline-none resize-none min-h-20"
|
||||
/>
|
||||
</CardBody>
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
import { Card, CardBody, CardHeader, CardIcon, CardTool } from "@/components/window/Card"
|
||||
import {
|
||||
Card,
|
||||
CardBody,
|
||||
CardHeader,
|
||||
CardIcon,
|
||||
CardTool,
|
||||
} from "@/components/window/Card"
|
||||
import { appStore } from "@/store/app"
|
||||
import { Refresh, VolumeNotice } from "@icon-park/react"
|
||||
import { ToolButton } from "../window/ToolButton"
|
||||
import { useSnapshot } from "valtio"
|
||||
import { useEffect } from "react"
|
||||
import { ToolButton } from "../window/ToolButton"
|
||||
|
||||
const Notice = () => {
|
||||
appStore.start()
|
||||
void appStore.start()
|
||||
const app = useSnapshot(appStore.state)
|
||||
|
||||
return (
|
||||
@@ -22,7 +27,9 @@ const Notice = () => {
|
||||
</ToolButton>
|
||||
</CardTool>
|
||||
</CardHeader>
|
||||
<CardBody>{app.notice || "不会真的有人要更新CSGO工具箱吧,不会吧不会吧 xswl"}</CardBody>
|
||||
<CardBody>
|
||||
{app.notice || "不会真的有人要更新CSGO工具箱吧,不会吧不会吧 xswl"}
|
||||
</CardBody>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -2,10 +2,18 @@
|
||||
import { resetAppStore } from "@/store/app"
|
||||
import { resetToolStore } from "@/store/tool"
|
||||
import { addToast } from "@heroui/react"
|
||||
import { Close, Minus, Moon, Refresh, RefreshOne, RocketOne, Square, Sun, SunOne } from "@icon-park/react"
|
||||
import { useTheme } from "next-themes"
|
||||
import {
|
||||
Close,
|
||||
Minus,
|
||||
Moon,
|
||||
Refresh,
|
||||
RocketOne,
|
||||
Square,
|
||||
SunOne,
|
||||
} from "@icon-park/react"
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window"
|
||||
import { /* relaunch, */ exit, relaunch } from "@tauri-apps/plugin-process"
|
||||
import { /* relaunch, */ exit } from "@tauri-apps/plugin-process"
|
||||
import { useTheme } from "next-themes"
|
||||
// import { platform } from "@tauri-apps/plugin-os"
|
||||
import { usePathname, useRouter } from "next/navigation"
|
||||
|
||||
@@ -41,7 +49,10 @@ const Nav = () => {
|
||||
const pathname = usePathname()
|
||||
|
||||
return (
|
||||
<nav className="absolute top-0 right-0 flex flex-row h-16 gap-0.5 p-4" data-tauri-drag-region>
|
||||
<nav
|
||||
className="absolute top-0 right-0 flex flex-row h-16 gap-0.5 p-4"
|
||||
data-tauri-drag-region
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
className="px-2 py-0 transition duration-150 rounded hover:bg-zinc-200/80 active:scale-95"
|
||||
@@ -50,7 +61,7 @@ const Nav = () => {
|
||||
resetToolStore()
|
||||
addToast({
|
||||
title: "重置成功",
|
||||
color: 'success'
|
||||
color: "success",
|
||||
// description: "已重置所有设置",
|
||||
})
|
||||
}}
|
||||
@@ -61,7 +72,9 @@ const Nav = () => {
|
||||
<button
|
||||
type="button"
|
||||
className="px-2 py-0 transition duration-150 rounded hover:bg-zinc-200/80 active:scale-95"
|
||||
onClick={() => (pathname !== "/prepare" ? router.push("/prepare") : router.back())}
|
||||
onClick={() =>
|
||||
pathname !== "/prepare" ? router.push("/prepare") : router.back()
|
||||
}
|
||||
>
|
||||
<RocketOne size={16} />
|
||||
</button>
|
||||
@@ -69,7 +82,9 @@ const Nav = () => {
|
||||
<button
|
||||
type="button"
|
||||
className="px-2 py-0 transition duration-150 rounded hover:bg-zinc-200/80 active:scale-95"
|
||||
onClick={() => (theme === "light" ? setTheme("dark") : setTheme("light"))}
|
||||
onClick={() =>
|
||||
theme === "light" ? setTheme("dark") : setTheme("light")
|
||||
}
|
||||
>
|
||||
{theme === "light" ? <SunOne size={16} /> : <Moon size={16} />}
|
||||
</button>
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
"use client"
|
||||
import { Home, MonitorOne, Movie, Setting, Terminal, Toolkit } from "@icon-park/react"
|
||||
import { Button, cn } from "@heroui/react"
|
||||
import {
|
||||
Home,
|
||||
MonitorOne,
|
||||
Movie,
|
||||
Setting,
|
||||
Terminal,
|
||||
Toolkit,
|
||||
} from "@icon-park/react"
|
||||
import { usePathname, useRouter } from "next/navigation"
|
||||
import { useEffect, type ReactNode } from "react"
|
||||
import type { ReactNode } from "react"
|
||||
|
||||
// import { platform } from "@tauri-apps/plugin-os"
|
||||
import { appStore, setVersion } from "@/store/app"
|
||||
@@ -30,7 +37,7 @@ const SideButton = ({
|
||||
className={cn(
|
||||
className,
|
||||
"p-2.5 hover:bg-black/5 rounded-lg transition relative",
|
||||
path.startsWith(route) && "bg-black/5"
|
||||
path.startsWith(route) && "bg-black/5",
|
||||
)}
|
||||
{...rest}
|
||||
>
|
||||
@@ -38,7 +45,7 @@ const SideButton = ({
|
||||
<div
|
||||
className={cn(
|
||||
path.startsWith(route) && "opacity-100",
|
||||
"transition-opacity duration-300 opacity-0 h-3.5 w-0.5 absolute left-0.5 bg-purple-500 rounded-full top-1/2 -translate-y-1/2"
|
||||
"transition-opacity duration-300 opacity-0 h-3.5 w-0.5 absolute left-0.5 bg-purple-500 rounded-full top-1/2 -translate-y-1/2",
|
||||
)}
|
||||
/>
|
||||
</button>
|
||||
@@ -54,7 +61,7 @@ const Avatar = () => {
|
||||
onKeyUp={() => router.push("/users")}
|
||||
className={cn(
|
||||
"w-12 h-12 bg-gray-700 rounded-full shadow-2xl cursor-pointer transition active:scale-95 shadow-purple-800",
|
||||
path.startsWith("/users") && "shadow-sm"
|
||||
path.startsWith("/users") && "shadow-sm",
|
||||
)}
|
||||
>
|
||||
<img src="favicon.ico" alt="avatar" draggable={false} />
|
||||
@@ -63,13 +70,13 @@ const Avatar = () => {
|
||||
}
|
||||
|
||||
const SideBar = () => {
|
||||
appStore.start()
|
||||
void appStore.start()
|
||||
const { version } = useSnapshot(appStore.state)
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"absolute left-0 flex flex-col h-full select-none w-20 pt-7 pb-5"
|
||||
"absolute left-0 flex flex-col h-full select-none w-20 pt-7 pb-5",
|
||||
// platform() === "windows" ? "w-20" : "w-[4.25rem]"
|
||||
)}
|
||||
data-tauri-drag-region
|
||||
@@ -102,7 +109,10 @@ const SideBar = () => {
|
||||
</SideButton>
|
||||
</section>
|
||||
|
||||
<div className="mx-auto text-sm text-center text-zinc-500" data-tauri-drag-region>
|
||||
<div
|
||||
className="mx-auto text-sm text-center text-zinc-500"
|
||||
data-tauri-drag-region
|
||||
>
|
||||
<p>版本号</p>
|
||||
<Button
|
||||
variant="light"
|
||||
|
||||
Reference in New Issue
Block a user