mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 07:28:37 +08:00
fix: 完善插件运行态与安装交互 (#694)
This commit is contained in:
@@ -34,6 +34,11 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
count: Number,
|
||||
// 搜索入口交由列表页接管安装,以便先关闭详情并显示插件级加载状态。
|
||||
installHandler: {
|
||||
type: Function as PropType<(releaseVersion?: string, repoUrl?: string) => unknown>,
|
||||
default: undefined,
|
||||
},
|
||||
})
|
||||
|
||||
// 定义触发的自定义事件
|
||||
@@ -130,6 +135,14 @@ async function installPlugin(releaseVersion?: string, repoUrl?: string) {
|
||||
if (!isConfirmed) return
|
||||
}
|
||||
|
||||
if (props.installHandler) {
|
||||
versionHistoryDialogController?.close()
|
||||
versionHistoryDialogController = null
|
||||
visible.value = false
|
||||
await props.installHandler(releaseVersion, repoUrl)
|
||||
return
|
||||
}
|
||||
|
||||
const failureMessageKey = isInstalled.value ? 'plugin.updateFailed' : 'plugin.installFailed'
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user