mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 00:36:41 +08:00
fix plugin state
This commit is contained in:
@@ -523,6 +523,9 @@ export interface Plugin {
|
|||||||
|
|
||||||
// 是否已安装
|
// 是否已安装
|
||||||
installed?: boolean
|
installed?: boolean
|
||||||
|
|
||||||
|
// 运行状态
|
||||||
|
state?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
// 种子信息
|
// 种子信息
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 定义触发的自定义事件
|
// 定义触发的自定义事件
|
||||||
const emit = defineEmits(['remove'])
|
const emit = defineEmits(['remove', 'save'])
|
||||||
|
|
||||||
// 提示框
|
// 提示框
|
||||||
const $toast = useToast()
|
const $toast = useToast()
|
||||||
@@ -102,6 +102,8 @@ async function savePluginConf() {
|
|||||||
if (result.success) {
|
if (result.success) {
|
||||||
$toast.success(`插件 ${props.plugin?.plugin_name} 配置已保存`)
|
$toast.success(`插件 ${props.plugin?.plugin_name} 配置已保存`)
|
||||||
pluginConfigDialog.value = false
|
pluginConfigDialog.value = false
|
||||||
|
// 通知父组件刷新
|
||||||
|
emit('save')
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$toast.error(`插件 ${props.plugin?.plugin_name} 配置保存失败:${result.message}}`)
|
$toast.error(`插件 ${props.plugin?.plugin_name} 配置保存失败:${result.message}}`)
|
||||||
@@ -192,7 +194,10 @@ const dropdownItems = ref([
|
|||||||
</VAvatar>
|
</VAvatar>
|
||||||
</div>
|
</div>
|
||||||
<VCardItem class="py-2">
|
<VCardItem class="py-2">
|
||||||
<VCardTitle>{{ props.plugin?.plugin_name }}</VCardTitle>
|
<VCardTitle class="flex items-center flex-row">
|
||||||
|
<VBadge v-if="props.plugin?.state" dot inline color="success" class="me-1 mb-1" />
|
||||||
|
{{ props.plugin?.plugin_name }}
|
||||||
|
</VCardTitle>
|
||||||
</VCardItem>
|
</VCardItem>
|
||||||
<VCardText>
|
<VCardText>
|
||||||
{{ props.plugin?.plugin_desc }}
|
{{ props.plugin?.plugin_desc }}
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ onBeforeMount(fetchData)
|
|||||||
:key="data.id"
|
:key="data.id"
|
||||||
:plugin="data"
|
:plugin="data"
|
||||||
@remove="fetchData"
|
@remove="fetchData"
|
||||||
|
@save="fetchData"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<NoDataFound
|
<NoDataFound
|
||||||
|
|||||||
Reference in New Issue
Block a user