update: force quit working
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { TakeOff } from "@icon-park/react";
|
||||
import { Card, CardHeader, CardIcon, CardBody } from "../window/Card";
|
||||
import { invoke } from "@tauri-apps/api/core"
|
||||
|
||||
const FastLaunch = () => {
|
||||
return (
|
||||
@@ -11,16 +12,34 @@ const FastLaunch = () => {
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<div className="flex gap-2">
|
||||
<button className="px-5 font-medium py-1.5 transition bg-red-200 rounded-full">
|
||||
<button
|
||||
onClick={() =>
|
||||
invoke("launch_game", {
|
||||
// steamPath: steam.dir + "/steam.exe",
|
||||
// launchOption: launchOptions.value[launchIndex.value] || "",
|
||||
server: "perfectworld",
|
||||
})
|
||||
}
|
||||
className="px-5 font-medium py-1.5 transition bg-red-200 rounded-full"
|
||||
>
|
||||
启动国服
|
||||
</button>
|
||||
<button className="px-5 font-medium py-1.5 transition bg-orange-200 rounded-full">
|
||||
<button
|
||||
onClick={() =>
|
||||
invoke("launch_game", {
|
||||
// steamPath: steam.dir + "/steam.exe",
|
||||
// launchOption: launchOptions.value[launchIndex.value] || "",
|
||||
server: "worldwide",
|
||||
})
|
||||
}
|
||||
className="px-5 font-medium py-1.5 transition bg-orange-200 rounded-full"
|
||||
>
|
||||
启动国际服
|
||||
</button>
|
||||
</div>
|
||||
</CardBody>
|
||||
</Card>
|
||||
);
|
||||
)
|
||||
};
|
||||
|
||||
export default FastLaunch;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Power } from "@icon-park/react";
|
||||
import { Card, CardHeader, CardIcon, CardBody } from "../window/Card";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
const ForceQuit = () => {
|
||||
return (
|
||||
@@ -11,8 +12,8 @@ const ForceQuit = () => {
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<div className="flex gap-2">
|
||||
<button className="px-5 font-medium py-1.5 transition bg-blue-200 rounded-full">关闭Steam</button>
|
||||
<button className="px-5 font-medium py-1.5 transition bg-orange-200 rounded-full">关闭CS2</button>
|
||||
<button onClick={() => invoke("kill_steam")} className="px-5 font-medium py-1.5 transition bg-blue-200 rounded-full">关闭Steam</button>
|
||||
<button onClick={() => invoke("kill_game")} className="px-5 font-medium py-1.5 transition bg-orange-200 rounded-full">关闭CS2</button>
|
||||
</div>
|
||||
</CardBody>
|
||||
</Card>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { BatteryCharge, Refresh } from "@icon-park/react";
|
||||
import { Card, CardHeader, CardIcon, CardTool, CardBody } from "../window/Card";
|
||||
import { ToolButton } from "../window/ToolButton";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
const PowerPlan = () => {
|
||||
return (
|
||||
@@ -18,9 +19,9 @@ const PowerPlan = () => {
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<div className="flex p-0.5 bg-black/5 gap-2 rounded-full">
|
||||
<button className="flex-1 px-2 py-1 transition rounded-full bg-black/5">高性能</button>
|
||||
<button className="flex-1 px-2 py-1 transition rounded-full">平衡</button>
|
||||
<button className="flex-1 px-2 py-1 transition rounded-full">节能</button>
|
||||
<button onClick={() => invoke("set_power_plan", {index: 1})} className="flex-1 px-2 py-1 transition rounded-full bg-black/5">高性能</button>
|
||||
<button onClick={() => invoke("set_power_plan", {index: 2})} className="flex-1 px-2 py-1 transition rounded-full">平衡</button>
|
||||
<button onClick={() => invoke("set_power_plan", {index: 3})} className="flex-1 px-2 py-1 transition rounded-full">节能</button>
|
||||
</div>
|
||||
</CardBody>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user