[fix[ building error and migrate to v0.0.3

This commit is contained in:
Purp1e
2025-03-21 03:00:02 +08:00
parent 90c6492b9c
commit a915bf4506
6 changed files with 8 additions and 13 deletions

View File

@@ -36,7 +36,7 @@
"error",
"always"
],
"react-hooks/exhaustive-deps": "error",
"react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/no-misused-promises": [
"error",
{

View File

@@ -42,7 +42,7 @@
},
"productName": "CS工具箱",
"mainBinaryName": "cstb",
"version": "0.0.2",
"version": "0.0.3",
"identifier": "upup.cool",
"plugins": {
"deep-link": {

View File

@@ -1,5 +1,5 @@
"use client"
import { steamStore, useSteamStore } from "@/store/steam"
import { useSteamStore } from "@/store/steam"
import { useEffect } from "react"
import "./globals.css"
import Providers from "./providers"
@@ -16,10 +16,10 @@ export default function RootLayout({ children }: { children: React.ReactNode })
const debounceSteamDir = useDebounce(steam.state.steamDir, 500)
const debounceCs2Dir = useDebounce(steam.state.cs2Dir, 500)
useEffect(() => {
steam.checkSteamDirValid()
void steam.checkSteamDirValid()
}, [debounceSteamDir])
useEffect(() => {
steam.checkCs2DirValid()
void steam.checkCs2DirValid()
}, [debounceCs2Dir])
return (

View File

@@ -1,7 +1,6 @@
import { addToast } from "@heroui/react"
import { FolderFocusOne } from "@icon-park/react"
import { Card, CardBody, CardHeader, CardIcon } from "../window/Card"
import { open } from "@tauri-apps/plugin-fs"
interface RoundedButtonProps {
children?: React.ReactNode

View File

@@ -1,11 +1,10 @@
import { addToast, Button, Chip, Spinner } from "@heroui/react"
import { useRouter } from "next/navigation"
import { useEffect, useState } from "react"
import { steamStore, useSteamStore } from "@/store/steam"
import { useSteamStore } from "@/store/steam"
import { open } from "@tauri-apps/plugin-dialog"
import { invoke } from "@tauri-apps/api/core"
import { onOpenUrl } from "@tauri-apps/plugin-deep-link"
import path from "path"
/**
* 检查指定路径的有效性
@@ -35,7 +34,7 @@ export function Prepare() {
const [, setCs2Dir] = useState(steam.state.cs2Dir)
useEffect(() => {
const initValues = async () => {
const initValues = () => {
const initialSteamDir = steam.state.steamDir
const initialCs2Dir = steam.state.cs2Dir
@@ -54,7 +53,7 @@ export function Prepare() {
setLoading(false)
}, 300)
}
void initValues()
initValues()
})
const handleSelectSteamDir = async () => {

View File

@@ -2,10 +2,7 @@ import type { SteamUser } from "@/types/steam"
import { store } from "@tauri-store/valtio"
import { DEFAULT_STORE_CONFIG } from "./config"
import { useSnapshot } from "valtio"
import { useEffect } from "react"
import { addToast } from "@heroui/react"
import { invoke } from "@tauri-apps/api/core"
import { dir } from "console"
const defaultValue = {
steamDir: "C:\\Program Files (x86)\\Steam",