diff --git a/package.json b/package.json
index 075f9aac..b5096927 100644
--- a/package.json
+++ b/package.json
@@ -36,6 +36,7 @@
"express": "^4.18.2",
"express-http-proxy": "^2.0.0",
"lodash": "^4.17.21",
+ "mousetrap": "^1.6.5",
"nprogress": "^0.2.0",
"qrcode.vue": "^3.4.1",
"sass": "^1.59.3",
@@ -100,4 +101,4 @@
"resolutions": {
"postcss": "8"
}
-}
\ No newline at end of file
+}
diff --git a/src/api/types.ts b/src/api/types.ts
index 48f015b3..7b97c0aa 100644
--- a/src/api/types.ts
+++ b/src/api/types.ts
@@ -445,6 +445,8 @@ export interface Plugin {
history?: { [key: string]: string }
// 添加时间
add_time?: number
+ // 页面打开状态
+ page_open?: boolean
}
// 渲染结构
diff --git a/src/components/cards/PluginCard.vue b/src/components/cards/PluginCard.vue
index e541ccbe..0fd0b31a 100644
--- a/src/components/cards/PluginCard.vue
+++ b/src/components/cards/PluginCard.vue
@@ -365,11 +365,19 @@ const dropdownItems = ref([
// 监听插件状态变化
watch(
() => props.plugin?.has_update,
- (newHasUpdate, oldHasUpdate) => {
+ (newHasUpdate, _) => {
const updateItemIndex = dropdownItems.value.findIndex(item => item.value === 3)
if (updateItemIndex !== -1) dropdownItems.value[updateItemIndex].show = newHasUpdate
},
)
+
+// 监听插件窗口状态变化
+watch(
+ () => props.plugin?.page_open,
+ (newOpenState, _) => {
+ if (newOpenState) openPluginDetail()
+ },
+)
diff --git a/src/layouts/components/SearchBar.vue b/src/layouts/components/SearchBar.vue
index 6ed4f6db..5f07e354 100644
--- a/src/layouts/components/SearchBar.vue
+++ b/src/layouts/components/SearchBar.vue
@@ -1,10 +1,16 @@
@@ -20,7 +26,7 @@ function openSearchDialog() {
-
+