mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
fix TransferHistoryView
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
export const storageOptions = [
|
||||||
|
{
|
||||||
|
title: '本地',
|
||||||
|
value: 'local',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '阿里云盘',
|
||||||
|
value: 'alipan',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '115网盘',
|
||||||
|
value: 'u115',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Rclone网盘',
|
||||||
|
value: 'rclone',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
export const storageDict = storageOptions.reduce((dict, item) => {
|
||||||
|
dict[item.value] = item.title
|
||||||
|
return dict
|
||||||
|
}, {} as Record<string, string>)
|
||||||
@@ -71,6 +71,10 @@ export interface Subscribe {
|
|||||||
export interface TransferHistory {
|
export interface TransferHistory {
|
||||||
// ID
|
// ID
|
||||||
id: number
|
id: number
|
||||||
|
// 源存储
|
||||||
|
src_storage?: string
|
||||||
|
// 目标存储
|
||||||
|
dest_storage?: string
|
||||||
// 源目录
|
// 源目录
|
||||||
src?: string
|
src?: string
|
||||||
// 目的目录
|
// 目的目录
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { useToast } from 'vue-toast-notification'
|
|||||||
import MediaIdSelector from '../misc/MediaIdSelector.vue'
|
import MediaIdSelector from '../misc/MediaIdSelector.vue'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import api from '@/api'
|
import api from '@/api'
|
||||||
|
import { storageOptions } from '@/api/constants'
|
||||||
import { numberValidator } from '@/@validators'
|
import { numberValidator } from '@/@validators'
|
||||||
import { useDisplay } from 'vuetify'
|
import { useDisplay } from 'vuetify'
|
||||||
import ProgressDialog from './ProgressDialog.vue'
|
import ProgressDialog from './ProgressDialog.vue'
|
||||||
@@ -36,25 +37,6 @@ const seasonItems = ref(
|
|||||||
})),
|
})),
|
||||||
)
|
)
|
||||||
|
|
||||||
const storageOptions = [
|
|
||||||
{
|
|
||||||
title: '本地',
|
|
||||||
value: 'local',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '阿里云盘',
|
|
||||||
value: 'alipan',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '115网盘',
|
|
||||||
value: 'u115',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Rclone网盘',
|
|
||||||
value: 'rclone',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
// 提示框
|
// 提示框
|
||||||
const $toast = useToast()
|
const $toast = useToast()
|
||||||
|
|
||||||
@@ -226,7 +208,7 @@ onMounted(() => {
|
|||||||
<VForm @submit.prevent="() => {}">
|
<VForm @submit.prevent="() => {}">
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VSelect
|
<VCombobox
|
||||||
v-model="transferForm.target_storage"
|
v-model="transferForm.target_storage"
|
||||||
:items="storageOptions"
|
:items="storageOptions"
|
||||||
label="目的存储"
|
label="目的存储"
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import ProgressDialog from '@/components/dialog/ProgressDialog.vue'
|
|||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import { useDisplay } from 'vuetify'
|
import { useDisplay } from 'vuetify'
|
||||||
|
import { storageDict } from '@/api/constants'
|
||||||
|
|
||||||
// 显示器宽度
|
// 显示器宽度
|
||||||
const display = useDisplay()
|
const display = useDisplay()
|
||||||
@@ -413,7 +414,18 @@ onMounted(fetchData)
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #item.src="{ item }">
|
<template #item.src="{ item }">
|
||||||
<small>{{ item?.src }} <br />=> {{ item?.dest }}</small>
|
<div>
|
||||||
|
<span>
|
||||||
|
<VChip size="small" label class="my-1"> {{ storageDict[item?.src_storage || ''] }}</VChip>
|
||||||
|
<small>{{ item?.src }}</small>
|
||||||
|
</span>
|
||||||
|
<span class="text-high-emphasis text-bold"> => </span>
|
||||||
|
<br />
|
||||||
|
<span>
|
||||||
|
<VChip size="small" label class="my-1"> {{ storageDict[item?.dest_storage || ''] }}</VChip>
|
||||||
|
<small>{{ item?.dest }}</small>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #item.mode="{ item }">
|
<template #item.mode="{ item }">
|
||||||
<VChip variant="outlined" color="primary" size="small">
|
<VChip variant="outlined" color="primary" size="small">
|
||||||
|
|||||||
Reference in New Issue
Block a user