[fix] path and building error

This commit is contained in:
Purp1e
2025-03-21 18:36:12 +08:00
parent 42a3efb217
commit f92fc6719c
2 changed files with 5 additions and 6 deletions

View File

@@ -4,7 +4,6 @@ import { TakeOff } from "@icon-park/react"
import { invoke } from "@tauri-apps/api/core"
import { Card, CardBody, CardHeader, CardIcon } from "../window/Card"
import { addToast, Button } from "@heroui/react"
import { title } from "process"
const FastLaunch = () => {
const steam = useSteamStore()
@@ -21,8 +20,8 @@ const FastLaunch = () => {
<div className="flex gap-2">
<Button
size="sm"
onPress={async () => {
invoke("launch_game", {
onPress={() => {
void invoke("launch_game", {
steamPath: `${steam.state.steamDir}/steam.exe`,
launchOption: tool.state.launchOptions[tool.state.launchIndex] || "",
server: "perfectworld",
@@ -35,8 +34,8 @@ const FastLaunch = () => {
</Button>
<Button
size="sm"
onPress={async () => {
invoke("launch_game", {
onPress={() => {
void invoke("launch_game", {
steamPath: `${steam.state.steamDir}/steam.exe`,
launchOption: tool.state.launchOptions[tool.state.launchIndex] || "",
server: "worldwide",

View File

@@ -51,7 +51,7 @@ export const useSteamStore = () => {
}
const cs2BaseDir = () => {
return path.normalize(steamStore.state.cs2Dir.replaceAll("\\", "/") + "/../../..")
return path.normalize(`${steamStore.state.cs2Dir.replaceAll("\\", "/") }/../../..`)
}
const setDir = (dir: string) => {