Merge pull request #334 from Seed680/v2

背景壁纸增加自定义API
This commit is contained in:
jxxghp
2025-05-15 09:22:36 +08:00
committed by GitHub
4 changed files with 38 additions and 7 deletions

View File

@@ -1069,9 +1069,14 @@ export default {
bing: 'Bing Daily Wallpaper',
mediaserver: 'Media Server',
none: 'No Wallpaper',
customize: 'Customize',
},
mb: 'MB',
hour: 'hour',
customizeWallpaperApi: 'Customize Wallpaper Api',
customizeWallpaperApiHint:
'It will get the image file extension format images that are allowed in all the settings in the content returned by the API.',
customizeWallpaperApiRequired: 'Required field; please enter Wallpaper API',
},
site: {
siteSync: 'Site Synchronization',

View File

@@ -1060,9 +1060,13 @@ export default {
bing: 'Bing每日壁纸',
mediaserver: '媒体服务器',
none: '无壁纸',
customize: '自定义',
},
mb: 'MB',
hour: '小时',
customizeWallpaperApi: '自定义壁纸API',
customizeWallpaperApiHint: '会获取API返回内容中所有设置中允许的图片文件后缀格式图片',
customizeWallpaperApiRequired: '必填项请输入自定义壁纸API',
},
site: {
siteSync: '站点同步',

View File

@@ -1062,9 +1062,13 @@ export default {
bing: 'Bing每日壁紙',
mediaserver: '媒體服務器',
none: '無壁紙',
customize: '自定義',
},
mb: 'MB',
hour: '小時',
customizeWallpaperApi: '自定義壁紙API',
customizeWallpaperApiHint: '會獲取 API 返回內容中所有設置中允許的圖片文件後綴格式圖片',
customizeWallpaperApiRequired: '必填項請輸出自定義壁紙API',
},
site: {
siteSync: '站點同步',

View File

@@ -26,6 +26,7 @@ const SystemSettings = ref<any>({
RECOGNIZE_SOURCE: 'themoviedb',
GITHUB_TOKEN: null,
OCR_HOST: null,
CUSTOMIZE_WALLPAPER_API_URL: null,
},
// 高级系统设置
Advanced: {
@@ -253,6 +254,7 @@ const wallpaperItems = [
{ title: t('setting.system.wallpaperItems.tmdb'), value: 'tmdb' },
{ title: t('setting.system.wallpaperItems.bing'), value: 'bing' },
{ title: t('setting.system.wallpaperItems.mediaserver'), value: 'mediaserver' },
{ title: t('setting.system.wallpaperItems.customize'), value: 'customize' },
{ title: t('setting.system.wallpaperItems.none'), value: '' },
]
@@ -408,14 +410,30 @@ onDeactivated(() => {
persistent-hint
/>
</VCol>
<VCol cols="12" md="6">
<VSelect
v-model="SystemSettings.Basic.WALLPAPER"
:label="t('setting.system.wallpaper')"
:hint="t('setting.system.wallpaperHint')"
persistent-hint
:items="wallpaperItems"
/>
<VRow>
<VCol cols="12" :md="SystemSettings.Basic.WALLPAPER === 'customize' ? 6 : 12">
<VSelect
v-model="SystemSettings.Basic.WALLPAPER"
:label="t('setting.system.wallpaper')"
:hint="t('setting.system.wallpaperHint')"
persistent-hint
:items="wallpaperItems"
/>
</VCol>
<VCol v-if="SystemSettings.Basic.WALLPAPER === 'customize'" cols="12" md="6">
<VTextField
v-model="SystemSettings.Basic.CUSTOMIZE_WALLPAPER_API_URL"
:label="t('setting.system.customizeWallpaperApi')"
:hint="t('setting.system.customizeWallpaperApiHint')"
:placeholder="t('setting.system.customizeWallpaperApi')"
persistent-hint
:rules="[v => !!v || t('setting.system.customizeWallpaperApiRequired')]"
/>
</VCol>
</VRow>
</VCol>
<VCol cols="12" md="6">
<VSelect