dev-store #1

Merged
purp1e merged 16 commits from dev-store into master 2025-03-13 00:54:31 +08:00
7 changed files with 8 additions and 34 deletions
Showing only changes of commit a78b63259a - Show all commits

6
.vscode/tasks.json vendored
View File

@@ -6,7 +6,7 @@
{ {
"label": "Dev Tauri", "label": "Dev Tauri",
"type": "shell", "type": "shell",
"command": "pnpm tauri dev", "command": "bun tauri dev",
"problemMatcher": [ "problemMatcher": [
"$vite" "$vite"
], ],
@@ -14,7 +14,7 @@
{ {
"label": "Build Tauri to nsis installer", "label": "Build Tauri to nsis installer",
"type": "shell", "type": "shell",
"command": "pnpm tauri build -b nsis", "command": "bun tauri build -b nsis",
"problemMatcher": [ "problemMatcher": [
"$vite" "$vite"
], ],
@@ -22,7 +22,7 @@
{ {
"label": "Build Tauri", "label": "Build Tauri",
"type": "shell", "type": "shell",
"command": "pnpm tauri build", "command": "bun tauri build",
"problemMatcher": [ "problemMatcher": [
"$vite" "$vite"
], ],

View File

@@ -4,11 +4,7 @@ import { useEffect } from "react"
import { useSnapshot } from "valtio" import { useSnapshot } from "valtio"
export default function Page() { export default function Page() {
useEffect(() => {
;async () => {
appStore.start() appStore.start()
}
}, [])
const app = useSnapshot(appStore.state) const app = useSnapshot(appStore.state)
return ( return (

View File

@@ -4,11 +4,7 @@ import { useEffect } from "react"
import { useSnapshot } from "valtio" import { useSnapshot } from "valtio"
export default function Page() { export default function Page() {
useEffect(() => {
;async () => {
steamStore.start() steamStore.start()
}
}, [])
const steam = useSnapshot(steamStore.state) const steam = useSnapshot(steamStore.state)
return ( return (

View File

@@ -4,11 +4,7 @@ import { steamStore, setDir, setCsDir, currentUser } from "@/store/steam"
import { useEffect } from "react" import { useEffect } from "react"
import { useSnapshot } from "valtio" import { useSnapshot } from "valtio"
export default function Page() { export default function Page() {
useEffect(() => {
;async () => {
steamStore.start() steamStore.start()
}
}, [])
const steam = useSnapshot(steamStore.state) const steam = useSnapshot(steamStore.state)
return ( return (
<div <div

View File

@@ -6,12 +6,7 @@ import { useSnapshot } from "valtio"
import { use, useEffect, useState } from "react" import { use, useEffect, useState } from "react"
const LaunchOption = () => { const LaunchOption = () => {
useEffect(() => {
;async () => {
toolStore.start() toolStore.start()
}
}, [])
const { launchOptions, launchIndex } = useSnapshot(toolStore.state) const { launchOptions, launchIndex } = useSnapshot(toolStore.state)
return ( return (

View File

@@ -6,11 +6,6 @@ import { useSnapshot } from "valtio"
import { useEffect } from "react" import { useEffect } from "react"
const Notice = () => { const Notice = () => {
useEffect(() => {
;async () => {
appStore.start()
}
}, [])
appStore.start() appStore.start()
const app = useSnapshot(appStore.state) const app = useSnapshot(appStore.state)

View File

@@ -63,11 +63,7 @@ const Avatar = () => {
} }
const SideBar = () => { const SideBar = () => {
useEffect(() => {
;async () => {
appStore.start() appStore.start()
}
}, [])
const { version } = useSnapshot(appStore.state) const { version } = useSnapshot(appStore.state)
return ( return (