mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-24 09:49:42 +08:00
Merge branch 'main' of https://github.com/jxxghp/MoviePilot-Frontend
This commit is contained in:
@@ -626,7 +626,7 @@ export interface MetaInfo {
|
||||
year?: string
|
||||
|
||||
// 总季数
|
||||
total_seasons: number
|
||||
total_season: number
|
||||
|
||||
// 识别的开始季 数字
|
||||
begin_season?: number
|
||||
|
||||
@@ -40,8 +40,8 @@ function getTextClass() {
|
||||
async function toggleDownload() {
|
||||
const operation = isDownloading.value ? 'stop' : 'start'
|
||||
try {
|
||||
const result: { [key: string]: any } = await api.put(
|
||||
`download/${props.info?.hash}/${operation}`,
|
||||
const result: { [key: string]: any } = await api.get(
|
||||
`download/${operation}/${props.info?.hash}`,
|
||||
)
|
||||
|
||||
if (result.success)
|
||||
@@ -109,9 +109,10 @@ async function deleteDownload() {
|
||||
</VCardText>
|
||||
|
||||
<VCardActions class="justify-space-between">
|
||||
<VBtn @click="toggleDownload">
|
||||
<span class="ms-2">{{ isDownloading ? "暂停" : "开始" }}</span>
|
||||
</VBtn>
|
||||
<VBtn
|
||||
:icon="`${isDownloading ? 'mdi-pause' : 'mdi-play'}`"
|
||||
@click="toggleDownload"
|
||||
/>
|
||||
<VBtn
|
||||
color="error"
|
||||
icon="mdi-trash-can-outline"
|
||||
|
||||
@@ -51,6 +51,11 @@ const siteName = ref('')
|
||||
// 订阅编辑表单
|
||||
const rssForm = reactive<any>(props.media ?? {})
|
||||
|
||||
// 类型转换
|
||||
rssForm.best_version = rssForm.best_version === 1
|
||||
rssForm.proxy = rssForm.proxy === 1
|
||||
rssForm.filter = rssForm.filter === 1
|
||||
|
||||
// 上一次更新时间
|
||||
const lastUpdateText = ref(
|
||||
`${
|
||||
|
||||
@@ -73,7 +73,7 @@ const resourceTotalItems = ref(0)
|
||||
const resourceItemsPerPage = ref(25)
|
||||
|
||||
// 当前页码
|
||||
const resourceCurrentPage = ref(1)
|
||||
const resourceCurrentPage = ref(0)
|
||||
|
||||
// 用户名密码表单
|
||||
const userPwForm = ref({
|
||||
@@ -90,6 +90,10 @@ const statusItems = [
|
||||
// 站点编辑表单数据
|
||||
const siteForm = reactive<any>(cardProps.site ?? {})
|
||||
|
||||
// 类型转换
|
||||
siteForm.proxy = siteForm.proxy === 1
|
||||
siteForm.render = siteForm.render === 1
|
||||
|
||||
// 打开种子详情页面
|
||||
function openTorrentDetail(page_url: string) {
|
||||
window.open(page_url, '_blank')
|
||||
@@ -216,6 +220,18 @@ async function updateSiteInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
// 促销Chip类
|
||||
function getVolumeFactorClass(downloadVolume: number, uploadVolume: number) {
|
||||
if (downloadVolume === 0)
|
||||
return 'text-white bg-lime-500'
|
||||
else if (downloadVolume < 1)
|
||||
return 'text-white bg-green-500'
|
||||
else if (uploadVolume !== 1)
|
||||
return 'text-white bg-sky-500'
|
||||
else
|
||||
return 'text-white bg-gray-500'
|
||||
}
|
||||
|
||||
// 调用API,查询站点资源
|
||||
async function getResourceList() {
|
||||
resourceLoading.value = true
|
||||
@@ -576,6 +592,17 @@ onMounted(() => {
|
||||
>
|
||||
{{ label }}
|
||||
</VChip>
|
||||
<VChip
|
||||
v-if="item.raw?.downloadvolumefactor !== 1 || item.raw?.uploadvolumefactor !== 1"
|
||||
:class="
|
||||
getVolumeFactorClass(item.raw?.downloadvolumefactor, item.raw?.uploadvolumefactor)
|
||||
"
|
||||
variant="elevated"
|
||||
size="small"
|
||||
class="me-1 mb-1"
|
||||
>
|
||||
{{ item.raw?.volume_factor }}
|
||||
</VChip>
|
||||
</template>
|
||||
<template #item.pubdate="{ item }">
|
||||
<div>{{ item.raw.date_elapsed }}</div>
|
||||
|
||||
@@ -32,6 +32,9 @@ const selectSitesOptions = ref<{ [key: number]: string }[]>([])
|
||||
// 订阅编辑表单
|
||||
const subscribeForm = reactive<any>(props.media ?? {})
|
||||
|
||||
// 类型转换
|
||||
subscribeForm.best_version = subscribeForm.best_version === 1
|
||||
|
||||
// 上一次更新时间
|
||||
const lastUpdateText = ref(
|
||||
`${
|
||||
|
||||
@@ -129,11 +129,8 @@ async function removeHistory(item: TransferHistory) {
|
||||
deleteFile = true
|
||||
|
||||
// 调用删除API
|
||||
const result: { [key: string]: any } = await api.delete('history/transfer', {
|
||||
data: {
|
||||
...item,
|
||||
delete_file: deleteFile,
|
||||
},
|
||||
const result: { [key: string]: any } = await api.delete(`history/transfer?delete_file=${deleteFile}`, {
|
||||
data: item,
|
||||
})
|
||||
|
||||
if (result.success) {
|
||||
|
||||
@@ -221,7 +221,7 @@ onMounted(() => {
|
||||
</div>
|
||||
|
||||
<p class="text-body-1 mb-0">
|
||||
允许 JPG、GIF 或 PNG 格式, 最大尽寸 800K。
|
||||
允许 JPG、GIF 或 PNG 格式, 最大尺寸 800K。
|
||||
</p>
|
||||
</form>
|
||||
</VCardText>
|
||||
|
||||
Reference in New Issue
Block a user