[fix] linting errors
All checks were successful
Dependabot Auto-merge / dependabot (pull_request) Has been skipped

This commit is contained in:
Purp1e
2025-03-13 00:30:41 +08:00
parent d7234ddae9
commit 8822dfb290
4 changed files with 14 additions and 11 deletions

View File

@@ -46,6 +46,7 @@
"@typescript-eslint/no-confusing-void-expression": "off", "@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-unsafe-return": "off", "@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-call": "off", "@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off", "@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/no-unsafe-member-access": "warn", "@typescript-eslint/no-unsafe-member-access": "warn",
"jsx-a11y/click-events-have-key-events": "off" "jsx-a11y/click-events-have-key-events": "off"

View File

@@ -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 { steamStore } from "@/store/steam"
import { toolStore } from "@/store/tool" import { toolStore } from "@/store/tool"
import { TakeOff } from "@icon-park/react"
import { invoke } from "@tauri-apps/api/core"
import { useSnapshot } from "valtio" import { useSnapshot } from "valtio"
import { Card, CardBody, CardHeader, CardIcon } from "../window/Card"
// import { addToast } from "@heroui/react" // import { addToast } from "@heroui/react"
const FastLaunch = () => { const FastLaunch = () => {
@@ -25,7 +25,7 @@ const FastLaunch = () => {
type="button" type="button"
onClick={() => onClick={() =>
invoke("launch_game", { invoke("launch_game", {
steamPath: dir + "/steam.exe", steamPath: `${dir}/steam.exe`,
launchOption: launchOptions[launchIndex] || "", launchOption: launchOptions[launchIndex] || "",
server: "perfectworld", server: "perfectworld",
}) })
@@ -38,7 +38,7 @@ const FastLaunch = () => {
type="button" type="button"
onClick={() => onClick={() =>
invoke("launch_game", { invoke("launch_game", {
steamPath: dir + "/steam.exe", steamPath: `${dir}/steam.exe`,
launchOption: launchOptions[launchIndex] || "", launchOption: launchOptions[launchIndex] || "",
server: "worldwide", server: "worldwide",
}) })

View File

@@ -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", "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",
)} )}
type="button"
> >
<img src="favicon.ico" alt="avatar" draggable={false} /> <img src="favicon.ico" alt="avatar" draggable={false} />
</button> </button>

View File

@@ -1,15 +1,16 @@
import { setValtioPath } from 'tauri-plugin-valtio'; // @ts-ignore
import {appConfigDir} from '@tauri-apps/api/path' import path from "path"
import path from 'path'; import { appConfigDir } from "@tauri-apps/api/path"
import { setValtioPath } from "tauri-plugin-valtio"
async function init() { async function init() {
const configDir = await appConfigDir() const configDir = await appConfigDir()
const distDir = path.join(configDir, 'cstb') const distDir = path.join(configDir, "cstb")
await setValtioPath(distDir); await setValtioPath(distDir)
// console.log('init valtio', distDir); // console.log('init valtio', distDir);
} }
init(); void init()
export const DEFAULT_STORE_CONFIG = { export const DEFAULT_STORE_CONFIG = {
saveOnChange: true, saveOnChange: true,