mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-22 08:49:47 +08:00
更新国际化支持:为存储、媒体类型、通知开关及操作步骤等组件添加多语言文本,提升用户体验
This commit is contained in:
@@ -6,7 +6,7 @@ import type { NotificationConf, NotificationSwitchConf } from '@/api/types'
|
||||
import NotificationChannelCard from '@/components/cards/NotificationChannelCard.vue'
|
||||
import ProgressDialog from '@/components/dialog/ProgressDialog.vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { getNotificationSwitchText } from '@/types/i18n-type'
|
||||
import { notificationSwitchDict } from '@/api/constants'
|
||||
|
||||
// 国际化
|
||||
const { t } = useI18n()
|
||||
@@ -171,6 +171,12 @@ async function saveNotificationSwitchs() {
|
||||
}
|
||||
}
|
||||
|
||||
// 获取通知开关文本
|
||||
function getNotificationSwitchText(type: string | undefined) {
|
||||
if (!type) return ''
|
||||
return notificationSwitchDict[type]
|
||||
}
|
||||
|
||||
// 加载数据
|
||||
onMounted(() => {
|
||||
loadNotificationSetting()
|
||||
|
||||
@@ -147,6 +147,8 @@ function addFilterRuleGroup() {
|
||||
}
|
||||
filterRuleGroups.value.push({
|
||||
name: name,
|
||||
media_type: '',
|
||||
category: '',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -610,7 +610,7 @@ onDeactivated(() => {
|
||||
</VCol>
|
||||
</VRow>
|
||||
<!-- 高级系统设置 -->
|
||||
<VDialog v-if="advancedDialog" v-model="advancedDialog" scrollable max-width="60rem" persistent>
|
||||
<VDialog v-if="advancedDialog" v-model="advancedDialog" scrollable max-width="60rem">
|
||||
<VCard>
|
||||
<VCardItem>
|
||||
<VDialogCloseBtn @click="advancedDialog = false" />
|
||||
|
||||
Reference in New Issue
Block a user