mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-30 04:39:44 +08:00
feat:二级分类设置界面
This commit is contained in:
@@ -8,6 +8,7 @@ import { TransferDirectoryConf, StorageConf } from '@/api/types'
|
||||
import DirectoryCard from '@/components/cards/DirectoryCard.vue'
|
||||
import StorageCard from '@/components/cards/StorageCard.vue'
|
||||
import ProgressDialog from '@/components/dialog/ProgressDialog.vue'
|
||||
import CategoryEditDialog from '@/components/dialog/CategoryEditDialog.vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { storageAttributes } from '@/api/constants'
|
||||
|
||||
@@ -28,6 +29,9 @@ const $toast = useToast()
|
||||
// 进度框
|
||||
const progressDialog = ref(false)
|
||||
|
||||
// 分类编辑对话框
|
||||
const categoryDialog = ref(false)
|
||||
|
||||
// 数据源
|
||||
const sourceItems = [
|
||||
{ 'title': 'TheMovieDb', 'value': 'themoviedb' },
|
||||
@@ -292,7 +296,12 @@ onMounted(() => {
|
||||
:directory="element"
|
||||
:categories="mediaCategories"
|
||||
:storages="storages"
|
||||
@update:modelValue="(value: any) => {element.download_path = value?.download; element.library_path = value?.library}"
|
||||
@update:modelValue="
|
||||
(value: any) => {
|
||||
element.download_path = value?.download
|
||||
element.library_path = value?.library
|
||||
}
|
||||
"
|
||||
@close="removeDirectory(element)"
|
||||
/>
|
||||
</template>
|
||||
@@ -304,9 +313,13 @@ onMounted(() => {
|
||||
<VBtn type="submit" @click="saveDirectories" prepend-icon="mdi-content-save">
|
||||
{{ t('common.save') }}
|
||||
</VBtn>
|
||||
<VBtn color="success" variant="tonal" @click="addDirectory">
|
||||
<VBtn color="success" variant="tonal" @click="addDirectory" class="me-2">
|
||||
<VIcon icon="mdi-plus" />
|
||||
</VBtn>
|
||||
<VSpacer />
|
||||
<VBtn color="info" variant="tonal" prepend-icon="mdi-shape-plus" @click="categoryDialog = true">
|
||||
{{ t('setting.category.title') }}
|
||||
</VBtn>
|
||||
</div>
|
||||
</VForm>
|
||||
</VCardText>
|
||||
@@ -370,4 +383,12 @@ onMounted(() => {
|
||||
</VRow>
|
||||
<!-- 进度框 -->
|
||||
<ProgressDialog v-if="progressDialog" v-model="progressDialog" :text="t('setting.system.reloading')" />
|
||||
<!-- 分类对话框 -->
|
||||
<CategoryEditDialog
|
||||
v-if="categoryDialog"
|
||||
v-model="categoryDialog"
|
||||
:categories="mediaCategories"
|
||||
@close="categoryDialog = false"
|
||||
@done="loadMediaCategories"
|
||||
/>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user