mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-07-23 22:19:34 +08:00
重构存储选项,更新为存储属性,优化存储字典和图标字典的生成逻辑,提升组件对存储配置的支持
This commit is contained in:
@@ -1,49 +1,48 @@
|
||||
import i18n from '@/plugins/i18n'
|
||||
|
||||
export const storageOptions = [
|
||||
export const storageAttributes = [
|
||||
{
|
||||
title: i18n.global.t('storage.local'),
|
||||
value: 'local',
|
||||
type: 'local',
|
||||
icon: 'mdi-folder-multiple-outline',
|
||||
remote: false,
|
||||
},
|
||||
{
|
||||
title: i18n.global.t('storage.alipan'),
|
||||
value: 'alipan',
|
||||
type: 'alipan',
|
||||
icon: 'mdi-cloud-outline',
|
||||
remote: true,
|
||||
},
|
||||
{
|
||||
title: i18n.global.t('storage.u115'),
|
||||
value: 'u115',
|
||||
type: 'u115',
|
||||
icon: 'mdi-cloud-outline',
|
||||
remote: true,
|
||||
},
|
||||
{
|
||||
title: i18n.global.t('storage.rclone'),
|
||||
value: 'rclone',
|
||||
type: 'rclone',
|
||||
icon: 'mdi-server-network-outline',
|
||||
remote: true,
|
||||
},
|
||||
{
|
||||
title: i18n.global.t('storage.alist'),
|
||||
value: 'alist',
|
||||
type: 'alist',
|
||||
icon: 'mdi-server-network-outline',
|
||||
remote: true,
|
||||
},
|
||||
{
|
||||
title: i18n.global.t('storage.custom'),
|
||||
value: 'custom',
|
||||
icon: 'mdi-cog-outline',
|
||||
type: 'custom',
|
||||
icon: 'mdi-database',
|
||||
remote: true,
|
||||
},
|
||||
]
|
||||
|
||||
export const storageDict = storageOptions.reduce((dict, item) => {
|
||||
dict[item.value] = item.title
|
||||
export const storageIconDict = storageAttributes.reduce((dict, item) => {
|
||||
dict[item.type] = item.icon
|
||||
return dict
|
||||
}, {} as Record<string, string>)
|
||||
|
||||
export const storageRemoteDict = storageAttributes.reduce((dict, item) => {
|
||||
dict[item.type] = item.remote
|
||||
return dict
|
||||
}, {} as Record<string, boolean>)
|
||||
|
||||
export const innerFilterRules = [
|
||||
{ title: i18n.global.t('filterRules.specSub'), value: ' SPECSUB ' },
|
||||
{ title: i18n.global.t('filterRules.cnSub'), value: ' CNSUB ' },
|
||||
|
||||
Reference in New Issue
Block a user