mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 15:36:49 +08:00
fix ui
This commit is contained in:
@@ -390,12 +390,18 @@ function formatAirDate(airDate: string) {
|
|||||||
const date = new Date(airDate.replaceAll(/-/g, '/'))
|
const date = new Date(airDate.replaceAll(/-/g, '/'))
|
||||||
return `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日`
|
return `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 从yyyy-mm-dd中提取年份
|
// 从yyyy-mm-dd中提取年份
|
||||||
function getYear(airDate: string) {
|
function getYear(airDate: string) {
|
||||||
if (!airDate) return ''
|
if (!airDate) return ''
|
||||||
const date = new Date(airDate.replaceAll(/-/g, '/'))
|
const date = new Date(airDate.replaceAll(/-/g, '/'))
|
||||||
return date.getFullYear()
|
return date.getFullYear()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 移除订阅
|
||||||
|
function onRemoveSubscribe() {
|
||||||
|
subscribeEditDialog.value = false
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -542,12 +548,7 @@ function getYear(airDate: string) {
|
|||||||
:subid="subscribeId"
|
:subid="subscribeId"
|
||||||
@close="subscribeEditDialog = false"
|
@close="subscribeEditDialog = false"
|
||||||
@save="subscribeEditDialog = false"
|
@save="subscribeEditDialog = false"
|
||||||
@remove="
|
@remove="onRemoveSubscribe"
|
||||||
() => {
|
|
||||||
subscribeEditDialog = false
|
|
||||||
handleCheckSubscribe()
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import type { SubscribeShare } from '@/api/types'
|
|||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import { useToast } from 'vue-toast-notification'
|
import { useToast } from 'vue-toast-notification'
|
||||||
import { useConfirm } from 'vuetify-use-dialog'
|
import { useConfirm } from 'vuetify-use-dialog'
|
||||||
|
import SubscribeEditDialog from '../dialog/SubscribeEditDialog.vue'
|
||||||
|
|
||||||
// 输入参数
|
// 输入参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -24,6 +25,12 @@ const globalSettings: any = inject('globalSettings')
|
|||||||
// 图片是否加载完成
|
// 图片是否加载完成
|
||||||
const imageLoaded = ref(false)
|
const imageLoaded = ref(false)
|
||||||
|
|
||||||
|
// 订阅编辑弹窗
|
||||||
|
const subscribeEditDialog = ref(false)
|
||||||
|
|
||||||
|
// 订阅ID
|
||||||
|
const subscribeId = ref<number>()
|
||||||
|
|
||||||
// 图片加载完成响应
|
// 图片加载完成响应
|
||||||
function imageLoadHandler() {
|
function imageLoadHandler() {
|
||||||
imageLoaded.value = true
|
imageLoaded.value = true
|
||||||
@@ -79,6 +86,9 @@ async function forkSubscribe() {
|
|||||||
// 订阅状态
|
// 订阅状态
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
$toast.success(`${props.media?.share_title} 添加订阅成功!`)
|
$toast.success(`${props.media?.share_title} 添加订阅成功!`)
|
||||||
|
// 弹出订阅编辑弹窗
|
||||||
|
subscribeId.value = result.data.id
|
||||||
|
subscribeEditDialog.value = true
|
||||||
} else {
|
} else {
|
||||||
$toast.error(`${props.media?.share_title} 添加订阅失败:${result.message}!`)
|
$toast.error(`${props.media?.share_title} 添加订阅失败:${result.message}!`)
|
||||||
}
|
}
|
||||||
@@ -153,6 +163,15 @@ async function forkSubscribe() {
|
|||||||
</VCard>
|
</VCard>
|
||||||
</template>
|
</template>
|
||||||
</VHover>
|
</VHover>
|
||||||
|
<!-- 订阅编辑弹窗 -->
|
||||||
|
<SubscribeEditDialog
|
||||||
|
v-if="subscribeEditDialog"
|
||||||
|
v-model="subscribeEditDialog"
|
||||||
|
:subid="subscribeId"
|
||||||
|
@close="subscribeEditDialog = false"
|
||||||
|
@save="subscribeEditDialog = false"
|
||||||
|
@remove="subscribeEditDialog = false"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.subscribe-card-background {
|
.subscribe-card-background {
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ onMounted(() => {
|
|||||||
<VWindowItem value="basic">
|
<VWindowItem value="basic">
|
||||||
<div>
|
<div>
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="4">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-if="!props.default"
|
v-if="!props.default"
|
||||||
v-model="subscribeForm.keyword"
|
v-model="subscribeForm.keyword"
|
||||||
@@ -330,7 +330,7 @@ onMounted(() => {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol v-if="subscribeForm.type === '电视剧'" cols="12" md="3">
|
<VCol v-if="subscribeForm.type === '电视剧'" cols="12" md="4">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="subscribeForm.total_episode"
|
v-model="subscribeForm.total_episode"
|
||||||
label="总集数"
|
label="总集数"
|
||||||
@@ -339,7 +339,7 @@ onMounted(() => {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol v-if="subscribeForm.type === '电视剧'" cols="12" md="3">
|
<VCol v-if="subscribeForm.type === '电视剧'" cols="12" md="4">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="subscribeForm.start_episode"
|
v-model="subscribeForm.start_episode"
|
||||||
label="开始集数"
|
label="开始集数"
|
||||||
@@ -350,18 +350,36 @@ onMounted(() => {
|
|||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="4">
|
||||||
<VSelect
|
<VSelect
|
||||||
v-model="subscribeForm.filter_groups"
|
v-model="subscribeForm.quality"
|
||||||
:items="filterRuleGroupOptions"
|
label="质量"
|
||||||
chips
|
:items="qualityOptions"
|
||||||
multiple
|
hint="订阅资源质量"
|
||||||
label="优先级规则组"
|
|
||||||
hint="按选定的过滤规则组对订阅进行过滤"
|
|
||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="4">
|
||||||
|
<VSelect
|
||||||
|
v-model="subscribeForm.resolution"
|
||||||
|
label="分辨率"
|
||||||
|
:items="resolutionOptions"
|
||||||
|
hint="订阅资源分辨率"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="4">
|
||||||
|
<VSelect
|
||||||
|
v-model="subscribeForm.effect"
|
||||||
|
label="特效"
|
||||||
|
:items="effectOptions"
|
||||||
|
hint="订阅资源特效"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
</VRow>
|
||||||
|
<VRow>
|
||||||
|
<VCol cols="12">
|
||||||
<VSelect
|
<VSelect
|
||||||
v-model="subscribeForm.sites"
|
v-model="subscribeForm.sites"
|
||||||
:items="selectSitesOptions"
|
:items="selectSitesOptions"
|
||||||
@@ -373,25 +391,6 @@ onMounted(() => {
|
|||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
<VRow>
|
|
||||||
<VCol cols="12" md="6">
|
|
||||||
<VTextField
|
|
||||||
v-model="subscribeForm.media_category"
|
|
||||||
label="自定义类别"
|
|
||||||
hint="指定类别名称,留空自动识别"
|
|
||||||
persistent-hint
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="6">
|
|
||||||
<VCombobox
|
|
||||||
v-model="subscribeForm.save_path"
|
|
||||||
:items="targetDirectories"
|
|
||||||
label="自定义保存路径"
|
|
||||||
hint="指定该订阅的下载保存路径,留空自动使用设定的下载目录"
|
|
||||||
persistent-hint
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="4">
|
<VCol cols="12" md="4">
|
||||||
<VSwitch
|
<VSwitch
|
||||||
@@ -422,35 +421,6 @@ onMounted(() => {
|
|||||||
</VWindowItem>
|
</VWindowItem>
|
||||||
<VWindowItem value="advance">
|
<VWindowItem value="advance">
|
||||||
<div>
|
<div>
|
||||||
<VRow>
|
|
||||||
<VCol cols="12" md="4">
|
|
||||||
<VSelect
|
|
||||||
v-model="subscribeForm.quality"
|
|
||||||
label="质量"
|
|
||||||
:items="qualityOptions"
|
|
||||||
hint="订阅资源质量"
|
|
||||||
persistent-hint
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="4">
|
|
||||||
<VSelect
|
|
||||||
v-model="subscribeForm.resolution"
|
|
||||||
label="分辨率"
|
|
||||||
:items="resolutionOptions"
|
|
||||||
hint="订阅资源分辨率"
|
|
||||||
persistent-hint
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="4">
|
|
||||||
<VSelect
|
|
||||||
v-model="subscribeForm.effect"
|
|
||||||
label="特效"
|
|
||||||
:items="effectOptions"
|
|
||||||
hint="订阅资源特效"
|
|
||||||
persistent-hint
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField
|
||||||
@@ -469,6 +439,38 @@ onMounted(() => {
|
|||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
|
<VRow>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VSelect
|
||||||
|
v-model="subscribeForm.filter_groups"
|
||||||
|
:items="filterRuleGroupOptions"
|
||||||
|
chips
|
||||||
|
multiple
|
||||||
|
label="优先级规则组"
|
||||||
|
hint="按选定的过滤规则组对订阅进行过滤"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VTextField
|
||||||
|
v-model="subscribeForm.media_category"
|
||||||
|
label="自定义类别"
|
||||||
|
hint="指定类别名称,留空自动识别"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
</VRow>
|
||||||
|
<VRow>
|
||||||
|
<VCol cols="12">
|
||||||
|
<VCombobox
|
||||||
|
v-model="subscribeForm.save_path"
|
||||||
|
:items="targetDirectories"
|
||||||
|
label="自定义保存路径"
|
||||||
|
hint="指定该订阅的下载保存路径,留空自动使用设定的下载目录"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
</VRow>
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12">
|
<VCol cols="12">
|
||||||
<VTextarea
|
<VTextarea
|
||||||
|
|||||||
Reference in New Issue
Block a user