mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-07-07 15:31:29 +08:00
feat: 更新了分类配置的API端点,并为对话框添加了小屏幕全屏显示功能。
This commit is contained in:
@@ -4,6 +4,10 @@ import api from '@/api'
|
|||||||
import type { CategoryConfig } from '@/api/types'
|
import type { CategoryConfig } from '@/api/types'
|
||||||
import { useToast } from 'vue-toastification'
|
import { useToast } from 'vue-toastification'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { useDisplay } from 'vuetify'
|
||||||
|
|
||||||
|
// 显示器宽度
|
||||||
|
const display = useDisplay()
|
||||||
|
|
||||||
// 定义输入参数
|
// 定义输入参数
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -139,7 +143,7 @@ const countryOptions = [
|
|||||||
const fetchConfig = async () => {
|
const fetchConfig = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const res: any = await api.get('category/')
|
const res: any = await api.get('media/category/config')
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
parseConfig(res.data)
|
parseConfig(res.data)
|
||||||
}
|
}
|
||||||
@@ -330,7 +334,7 @@ const saveConfig = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const res: any = await api.post('category/', payload)
|
const res: any = await api.post('media/category/config', payload)
|
||||||
if (res && res.success) {
|
if (res && res.success) {
|
||||||
toast.success(t('setting.category.saveSuccess'))
|
toast.success(t('setting.category.saveSuccess'))
|
||||||
emit('save')
|
emit('save')
|
||||||
@@ -352,7 +356,7 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VDialog :model-value="modelValue" max-width="1000" scrollable>
|
<VDialog :model-value="modelValue" max-width="1000" scrollable :fullscreen="!display.mdAndUp.value">
|
||||||
<VCard>
|
<VCard>
|
||||||
<VDialogCloseBtn @click="emit('close')" />
|
<VDialogCloseBtn @click="emit('close')" />
|
||||||
<VCardItem class="py-3">
|
<VCardItem class="py-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user