mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-25 18:29:44 +08:00
feat: 优化插件弹窗加载速度
This commit is contained in:
@@ -1,59 +1,24 @@
|
||||
<script lang="ts" setup>
|
||||
import api from '@/api'
|
||||
import useDragAndDrop from '@core/utils/workflow'
|
||||
|
||||
const { onDragStart } = useDragAndDrop()
|
||||
|
||||
// 组件列表
|
||||
const actions = [
|
||||
{
|
||||
type: 'AddDownloadAction',
|
||||
label: '添加下载资源',
|
||||
},
|
||||
{
|
||||
type: 'AddSubscribeAction',
|
||||
label: '添加订阅',
|
||||
},
|
||||
{
|
||||
type: 'FetchDownloadsAction',
|
||||
label: '获取下载任务',
|
||||
},
|
||||
{
|
||||
type: 'FetchMediasAction',
|
||||
label: '获取媒体数据',
|
||||
},
|
||||
{
|
||||
type: 'FetchRssAction',
|
||||
label: '获取RSS数据',
|
||||
},
|
||||
{
|
||||
type: 'FetchTorrentsAction',
|
||||
label: '搜索站点资源',
|
||||
},
|
||||
{
|
||||
type: 'FilterMediasAction',
|
||||
label: '过滤媒体数据',
|
||||
},
|
||||
{
|
||||
type: 'FilterTorrentsAction',
|
||||
label: '过滤资源数据',
|
||||
},
|
||||
{
|
||||
type: 'ScrapeFileAction',
|
||||
label: '刮削文件',
|
||||
},
|
||||
{
|
||||
type: 'SendEventAction',
|
||||
label: '发送事件',
|
||||
},
|
||||
{
|
||||
type: 'SendMessageAction',
|
||||
label: '发送消息',
|
||||
},
|
||||
{
|
||||
type: 'TransferFileAction',
|
||||
label: '整理文件',
|
||||
},
|
||||
]
|
||||
const actions = ref([])
|
||||
|
||||
// 加载组件列表
|
||||
async function load_actions() {
|
||||
try {
|
||||
actions.value = await api.get('workflow/actions')
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
load_actions()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -67,7 +32,7 @@ const actions = [
|
||||
:draggable="true"
|
||||
@dragstart="onDragStart($event, action)"
|
||||
>
|
||||
{{ action['label'] }}
|
||||
{{ action['name'] }}
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user