From 6625e0c57d6a2848d97e54cbac30ac33a7f40adb Mon Sep 17 00:00:00 2001 From: purp1e <438518244@qq.com> Date: Sat, 21 Sep 2024 01:42:16 +0800 Subject: [PATCH] update: force quit working --- src/components/cstb/FastLaunch.tsx | 25 ++++++++++++++++++++++--- src/components/cstb/ForceQuit.tsx | 5 +++-- src/components/cstb/PowerPlan.tsx | 7 ++++--- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/components/cstb/FastLaunch.tsx b/src/components/cstb/FastLaunch.tsx index ee36ece..f808ae0 100644 --- a/src/components/cstb/FastLaunch.tsx +++ b/src/components/cstb/FastLaunch.tsx @@ -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 = () => {
- -
- ); + ) }; export default FastLaunch; diff --git a/src/components/cstb/ForceQuit.tsx b/src/components/cstb/ForceQuit.tsx index 2e5764e..f4d634b 100644 --- a/src/components/cstb/ForceQuit.tsx +++ b/src/components/cstb/ForceQuit.tsx @@ -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 = () => {
- - + +
diff --git a/src/components/cstb/PowerPlan.tsx b/src/components/cstb/PowerPlan.tsx index 79dbee1..8fdb9de 100644 --- a/src/components/cstb/PowerPlan.tsx +++ b/src/components/cstb/PowerPlan.tsx @@ -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 = () => {
- - - + + +