diff --git a/src/api/types.ts b/src/api/types.ts index 4414c6b6..a25fdb57 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -847,22 +847,124 @@ export interface SystemNotification { date: string } -// 下载目录/媒体库目录 -export interface MediaDirectory { - // 类型 download/library - type?: string - // 别名 - name?: string - // 路径 - path?: string - // 媒体类型 电影/电视剧 - media_type?: string - // 媒体类别 动画电影/国产剧 - category?: string - // 刮削媒体信息 - scrape?: boolean - // 自动二级分类,未指定类别时自动分类 - auto_category?: boolean - // 优先级 - priority?: number +// 下载器配置 +export interface DownloaderConf { + // 名称 + name: string + // 类型 qbittorrent/transmission + type: string + // 是否默认 + default: boolean + // 配置 + config?: { [key: string]: any } + // 是否启用 + enabled: boolean +} + +// 通知配置 +export interface NotificationConf { + // 名称 + name: string + // 类型 telegram/wechat/vocechat/synologychat + type: string + // 配置 + config?: { [key: string]: any } + // 场景开关 + switchs?: string[] + // 是否启用 + enabled: boolean +} + +// 通知场景开关配置 +export interface NotificationSwitchConf { + // 场景名称 + type: string + // 通知范围 all/user/admin + action: string +} + +// 存储配置 +export interface StorageConf { + // 类型 local/alipan/u115/rclone + type: string + // 配置 + config?: { [key: string]: any } +} + +// 媒体服务器配置 +export interface MediaServerConf { + // 名称 + name: string + // 类型 emby/jellyfin/plex + type: string + // 配置 + config?: { [key: string]: any } + // 是否启用 + enabled: boolean + // 同步媒体体库列表 + sync_libraries?: string[] +} + +// 文件整理目录配置 +export interface TransferDirectoryConf { + // 名称 + name: string + // 优先级 + priority: number + // 存储 + storage: string + // 下载目录 + download_path?: string + // 适用媒体类型 + media_type?: string + // 适用媒体类别 + media_category?: string + // 下载类型子目录 + download_type_folder?: boolean + // 下载类别子目录 + download_category_folder?: boolean + // 监控方式 downloader/monitor,None为不监控 + monitor_type?: string + // 整理方式 move/copy/link/softlink + transfer_type?: string + // 文件覆盖模式 always/size/never/latest + overwrite_mode?: string + // 整理到媒体库目录 + library_path?: string + // 媒体库目录存储 + library_storage?: string + // 智能重命名 + renaming?: boolean + // 刮削 + scraping?: boolean + // 媒体库类型子目录 + library_type_folder?: boolean + // 媒体库类别子目录 + library_category_folder?: boolean +} + +// 自定义规则项 +export interface CustomRule { + // 规则ID + id: string + // 名称 + name: string + // 包含 + include?: string[] + // 排除 + exclude?: string[] + // 大小范围 + size_range?: string + // 最少做种人数 + seeders?: string +} + +// 过滤规则组 +export interface FilterRuleGroup { + // 名称 + name: string + // 规则串 + rule_string?: string + // 适用类媒体类别 None-全部 电影/电视剧 + media_type?: string } diff --git a/src/components/cards/CustomRuleCard.vue b/src/components/cards/CustomRuleCard.vue new file mode 100644 index 00000000..11645e02 --- /dev/null +++ b/src/components/cards/CustomRuleCard.vue @@ -0,0 +1,2 @@ + + diff --git a/src/components/cards/DownloaderCard.vue b/src/components/cards/DownloaderCard.vue new file mode 100644 index 00000000..11645e02 --- /dev/null +++ b/src/components/cards/DownloaderCard.vue @@ -0,0 +1,2 @@ + + diff --git a/src/components/cards/FilterRuleGroupCard.vue b/src/components/cards/FilterRuleGroupCard.vue new file mode 100644 index 00000000..11645e02 --- /dev/null +++ b/src/components/cards/FilterRuleGroupCard.vue @@ -0,0 +1,2 @@ + + diff --git a/src/components/cards/MediaServerCard.vue b/src/components/cards/MediaServerCard.vue new file mode 100644 index 00000000..11645e02 --- /dev/null +++ b/src/components/cards/MediaServerCard.vue @@ -0,0 +1,2 @@ + + diff --git a/src/components/cards/NotificationChannelCard.vue b/src/components/cards/NotificationChannelCard.vue new file mode 100644 index 00000000..11645e02 --- /dev/null +++ b/src/components/cards/NotificationChannelCard.vue @@ -0,0 +1,2 @@ + + diff --git a/src/components/cards/StorageCard.vue b/src/components/cards/StorageCard.vue new file mode 100644 index 00000000..11645e02 --- /dev/null +++ b/src/components/cards/StorageCard.vue @@ -0,0 +1,2 @@ + + diff --git a/src/components/cards/UserCard.vue b/src/components/cards/UserCard.vue new file mode 100644 index 00000000..11645e02 --- /dev/null +++ b/src/components/cards/UserCard.vue @@ -0,0 +1,2 @@ + + diff --git a/src/components/dialog/UserAddEditDialog.vue b/src/components/dialog/UserAddEditDialog.vue new file mode 100644 index 00000000..11645e02 --- /dev/null +++ b/src/components/dialog/UserAddEditDialog.vue @@ -0,0 +1,2 @@ + + diff --git a/src/layouts/components/UserProfile.vue b/src/layouts/components/UserProfile.vue index 33a3ba39..964d8898 100644 --- a/src/layouts/components/UserProfile.vue +++ b/src/layouts/components/UserProfile.vue @@ -79,7 +79,6 @@ watch(isCompactMode, value => { - diff --git a/src/pages/setting.vue b/src/pages/setting.vue index d9364805..6e577067 100644 --- a/src/pages/setting.vue +++ b/src/pages/setting.vue @@ -10,6 +10,7 @@ import AccountSettingSubscribe from '@/views/setting/AccountSettingSubscribe.vue import AccountSettingService from '@/views/setting/AccountSettingService.vue' import AccountSettingSystem from '@/views/setting/AccountSettingSystem.vue' import AccountSettingDirectory from '@/views/setting/AccountSettingDirectory.vue' +import AccountSettingRule from '@/views/setting/AccountSettingRule.vue' import { SettingTabs } from '@/router/menu' const route = useRoute() @@ -58,6 +59,13 @@ function jumpTab(tab: string) { + + + + + + + diff --git a/src/router/menu.ts b/src/router/menu.ts index 836079e1..43ce4b04 100644 --- a/src/router/menu.ts +++ b/src/router/menu.ts @@ -134,7 +134,7 @@ export const SettingTabs = [ description: '下载器(Qbittorrent、Transmission)、媒体服务器(Emby、Jellyfin、Plex)', }, { - title: '目录', + title: '存储 & 目录', icon: 'mdi-folder', tab: 'directory', description: '下载目录、媒体库目录、整理模式', @@ -145,6 +145,12 @@ export const SettingTabs = [ tab: 'site', description: '站点同步、下载优先规则、站点重置', }, + { + title: '规则', + icon: 'mdi-filter', + tab: 'rule', + description: '优先级规则组', + }, { title: '搜索', icon: 'mdi-magnify', diff --git a/src/styles/styles.scss b/src/styles/styles.scss index bc9453d6..2318b7de 100644 --- a/src/styles/styles.scss +++ b/src/styles/styles.scss @@ -181,6 +181,16 @@ padding-block-end: 1rem; } +.grid-user-card { + grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); + padding-block-end: 1rem; +} + +.grid-app-card { + grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); + padding-block-end: 1rem; +} + .v-tabs:not(.v-tabs-pill).v-tabs--horizontal { border-block-end: 1px solid rgba(var(--v-border-color), var(--v-border-opacity)); } diff --git a/src/views/discover/TorrentCardListView.vue b/src/views/discover/TorrentCardListView.vue index 57efba45..a646b16b 100644 --- a/src/views/discover/TorrentCardListView.vue +++ b/src/views/discover/TorrentCardListView.vue @@ -125,7 +125,6 @@ onMounted(() => { } }) groupedDataList.value = groupMap - }) // 只监听filterForm和groupedDataList的变化。因为displayDataList的变化不需要清空列表 @@ -265,12 +264,16 @@ function loadMore({ done }: { done: any }) { - -