diff --git a/.eslintrc.json b/.eslintrc.json index a249701..25012b4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -46,6 +46,7 @@ "@typescript-eslint/no-confusing-void-expression": "off", "@typescript-eslint/no-unsafe-return": "off", "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/prefer-nullish-coalescing": "off", "@typescript-eslint/no-unsafe-member-access": "warn", "jsx-a11y/click-events-have-key-events": "off" diff --git a/src/components/cstb/FastLaunch.tsx b/src/components/cstb/FastLaunch.tsx index d261478..21b1a40 100644 --- a/src/components/cstb/FastLaunch.tsx +++ b/src/components/cstb/FastLaunch.tsx @@ -1,9 +1,9 @@ -import { TakeOff } from "@icon-park/react" -import { invoke } from "@tauri-apps/api/core" -import { Card, CardBody, CardHeader, CardIcon } from "../window/Card" import { steamStore } from "@/store/steam" import { toolStore } from "@/store/tool" +import { TakeOff } from "@icon-park/react" +import { invoke } from "@tauri-apps/api/core" import { useSnapshot } from "valtio" +import { Card, CardBody, CardHeader, CardIcon } from "../window/Card" // import { addToast } from "@heroui/react" const FastLaunch = () => { @@ -25,7 +25,7 @@ const FastLaunch = () => { type="button" onClick={() => invoke("launch_game", { - steamPath: dir + "/steam.exe", + steamPath: `${dir}/steam.exe`, launchOption: launchOptions[launchIndex] || "", server: "perfectworld", }) @@ -38,7 +38,7 @@ const FastLaunch = () => { type="button" onClick={() => invoke("launch_game", { - steamPath: dir + "/steam.exe", + steamPath: `${dir}/steam.exe`, launchOption: launchOptions[launchIndex] || "", server: "worldwide", }) diff --git a/src/components/window/SideBar.tsx b/src/components/window/SideBar.tsx index 2a2dd57..92ab8db 100644 --- a/src/components/window/SideBar.tsx +++ b/src/components/window/SideBar.tsx @@ -63,6 +63,7 @@ const Avatar = () => { "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", )} + type="button" > avatar diff --git a/src/store/index.ts b/src/store/index.ts index dfb7011..be93cfb 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,15 +1,16 @@ -import { setValtioPath } from 'tauri-plugin-valtio'; -import {appConfigDir} from '@tauri-apps/api/path' -import path from 'path'; +// @ts-ignore +import path from "path" +import { appConfigDir } from "@tauri-apps/api/path" +import { setValtioPath } from "tauri-plugin-valtio" async function init() { const configDir = await appConfigDir() - const distDir = path.join(configDir, 'cstb') - await setValtioPath(distDir); + const distDir = path.join(configDir, "cstb") + await setValtioPath(distDir) // console.log('init valtio', distDir); } -init(); +void init() export const DEFAULT_STORE_CONFIG = { saveOnChange: true,