v1.4.6: 사이트 설정 이미지 저장 흐름·홈 커버 라이트/다크 분리
- 로고 업로드는 파일 URL만 폼에 반영하고 기타 설정 저장 시 DB에 반영 - 메인 화면 커버 라이트·다크 이미지 필드 추가 및 테마별 HomeHero 교체 - home_cover_dark_image_url 마이그레이션 및 미디어 사용 현황 보정
This commit is contained in:
@@ -21,6 +21,7 @@ export const adminSiteSettingsInputSchema = z.object({
|
||||
copyrightText: z.string().trim().min(1),
|
||||
showPostUpdatedAt: z.boolean().optional().default(false),
|
||||
homeCoverImageUrl: z.string().trim().max(500).optional().default(''),
|
||||
homeCoverDarkImageUrl: z.string().trim().max(500).optional().default(''),
|
||||
homeCoverTitle: z.string().trim().max(120).optional().default(''),
|
||||
homeCoverText: z.string().trim().max(280).optional().default(''),
|
||||
announcementEnabled: z.boolean().optional().default(false),
|
||||
|
||||
@@ -526,6 +526,34 @@ const getSiteSettingsMediaUsage = (url, siteSettings) => {
|
||||
})
|
||||
}
|
||||
|
||||
if (siteSettings.homeCoverImageUrl === url) {
|
||||
usages.push({
|
||||
type: 'settings',
|
||||
typeLabel: '사이트 설정',
|
||||
id: 'home-cover-light',
|
||||
title: '메인 화면 라이트 이미지',
|
||||
adminUrl: '/admin/settings',
|
||||
publicUrl: '/',
|
||||
status: 'system',
|
||||
location: 'homeCoverImageUrl',
|
||||
label: '메인 화면 라이트 이미지'
|
||||
})
|
||||
}
|
||||
|
||||
if (siteSettings.homeCoverDarkImageUrl === url) {
|
||||
usages.push({
|
||||
type: 'settings',
|
||||
typeLabel: '사이트 설정',
|
||||
id: 'home-cover-dark',
|
||||
title: '메인 화면 다크 이미지',
|
||||
adminUrl: '/admin/settings',
|
||||
publicUrl: '/',
|
||||
status: 'system',
|
||||
location: 'homeCoverDarkImageUrl',
|
||||
label: '메인 화면 다크 이미지'
|
||||
})
|
||||
}
|
||||
|
||||
return usages
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ export const getDefaultSiteSettings = () => {
|
||||
copyrightText: `©${new Date().getFullYear()} ${title}`,
|
||||
showPostUpdatedAt: false,
|
||||
homeCoverImageUrl: '',
|
||||
homeCoverDarkImageUrl: '',
|
||||
homeCoverTitle: '',
|
||||
homeCoverText: '',
|
||||
announcementEnabled: false,
|
||||
|
||||
Reference in New Issue
Block a user