mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 01:10:16 +08:00
feat: display cross-version installation status in app detail modal
- Replaced single `currentAppIsInstalled` boolean with `currentAppSparkInstalled` and `currentAppApmInstalled` in global store. - Updated `checkAppInstalled` logic in `App.vue` to fetch the installation status for both Spark and APM versions via `ipcRenderer`. - Passed both flags to `AppDetailModal.vue` as props. - Enhanced `AppDetailModal.vue` to compute the "install" button text dynamically: if viewing Spark and APM is installed, it displays `(已安装apm版)`; if viewing APM and Spark is installed, it displays `(已安装spark版)`. The button is also disabled in these scenarios to prevent duplicate cross-version installations.
This commit is contained in:
@@ -9,6 +9,7 @@ export const APM_STORE_STATS_BASE_URL: string =
|
||||
|
||||
// 下面的变量用于存储当前应用的信息,其实用在多个组件中
|
||||
export const currentApp = ref<App | null>(null);
|
||||
export const currentAppIsInstalled = ref(false);
|
||||
export const currentAppSparkInstalled = ref(false);
|
||||
export const currentAppApmInstalled = ref(false);
|
||||
|
||||
export const currentStoreMode = ref<StoreMode>("hybrid");
|
||||
|
||||
Reference in New Issue
Block a user