mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 00:36:41 +08:00
feat: 添加扫描目录功能,支持将目录文件扫描到队列
This commit is contained in:
@@ -56,7 +56,7 @@ onMounted(() => {
|
|||||||
<VSelect v-model="data.downloader" :items="downloaderOptions" label="下载器" outlined dense />
|
<VSelect v-model="data.downloader" :items="downloaderOptions" label="下载器" outlined dense />
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12">
|
<VCol cols="12">
|
||||||
<VTextField v-model="data.save_path" label="保存路径" outlined dense clearable placeholder="留空自动" />
|
<VPathField v-model="data.save_path" storage="local" label="保存路径" clearable placeholder="留空自动" />
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12">
|
<VCol cols="12">
|
||||||
<VSwitch v-model="data.only_lack" label="仅下载缺失的资源" />
|
<VSwitch v-model="data.only_lack" label="仅下载缺失的资源" />
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ defineProps({
|
|||||||
</VAvatar>
|
</VAvatar>
|
||||||
</template>
|
</template>
|
||||||
<VCardTitle>获取下载任务</VCardTitle>
|
<VCardTitle>获取下载任务</VCardTitle>
|
||||||
<VCardSubtitle>获取下载任务,更新任务状态</VCardSubtitle>
|
<VCardSubtitle>获取下载队列中的任务状态</VCardSubtitle>
|
||||||
</VCardItem>
|
</VCardItem>
|
||||||
<VDivider />
|
<VDivider />
|
||||||
<VCardText>
|
<VCardText>
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ onMounted(() => {
|
|||||||
</VAvatar>
|
</VAvatar>
|
||||||
</template>
|
</template>
|
||||||
<VCardTitle>搜索站点资源</VCardTitle>
|
<VCardTitle>搜索站点资源</VCardTitle>
|
||||||
<VCardSubtitle>根据关键字搜索站点种子资源</VCardSubtitle>
|
<VCardSubtitle>搜索站点种子资源列表</VCardSubtitle>
|
||||||
</VCardItem>
|
</VCardItem>
|
||||||
<VDivider />
|
<VDivider />
|
||||||
<VCardText>
|
<VCardText>
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { Handle, Position } from '@vue-flow/core'
|
||||||
|
import { storageOptions } from '@/api/constants'
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<VCard max-width="20rem">
|
||||||
|
<Handle id="edge_in" type="target" :position="Position.Left" />
|
||||||
|
<VCardItem>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<VAvatar>
|
||||||
|
<VIcon icon="mdi-file-move" size="x-large"></VIcon>
|
||||||
|
</VAvatar>
|
||||||
|
</template>
|
||||||
|
<VCardTitle>扫描目录</VCardTitle>
|
||||||
|
<VCardSubtitle>扫描目录文件到队列</VCardSubtitle>
|
||||||
|
</VCardItem>
|
||||||
|
<VDivider />
|
||||||
|
<VCardText>
|
||||||
|
<VRow>
|
||||||
|
<VCol cols="12">
|
||||||
|
<VSelect v-model="data.storage" label="存储" :items="storageOptions" outlined dense />
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12">
|
||||||
|
<VPathField v-model="data.directory" :storage="data.storage" label="目录" clearable />
|
||||||
|
</VCol>
|
||||||
|
</VRow>
|
||||||
|
</VCardText>
|
||||||
|
<Handle id="edge_out" type="source" :position="Position.Right" />
|
||||||
|
</VCard>
|
||||||
|
</template>
|
||||||
@@ -11,6 +11,18 @@ defineProps({
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 来源下拉框
|
||||||
|
const sourceOptions = ref([
|
||||||
|
{
|
||||||
|
title: '文件列表',
|
||||||
|
value: 'files',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '下载任务',
|
||||||
|
value: 'downloads',
|
||||||
|
},
|
||||||
|
])
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VCard max-width="20rem">
|
<VCard max-width="20rem">
|
||||||
@@ -22,8 +34,16 @@ defineProps({
|
|||||||
</VAvatar>
|
</VAvatar>
|
||||||
</template>
|
</template>
|
||||||
<VCardTitle>整理文件</VCardTitle>
|
<VCardTitle>整理文件</VCardTitle>
|
||||||
<VCardSubtitle>整理下载队列中的文件</VCardSubtitle>
|
<VCardSubtitle>整理重命名队列中的文件</VCardSubtitle>
|
||||||
</VCardItem>
|
</VCardItem>
|
||||||
|
<VDivider />
|
||||||
|
<VCardText>
|
||||||
|
<VRow>
|
||||||
|
<VCol cols="12">
|
||||||
|
<VSelect v-model="data.source" label="来源" :items="sourceOptions" outlined dense />
|
||||||
|
</VCol>
|
||||||
|
</VRow>
|
||||||
|
</VCardText>
|
||||||
<Handle id="edge_out" type="source" :position="Position.Right" />
|
<Handle id="edge_out" type="source" :position="Position.Right" />
|
||||||
</VCard>
|
</VCard>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ onMounted(() => {
|
|||||||
<div class="nodes flex flex-wrap justify-center">
|
<div class="nodes flex flex-wrap justify-center">
|
||||||
<div
|
<div
|
||||||
class="vue-flow__node-default cursor-grab mx-1"
|
class="vue-flow__node-default cursor-grab mx-1"
|
||||||
v-for="action in actions"
|
v-for="(action, index) in actions"
|
||||||
|
:key="index"
|
||||||
:draggable="true"
|
:draggable="true"
|
||||||
@dragstart="onDragStart($event, action)"
|
@dragstart="onDragStart($event, action)"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user