mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-01 13:51:06 +08:00
feat(downloading): add NoDataFound component for empty downloaders
Add the NoDataFound component to the downloading page to display a 404 error message when there are no enabled downloaders. This component will show an error code, title, and description to guide users on how to configure and enable downloaders in the settings. Closes #197
This commit is contained in:
@@ -3,6 +3,7 @@ import api from '@/api'
|
||||
import { DownloaderConf } from '@/api/types'
|
||||
import DownloadingListView from '@/views/reorganize/DownloadingListView.vue'
|
||||
import router from '@/router'
|
||||
import NoDataFound from '@/components/NoDataFound.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const activeTab = ref(route.query.tab)
|
||||
@@ -36,7 +37,7 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="enabledDownloaders.length > 0">
|
||||
<VTabs v-model="activeTab">
|
||||
<VTab v-for="item in enabledDownloaders" :value="item.name" @to="jumpTab(item.name)">
|
||||
<span class="mx-5">{{ item.name }}</span>
|
||||
@@ -51,4 +52,10 @@ onMounted(() => {
|
||||
</VWindowItem>
|
||||
</VWindow>
|
||||
</div>
|
||||
<NoDataFound
|
||||
v-else
|
||||
error-code="404"
|
||||
error-title="没有下载器"
|
||||
error-description="请先在设置中正确配置并启用下载器。"
|
||||
/>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user