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