From 0bd15a80cd9c1ba75890322f267d7cce67d65be9 Mon Sep 17 00:00:00 2001
From: Purp1e <47248616+Purple-CSGO@users.noreply.github.com>
Date: Thu, 13 Mar 2025 22:04:27 +0800
Subject: [PATCH] [feat] better store saving logic + more launch options
---
src/app/globals.css | 1 -
src/components/cstb/LaunchOption.tsx | 16 ++++++++--------
src/components/window/Nav.tsx | 6 +++---
src/store/tool.ts | 11 +++++++++++
4 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/src/app/globals.css b/src/app/globals.css
index 9a1b6da..ee75d8c 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -10,7 +10,6 @@ body {
height: 100%;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
- border-radius: 10px;
background: transparent;
}
diff --git a/src/components/cstb/LaunchOption.tsx b/src/components/cstb/LaunchOption.tsx
index ca294a5..6f16bec 100644
--- a/src/components/cstb/LaunchOption.tsx
+++ b/src/components/cstb/LaunchOption.tsx
@@ -1,4 +1,4 @@
-import { setLaunchIndex, setLaunchOption, toolStore } from "@/store/tool"
+import { addLaunchOption, setLaunchIndex, setLaunchOption, toolStore } from "@/store/tool"
import { Plus, SettingConfig, Switch } from "@icon-park/react"
import { useSnapshot } from "valtio"
import { Card, CardBody, CardHeader, CardIcon, CardTool } from "../window/Card"
@@ -15,10 +15,12 @@ const LaunchOption = () => {
启动选项
- setLaunchIndex(0)}>1
- setLaunchIndex(1)}>2
- setLaunchIndex(2)}>3
-
+ {launchOptions.map((option, index) => (
+ setLaunchIndex(index)}>
+ {index+1}
+
+ ))}
+ addLaunchOption("")}>
添加
@@ -32,9 +34,7 @@ const LaunchOption = () => {