From 7f3ba543b7278c889c5fd42c909a9a4bd418e290 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Wed, 25 Dec 2024 18:12:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(TransferQueue):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=95=B4=E7=90=86=E9=98=9F=E5=88=97=E5=AF=B9=E8=AF=9D=E6=A1=86?= =?UTF-8?q?=E5=8F=8A=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/types.ts | 22 +++++ src/components/dialog/TransferQueueDialog.vue | 87 +++++++++++++++++++ src/router/menu.ts | 31 +------ src/views/reorganize/TransferHistoryView.vue | 13 ++- 4 files changed, 122 insertions(+), 31 deletions(-) create mode 100644 src/components/dialog/TransferQueueDialog.vue diff --git a/src/api/types.ts b/src/api/types.ts index 5c014a32..0c9ebe11 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -1100,6 +1100,7 @@ export interface FilterRuleGroup { category?: string } +// 订阅下载文件详情 export interface SubscribeDownloadFileInfo { // 种子名称 torrent_title?: string @@ -1113,6 +1114,7 @@ export interface SubscribeDownloadFileInfo { file_path?: string } +// 订阅媒体库文件详情 export interface SubscribeLibraryFileInfo { // 存储 storage?: string @@ -1120,6 +1122,7 @@ export interface SubscribeLibraryFileInfo { file_path?: string } +// 订阅集详情 export interface SubscribeEpisodeInfo { // 标题 title?: string @@ -1133,6 +1136,7 @@ export interface SubscribeEpisodeInfo { library?: SubscribeLibraryFileInfo[] } +// 订阅详情 export interface SubscrbieInfo { // 订阅信息 subscribe: Subscribe @@ -1140,6 +1144,7 @@ export interface SubscrbieInfo { episodes: Record } +// 整理表单 export interface TransferForm { // 文件项 fileitem: FileItem @@ -1178,3 +1183,20 @@ export interface TransferForm { // 媒体库类别子目录 library_category_folder?: boolean } + +// 整理队列 +export interface TransferQueue { + // 媒体信息 + media: MediaInfo + // 季 + season?: number + // 任务列表 + tasks: { + // 文件项 + fileitem: FileItem + // 元数据 + meta: MetaInfo + // 状态 + state: string + }[] +} diff --git a/src/components/dialog/TransferQueueDialog.vue b/src/components/dialog/TransferQueueDialog.vue new file mode 100644 index 00000000..a1a32b67 --- /dev/null +++ b/src/components/dialog/TransferQueueDialog.vue @@ -0,0 +1,87 @@ + + + diff --git a/src/router/menu.ts b/src/router/menu.ts index d56d0d01..87efaed0 100644 --- a/src/router/menu.ts +++ b/src/router/menu.ts @@ -58,7 +58,7 @@ export const SystemNavMenus = [ }, { title: '整理刮削', - icon: 'mdi-history', + icon: 'mdi-filmstrip-box-multiple', to: '/history', header: '整理', admin: true, @@ -100,35 +100,6 @@ export const SystemNavMenus = [ }, ] -// 常用菜单功能 -export const UserfulMenus = [ - { - title: '搜索设置', - icon: 'mdi-magnify', - to: 'setting?tab=search', - }, - { - title: '订阅设置', - icon: 'mdi-rss', - to: 'setting?tab=subscribe', - }, - { - title: '服务', - icon: 'mdi-list-box', - to: 'setting?tab=service', - }, - { - title: '词表', - icon: 'mdi-file-word-box', - to: 'setting?tab=words', - }, - { - title: '整理刮削', - icon: 'mdi-history', - to: 'history', - }, -] - // 设定标签页 export const SettingTabs = [ { diff --git a/src/views/reorganize/TransferHistoryView.vue b/src/views/reorganize/TransferHistoryView.vue index a89fb4bd..dba479f8 100644 --- a/src/views/reorganize/TransferHistoryView.vue +++ b/src/views/reorganize/TransferHistoryView.vue @@ -4,6 +4,7 @@ import { useToast } from 'vue-toast-notification' import api from '@/api' import type { TransferHistory } from '@/api/types' import ReorganizeDialog from '@/components/dialog/ReorganizeDialog.vue' +import TransferQueueDialog from '@/components/dialog/TransferQueueDialog.vue' import ProgressDialog from '@/components/dialog/ProgressDialog.vue' import { useRoute } from 'vue-router' import router from '@/router' @@ -24,6 +25,9 @@ const route = useRoute() // 重新整理对话框 const redoDialog = ref(false) +// 整理队列对话框 +const transferQueueDialog = ref(false) + // 当前操作记录 const currentHistory = ref() @@ -380,7 +384,12 @@ onMounted(fetchData) /> - + 整理队列 @@ -541,6 +550,8 @@ onMounted(fetchData) @done="transferDone" @close="redoDialog = false" /> + +