mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
fix
This commit is contained in:
@@ -93,6 +93,7 @@ async function handleAddSubscribe() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// 弹出季选择列表,支持多选
|
// 弹出季选择列表,支持多选
|
||||||
|
seasonsSelected.value = []
|
||||||
subscribeSeasonDialog.value = true
|
subscribeSeasonDialog.value = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,9 +170,9 @@ function showSubscribeAddToast(result: boolean,
|
|||||||
if (best_version > 0)
|
if (best_version > 0)
|
||||||
subname = '洗版订阅'
|
subname = '洗版订阅'
|
||||||
|
|
||||||
if (result)
|
if (result && seasonsSelected.value.length > 1)
|
||||||
$toast.success(`${title} 添加${subname}成功!`)
|
$toast.success(`${title} 添加${subname}成功!`)
|
||||||
else
|
else if (!result)
|
||||||
$toast.error(`${title} 添加${subname}失败:${message}!`)
|
$toast.error(`${title} 添加${subname}失败:${message}!`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -255,7 +255,10 @@ const dropdownItems = ref([
|
|||||||
查看详情
|
查看详情
|
||||||
</VBtn>
|
</VBtn>
|
||||||
<VSpacer />
|
<VSpacer />
|
||||||
<VBtn @click="savePluginConf">
|
<VBtn
|
||||||
|
variant="tonal"
|
||||||
|
@click="savePluginConf"
|
||||||
|
>
|
||||||
保存
|
保存
|
||||||
</VBtn>
|
</VBtn>
|
||||||
</VCardActions>
|
</VCardActions>
|
||||||
@@ -279,11 +282,16 @@ const dropdownItems = ref([
|
|||||||
/>
|
/>
|
||||||
</VCardText>
|
</VCardText>
|
||||||
<VCardActions>
|
<VCardActions>
|
||||||
<VBtn @click="showPluginConfig">
|
<VBtn
|
||||||
|
@click="showPluginConfig"
|
||||||
|
>
|
||||||
配置
|
配置
|
||||||
</VBtn>
|
</VBtn>
|
||||||
<VSpacer />
|
<VSpacer />
|
||||||
<VBtn @click="pluginInfoDialog = false">
|
<VBtn
|
||||||
|
variant="tonal"
|
||||||
|
@click="pluginInfoDialog = false"
|
||||||
|
>
|
||||||
关闭
|
关闭
|
||||||
</VBtn>
|
</VBtn>
|
||||||
</VCardActions>
|
</VCardActions>
|
||||||
|
|||||||
@@ -278,10 +278,14 @@ onMounted(() => {
|
|||||||
</VAvatar>
|
</VAvatar>
|
||||||
</template>
|
</template>
|
||||||
<VCardItem>
|
<VCardItem>
|
||||||
<VCardTitle class="font-bold" @click.stop="openSitePage">
|
<VCardTitle class="font-bold">
|
||||||
{{ cardProps.site?.name }}
|
{{ cardProps.site?.name }}
|
||||||
</VCardTitle>
|
</VCardTitle>
|
||||||
<VCardSubtitle>{{ cardProps.site?.url }}</VCardSubtitle>
|
<VCardSubtitle
|
||||||
|
@click.stop="openSitePage"
|
||||||
|
>
|
||||||
|
{{ cardProps.site?.url }}
|
||||||
|
</VCardSubtitle>
|
||||||
</VCardItem>
|
</VCardItem>
|
||||||
|
|
||||||
<ExistIcon v-if="siteForm.is_active" />
|
<ExistIcon v-if="siteForm.is_active" />
|
||||||
@@ -550,7 +554,10 @@ onMounted(() => {
|
|||||||
删除
|
删除
|
||||||
</VBtn>
|
</VBtn>
|
||||||
<VSpacer />
|
<VSpacer />
|
||||||
<VBtn @click="updateSiteInfo">
|
<VBtn
|
||||||
|
variant="tonal"
|
||||||
|
@click="updateSiteInfo"
|
||||||
|
>
|
||||||
确定
|
确定
|
||||||
</VBtn>
|
</VBtn>
|
||||||
</VCardActions>
|
</VCardActions>
|
||||||
|
|||||||
@@ -64,6 +64,9 @@ async function handleAddDownload(_site: any = undefined,
|
|||||||
dialogProps: {
|
dialogProps: {
|
||||||
maxWidth: '50rem',
|
maxWidth: '50rem',
|
||||||
},
|
},
|
||||||
|
confirmationButtonProps: {
|
||||||
|
variant: 'tonal',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!isConfirmed)
|
if (!isConfirmed)
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ async function handleAddDownload(_site: any = undefined,
|
|||||||
dialogProps: {
|
dialogProps: {
|
||||||
maxWidth: '50rem',
|
maxWidth: '50rem',
|
||||||
},
|
},
|
||||||
|
confirmationButtonProps: {
|
||||||
|
variant: 'tonal',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!isConfirmed)
|
if (!isConfirmed)
|
||||||
|
|||||||
@@ -158,6 +158,9 @@ async function deleteItem(item: FileItem) {
|
|||||||
dialogProps: {
|
dialogProps: {
|
||||||
maxWidth: '50rem',
|
maxWidth: '50rem',
|
||||||
},
|
},
|
||||||
|
confirmationButtonProps: {
|
||||||
|
variant: 'tonal',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
@@ -596,13 +599,14 @@ onMounted(() => {
|
|||||||
<VTextField v-model="newName" label="名称" />
|
<VTextField v-model="newName" label="名称" />
|
||||||
</VCardText>
|
</VCardText>
|
||||||
<VCardActions>
|
<VCardActions>
|
||||||
<div class="flex-grow-1" />
|
|
||||||
<VBtn depressed @click="renamePopper = false">
|
<VBtn depressed @click="renamePopper = false">
|
||||||
取消
|
取消
|
||||||
</VBtn>
|
</VBtn>
|
||||||
|
<VSpacer />
|
||||||
<VBtn
|
<VBtn
|
||||||
:disabled="!newName"
|
:disabled="!newName"
|
||||||
depressed
|
depressed
|
||||||
|
variant="tonal"
|
||||||
@click="rename"
|
@click="rename"
|
||||||
>
|
>
|
||||||
重命名
|
重命名
|
||||||
@@ -738,6 +742,7 @@ onMounted(() => {
|
|||||||
</VBtn>
|
</VBtn>
|
||||||
<VSpacer />
|
<VSpacer />
|
||||||
<VBtn
|
<VBtn
|
||||||
|
variant="tonal"
|
||||||
@click="transfer"
|
@click="transfer"
|
||||||
>
|
>
|
||||||
开始整理
|
开始整理
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const siteList = ref<Site[]>([])
|
|||||||
const selectSitesOptions = ref<{ [key: number]: string }[]>([])
|
const selectSitesOptions = ref<{ [key: number]: string }[]>([])
|
||||||
|
|
||||||
// 订阅编辑表单
|
// 订阅编辑表单
|
||||||
let subscribeForm = reactive<Subscribe>({
|
const subscribeForm = ref<Subscribe>({
|
||||||
id: props.subid ?? 0,
|
id: props.subid ?? 0,
|
||||||
keyword: '',
|
keyword: '',
|
||||||
quality: '',
|
quality: '',
|
||||||
@@ -47,15 +47,15 @@ const $toast = useToast()
|
|||||||
// 调用API修改订阅
|
// 调用API修改订阅
|
||||||
async function updateSubscribeInfo() {
|
async function updateSubscribeInfo() {
|
||||||
try {
|
try {
|
||||||
subscribeForm.best_version = subscribeForm.best_version ? 1 : 0
|
subscribeForm.value.best_version = subscribeForm.value.best_version ? 1 : 0
|
||||||
const result: { [key: string]: any } = await api.put('subscribe/', subscribeForm)
|
const result: { [key: string]: any } = await api.put('subscribe/', subscribeForm.value)
|
||||||
// 提示
|
// 提示
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
$toast.success(`${subscribeForm.name} 更新成功!`)
|
$toast.success(`${subscribeForm.value.name} 更新成功!`)
|
||||||
// 通知父组件刷新
|
// 通知父组件刷新
|
||||||
emit('save')
|
emit('save')
|
||||||
}
|
}
|
||||||
else { $toast.error(`${subscribeForm.name} 更新失败:${result.message}!`) }
|
else { $toast.error(`${subscribeForm.value.name} 更新失败:${result.message}!`) }
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
@@ -97,8 +97,8 @@ async function getSubscribeInfo() {
|
|||||||
const result: Subscribe = await api.get(
|
const result: Subscribe = await api.get(
|
||||||
`subscribe/${props.subid}`,
|
`subscribe/${props.subid}`,
|
||||||
)
|
)
|
||||||
subscribeForm = result
|
subscribeForm.value = result
|
||||||
subscribeForm.best_version = subscribeForm.best_version === 1
|
subscribeForm.value.best_version = subscribeForm.value.best_version === 1
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
@@ -122,6 +122,11 @@ async function removeSubscribe() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
if (props.subid)
|
||||||
|
getSubscribeInfo()
|
||||||
|
})
|
||||||
|
|
||||||
// 质量选择框数据
|
// 质量选择框数据
|
||||||
const qualityOptions = ref([
|
const qualityOptions = ref([
|
||||||
{
|
{
|
||||||
@@ -210,8 +215,6 @@ const effectOptions = ref([
|
|||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// 加载订阅站点列表
|
// 加载订阅站点列表
|
||||||
getSiteList()
|
getSiteList()
|
||||||
// 加载订阅信息
|
|
||||||
getSubscribeInfo()
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -221,7 +224,7 @@ onMounted(async () => {
|
|||||||
scrollable
|
scrollable
|
||||||
>
|
>
|
||||||
<VCard
|
<VCard
|
||||||
:title="`编辑订阅 - ${subscribeForm?.name} ${subscribeForm?.season ? `季 ${subscribeForm?.season}` : ''}`"
|
:title="`编辑订阅 - ${subscribeForm.name} ${subscribeForm.season ? `第 ${subscribeForm.season} 季` : ''}`"
|
||||||
class="rounded-t"
|
class="rounded-t"
|
||||||
>
|
>
|
||||||
<VCardText class="pt-2">
|
<VCardText class="pt-2">
|
||||||
@@ -230,7 +233,7 @@ onMounted(async () => {
|
|||||||
<VRow>
|
<VRow>
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
md="6"
|
md="8"
|
||||||
>
|
>
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="subscribeForm.keyword"
|
v-model="subscribeForm.keyword"
|
||||||
@@ -238,9 +241,9 @@ onMounted(async () => {
|
|||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol
|
<VCol
|
||||||
v-if="subscribeForm?.type === '电视剧'"
|
v-if="subscribeForm.type === '电视剧'"
|
||||||
cols="12"
|
cols="12"
|
||||||
md="3"
|
md="2"
|
||||||
>
|
>
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="subscribeForm.total_episode"
|
v-model="subscribeForm.total_episode"
|
||||||
@@ -249,9 +252,9 @@ onMounted(async () => {
|
|||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol
|
<VCol
|
||||||
v-if="subscribeForm?.type === '电视剧'"
|
v-if="subscribeForm.type === '电视剧'"
|
||||||
cols="12"
|
cols="12"
|
||||||
md="3"
|
md="2"
|
||||||
>
|
>
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="subscribeForm.start_episode"
|
v-model="subscribeForm.start_episode"
|
||||||
@@ -295,7 +298,7 @@ onMounted(async () => {
|
|||||||
<VRow>
|
<VRow>
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
md="6"
|
md="4"
|
||||||
>
|
>
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="subscribeForm.include"
|
v-model="subscribeForm.include"
|
||||||
@@ -304,16 +307,17 @@ onMounted(async () => {
|
|||||||
</VCol>
|
</VCol>
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
md="6"
|
md="4"
|
||||||
>
|
>
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="subscribeForm.exclude"
|
v-model="subscribeForm.exclude"
|
||||||
label="排除(关键字、正则式)"
|
label="排除(关键字、正则式)"
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
<VCol
|
||||||
<VRow>
|
cols="12"
|
||||||
<VCol cols="12">
|
md="4"
|
||||||
|
>
|
||||||
<VSelect
|
<VSelect
|
||||||
v-model="subscribeForm.sites"
|
v-model="subscribeForm.sites"
|
||||||
:items="selectSitesOptions"
|
:items="selectSitesOptions"
|
||||||
@@ -336,10 +340,13 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<VCardActions>
|
<VCardActions>
|
||||||
<VBtn color="error" @click="removeSubscribe">
|
<VBtn color="error" @click="removeSubscribe">
|
||||||
删除
|
取消订阅
|
||||||
</VBtn>
|
</VBtn>
|
||||||
<VSpacer />
|
<VSpacer />
|
||||||
<VBtn @click="updateSubscribeInfo">
|
<VBtn
|
||||||
|
variant="tonal"
|
||||||
|
@click="updateSubscribeInfo"
|
||||||
|
>
|
||||||
保存
|
保存
|
||||||
</VBtn>
|
</VBtn>
|
||||||
</VCardActions>
|
</VCardActions>
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ function openSearchDialog() {
|
|||||||
<VCardActions>
|
<VCardActions>
|
||||||
<VSpacer />
|
<VSpacer />
|
||||||
<VBtn
|
<VBtn
|
||||||
|
variant="tonal"
|
||||||
@click="search"
|
@click="search"
|
||||||
>
|
>
|
||||||
搜索
|
搜索
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ async function restart() {
|
|||||||
dialogProps: {
|
dialogProps: {
|
||||||
maxWidth: '30rem',
|
maxWidth: '30rem',
|
||||||
},
|
},
|
||||||
|
cancellationButtonProps: {
|
||||||
|
variant: 'tonal',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
|
|||||||
@@ -244,9 +244,7 @@ function showSubscribeAddToast(result: boolean,
|
|||||||
if (best_version > 0)
|
if (best_version > 0)
|
||||||
subname = '洗版订阅'
|
subname = '洗版订阅'
|
||||||
|
|
||||||
if (result)
|
if (!result)
|
||||||
$toast.success(`${title} 添加${subname}成功!`)
|
|
||||||
else
|
|
||||||
$toast.error(`${title} 添加${subname}失败:${message}!`)
|
$toast.error(`${title} 添加${subname}失败:${message}!`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -476,6 +476,7 @@ const dropdownItems = ref([
|
|||||||
<VCardActions>
|
<VCardActions>
|
||||||
<VSpacer />
|
<VSpacer />
|
||||||
<VBtn
|
<VBtn
|
||||||
|
variant="tonal"
|
||||||
@click="rehandleHistory"
|
@click="rehandleHistory"
|
||||||
@keydown.enter="rehandleHistory"
|
@keydown.enter="rehandleHistory"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user