mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
await接口请求后才重新获取插件仪表板,解决仪表板调整配置保存时出现重复插件请求的问题
This commit is contained in:
@@ -180,7 +180,7 @@ function sortDashboardConfigs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 设置项目
|
// 设置项目
|
||||||
function saveDashboardConfig() {
|
async function saveDashboardConfig() {
|
||||||
// 启用配置
|
// 启用配置
|
||||||
const data = JSON.stringify(enableConfig.value)
|
const data = JSON.stringify(enableConfig.value)
|
||||||
localStorage.setItem('MP_DASHBOARD', data)
|
localStorage.setItem('MP_DASHBOARD', data)
|
||||||
@@ -191,12 +191,12 @@ function saveDashboardConfig() {
|
|||||||
localStorage.setItem('MP_DASHBOARD_ELEVATED', isElevated.value.toString())
|
localStorage.setItem('MP_DASHBOARD_ELEVATED', isElevated.value.toString())
|
||||||
// 保存到服务端
|
// 保存到服务端
|
||||||
try {
|
try {
|
||||||
api.post('/user/config/Dashboard', data, {
|
await api.post('/user/config/Dashboard', data, {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
api.post('/user/config/DashboardOrder', order, {
|
await api.post('/user/config/DashboardOrder', order, {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user