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