v1.3.3: 자체 최소 통계 및 스플래시 localStorage 정리
- 일별 익명 방문자 해시·사이트/게시물 통계(030 마이그레이션) - POST /api/analytics/pageview, 관리자 analytics API, 클라이언트 트래커 - 관리자 대시보드 통계 카드·인기 게시물 Top 5 - 스플래시: SITE_BRAND_LOGO_TEXT localStorage 제거
This commit is contained in:
@@ -8,22 +8,23 @@ import {
|
||||
const siteSettingsFetchKey = 'site-settings-public'
|
||||
|
||||
/**
|
||||
* 공개 사이트 설정에서 스플래시용 브랜드를 localStorage에 캐시한다.
|
||||
* 공개 사이트 설정에서 스플래시용 로고 이미지 URL만 localStorage에 캐시한다.
|
||||
* logoText(井 등)는 헤더 이미지 없을 때 짧은 기호용이며 스플래시·브랜드명과 무관하다.
|
||||
* @param {Object|null|undefined} settings - 사이트 설정
|
||||
* @returns {void}
|
||||
*/
|
||||
const cacheSiteBrandForSplash = (settings) => {
|
||||
if (!settings?.logoUrl && !settings?.logoText) {
|
||||
try {
|
||||
localStorage.removeItem(SITE_BRAND_LOGO_TEXT_KEY)
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
|
||||
if (!settings?.logoUrl) {
|
||||
return
|
||||
}
|
||||
|
||||
if (settings.logoUrl) {
|
||||
localStorage.setItem(SITE_BRAND_LOGO_URL_KEY, settings.logoUrl)
|
||||
}
|
||||
|
||||
if (settings.logoText) {
|
||||
localStorage.setItem(SITE_BRAND_LOGO_TEXT_KEY, settings.logoText)
|
||||
}
|
||||
localStorage.setItem(SITE_BRAND_LOGO_URL_KEY, settings.logoUrl)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user