From 7a58500a921e3ec54381febdc94c1e68189cb82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=98=89=E4=BC=9F?= <8473136@qq.com> Date: Tue, 25 Feb 2025 15:57:11 +0800 Subject: [PATCH] :building_construction: refactor frpc process management and integrate Pinia for state handling --- package.json | 1 + src/layout/compoenets/LeftMenu.vue | 47 ++++++++++++++++++------------ src/main.ts | 38 ++++++++++++++++++------ src/store/frpcProcess.ts | 18 ++++++++++++ src/styles/layout.scss | 4 +-- src/views/download/index.vue | 6 ++-- src/views/home/index.vue | 38 ++++++++++++------------ src/views/logger/index.vue | 1 - src/views/proxy/index.vue | 6 ++-- 9 files changed, 104 insertions(+), 55 deletions(-) create mode 100644 src/store/frpcProcess.ts diff --git a/package.json b/package.json index 7831c05..e1ec7ea 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "isbinaryfile": "4.0.10", "js-base64": "^3.7.7", "lodash": "^4.17.21", + "pinia": "^3.0.1", "smol-toml": "^1.3.1", "snowflakify": "^1.0.5", "tar": "^6.2.0", diff --git a/src/layout/compoenets/LeftMenu.vue b/src/layout/compoenets/LeftMenu.vue index 3b3a5c8..4848d55 100644 --- a/src/layout/compoenets/LeftMenu.vue +++ b/src/layout/compoenets/LeftMenu.vue @@ -2,15 +2,17 @@ import { computed, defineComponent, onMounted, ref } from "vue"; import router from "@/router"; import { RouteRecordRaw } from "vue-router"; -import pkg from "../../../package.json"; import Intro from "@/intro"; import "intro.js/introjs.css"; import confetti from "canvas-confetti/src/confetti.js"; +import { useFrpcProcessStore } from "@/store/frpcProcess"; +import pkg from "../../../package.json"; defineComponent({ name: "AppMain" }); +const frpcProcessStore = useFrpcProcessStore(); const routes = ref>([]); const guideSteps = ref({ Home: { @@ -93,11 +95,14 @@ onMounted(() => {