폰트 수정, UI수정 및 대시보드 수정
This commit is contained in:
1 parent
65ea09ffd5
commit
7aedf07203
9 files changed
+313
-339
No files matched your search
@@ -48,6 +48,8 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr className="bi2-page-divider" />
|
||||
|
||||
{/* Main Content Container */}
|
||||
<div className="bi2-main-container">
|
||||
{/* 매장명 & 주소 */}
|
||||
@@ -130,9 +132,11 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
<div className="bi2-persona-divider"></div>
|
||||
<div className="bi2-persona-detail grow">
|
||||
<span className="bi2-label-xs">{t('analysis.favorKeywords', { defaultValue: '선호 키워드' })}</span>
|
||||
<p className="bi2-persona-detail-text">
|
||||
{persona.favor_target.join('\n')}
|
||||
</p>
|
||||
<div className="bi2-persona-detail-text">
|
||||
{persona.favor_target.map((item, i) => (
|
||||
<p key={i}>{item}</p>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="bi2-persona-divider"></div>
|
||||
<div className="bi2-persona-detail">
|
||||
|
||||
@@ -76,11 +76,27 @@ export const GeometricChart: React.FC<GeometricChartProps> = ({ data }) => {
|
||||
style={{ overflow: 'visible', width: '440px', height: '440px' }}
|
||||
>
|
||||
<defs>
|
||||
<filter id="radar-glow" x="-20%" y="-20%" width="140%" height="140%">
|
||||
<feGaussianBlur stdDeviation="4" result="coloredBlur" />
|
||||
{/* 레이더 폴리곤 fill: radial gradient */}
|
||||
<radialGradient id="radar-fill-gradient" cx="280" cy="280" r="160" fx="280" fy="280" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="60%" stopColor="#034245" stopOpacity="0" />
|
||||
<stop offset="100%" stopColor="#94FBE0" stopOpacity="0.30" />
|
||||
</radialGradient>
|
||||
{/* 레이더 폴리곤 filter: outer drop-shadow + inset glow */}
|
||||
<filter id="radar-polygon-filter" x="-30%" y="-30%" width="160%" height="160%">
|
||||
{/* Outer drop shadow */}
|
||||
<feDropShadow dx="0" dy="0" stdDeviation="6" floodColor="#94FBE0" floodOpacity="0.5" result="dropShadow" />
|
||||
{/* Inset glow: invert alpha → blur → composite inside */}
|
||||
<feComponentTransfer in="SourceAlpha" result="invertedAlpha">
|
||||
<feFuncA type="linear" slope="-1" intercept="1" />
|
||||
</feComponentTransfer>
|
||||
<feGaussianBlur in="invertedAlpha" stdDeviation="6" result="blurredOuter" />
|
||||
<feComposite in="blurredOuter" in2="SourceAlpha" operator="in" result="insetMask" />
|
||||
<feFlood floodColor="#94FBE0" floodOpacity="0.5" result="insetColor" />
|
||||
<feComposite in="insetColor" in2="insetMask" operator="in" result="insetGlow" />
|
||||
<feMerge>
|
||||
<feMergeNode in="coloredBlur" />
|
||||
<feMergeNode in="dropShadow" />
|
||||
<feMergeNode in="SourceGraphic" />
|
||||
<feMergeNode in="insetGlow" />
|
||||
</feMerge>
|
||||
</filter>
|
||||
<filter id="badge-glow" x="-50%" y="-50%" width="200%" height="200%">
|
||||
@@ -118,11 +134,11 @@ export const GeometricChart: React.FC<GeometricChartProps> = ({ data }) => {
|
||||
{/* 데이터 폴리곤 */}
|
||||
<polygon
|
||||
points={dataPolygon}
|
||||
fill="rgba(45, 212, 191, 0.15)"
|
||||
stroke="#2DD4BF"
|
||||
fill="url(#radar-fill-gradient)"
|
||||
stroke="var(--Color-mint-500, #94FBE0)"
|
||||
strokeWidth="2"
|
||||
strokeLinejoin="round"
|
||||
filter="url(#radar-glow)"
|
||||
filter="url(#radar-polygon-filter)"
|
||||
/>
|
||||
|
||||
{/* 데이터 포인트 */}
|
||||
@@ -132,8 +148,8 @@ export const GeometricChart: React.FC<GeometricChartProps> = ({ data }) => {
|
||||
cx={point.x}
|
||||
cy={point.y}
|
||||
r="4"
|
||||
fill="#2DD4BF"
|
||||
stroke="#1A1A2E"
|
||||
fill="#ffffff"
|
||||
stroke="#ffffff"
|
||||
strokeWidth="2"
|
||||
/>
|
||||
))}
|
||||
@@ -145,7 +161,7 @@ export const GeometricChart: React.FC<GeometricChartProps> = ({ data }) => {
|
||||
const rank = rankMap.get(i) || i + 1;
|
||||
const isTopThree = rank <= 3;
|
||||
const isLeftSide = Math.cos(angle) < -0.1;
|
||||
const textX = isLeftSide ? -14 : 14;
|
||||
const textX = isLeftSide ? -20 : 20;
|
||||
const textAnchor: 'start' | 'end' = isLeftSide ? 'end' : 'start';
|
||||
|
||||
return (
|
||||
|
||||
@@ -385,7 +385,7 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
||||
<div className="comp2-info-content">
|
||||
<div className="comp2-file-info">
|
||||
<h3 className="comp2-filename">{getFileName()}</h3>
|
||||
<p className="comp2-filesize">19.6MB</p>
|
||||
{/* <p className="comp2-filesize">19.6MB</p> */}
|
||||
</div>
|
||||
<div className="comp2-meta-grid">
|
||||
<div className="comp2-meta-item">
|
||||
|
||||
@@ -618,21 +618,22 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
// 블러 조건: 1)계정 미연결 2)업로드 영상 없음 3)데이터 없음
|
||||
const isBlurred = accounts.length === 0 || isEmptyState || !dashboardData;
|
||||
|
||||
// API 데이터 우선 사용, 없거나 영상 없음(isEmptyState) 시 Mock 데이터로 폴백
|
||||
const contentMetrics = (!isEmptyState && dashboardData?.contentMetrics?.length) ? dashboardData.contentMetrics : MOCK_CONTENT_METRICS;
|
||||
const topContent = (!isEmptyState && dashboardData?.topContent?.length) ? dashboardData.topContent : MOCK_TOP_CONTENT;
|
||||
const hasRealAgeGroups = !isEmptyState && !!dashboardData?.audienceData?.ageGroups?.some(g => g.percentage > 0);
|
||||
const hasRealGender = !isEmptyState && ((dashboardData?.audienceData?.gender?.male ?? 0) + (dashboardData?.audienceData?.gender?.female ?? 0)) > 0;
|
||||
const hasRealTopRegions = !isEmptyState && !!dashboardData?.audienceData?.topRegions?.some(r => r.percentage > 0);
|
||||
// showMockData=true면 전체 mock 강제, 아니면 API 우선 / isEmptyState 시 mock 폴백
|
||||
const useReal = !showMockData && !isEmptyState;
|
||||
const contentMetrics = (useReal && dashboardData?.contentMetrics?.length) ? dashboardData.contentMetrics : MOCK_CONTENT_METRICS;
|
||||
const topContent = (useReal && dashboardData?.topContent?.length) ? dashboardData.topContent : MOCK_TOP_CONTENT;
|
||||
const hasRealAgeGroups = useReal && !!dashboardData?.audienceData?.ageGroups?.some(g => g.percentage > 0);
|
||||
const hasRealGender = useReal && ((dashboardData?.audienceData?.gender?.male ?? 0) + (dashboardData?.audienceData?.gender?.female ?? 0)) > 0;
|
||||
const hasRealTopRegions = useReal && !!dashboardData?.audienceData?.topRegions?.some(r => r.percentage > 0);
|
||||
const hasRealAudienceData = hasRealAgeGroups && hasRealGender && hasRealTopRegions;
|
||||
const audienceData = hasRealAudienceData ? dashboardData!.audienceData : MOCK_AUDIENCE_DATA;
|
||||
|
||||
// mode별 차트 데이터를 ChartDataPoint 통합 형식으로 변환
|
||||
const chartData: ChartDataPoint[] = mode === 'month'
|
||||
? ((!isEmptyState && dashboardData?.monthlyData?.length)
|
||||
? ((useReal && dashboardData?.monthlyData?.length)
|
||||
? dashboardData.monthlyData.map((d: MonthlyData) => ({ label: d.month, current: d.thisYear, previous: d.lastYear }))
|
||||
: MOCK_MONTHLY_DATA.map((d: MonthlyData) => ({ label: d.month, current: d.thisYear, previous: d.lastYear })))
|
||||
: ((!isEmptyState && dashboardData?.dailyData?.length)
|
||||
: ((useReal && dashboardData?.dailyData?.length)
|
||||
? dashboardData.dailyData.map((d: DailyData) => ({ label: d.date, current: d.thisPeriod, previous: d.lastPeriod }))
|
||||
: MOCK_DAILY_DATA.map((d: DailyData) => ({ label: d.date, current: d.thisPeriod, previous: d.lastPeriod })));
|
||||
|
||||
@@ -657,8 +658,8 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
<path d="M15 10l4.553-2.069A1 1 0 0121 8.87v6.26a1 1 0 01-1.447.899L15 14M3 8a2 2 0 012-2h10a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2V8z" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
<div>
|
||||
<p style={{ color: '#a6ffea', fontWeight: 600, marginBottom: '2px' }}>아직 업로드된 영상이 없습니다.</p>
|
||||
<p style={{ color: 'rgba(255,255,255,0.5)', fontSize: '13px' }}>ADO2에서 영상을 업로드하면 실제 통계가 표시됩니다.</p>
|
||||
<p style={{ color: '#a6ffea', fontSize: '20px', fontWeight: 600, marginBottom: '2px' }}>아직 업로드된 영상이 없습니다.</p>
|
||||
<p style={{ color: 'rgba(255,255,255,0.5)', fontSize: '16px' }}>ADO2에서 영상을 업로드하면 실제 통계가 표시됩니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -786,7 +787,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<div>
|
||||
<h2 className="dashboard-section-title" style={{ marginBottom: '2px' }}>{t('dashboard.contentPerformance')}</h2>
|
||||
<p style={{ fontSize: '12px', color: 'rgba(255,255,255,0.4)', margin: 0 }}>ADO2에서 업로드한 최근 30개의 영상 통계가 표시됩니다.</p>
|
||||
<p style={{ fontSize: '14px', color: 'rgba(255,255,255,0.4)', margin: 0 }}>ADO2에서 업로드한 최근 30개의 영상 통계가 표시됩니다.</p>
|
||||
</div>
|
||||
<div className="mode-toggle">
|
||||
<button
|
||||
@@ -860,7 +861,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
<AnimatedSection delay={1000} className="audience-section">
|
||||
<div style={{ marginBottom: '16px' }}>
|
||||
<h2 className="dashboard-section-title" style={{ marginBottom: '2px' }}>{t('dashboard.audienceInsights')}</h2>
|
||||
<p style={{ fontSize: '12px', color: 'rgba(255,255,255,0.4)', margin: 0 }}>선택한 채널의 통계가 표시됩니다.</p>
|
||||
<p style={{ fontSize: '14px', color: 'rgba(255,255,255,0.4)', margin: 0 }}>선택한 채널의 통계가 표시됩니다.</p>
|
||||
</div>
|
||||
<div style={{ position: 'relative' }}>
|
||||
<div className="audience-cards" style={!hasRealAudienceData && !showMockData ? { filter: 'blur(4px)', pointerEvents: 'none', userSelect: 'none' } : {}}>
|
||||
@@ -883,7 +884,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
</div>
|
||||
</AnimatedItem>
|
||||
</div>
|
||||
{dashboardData && !isEmptyState && !hasRealAudienceData && (
|
||||
{dashboardData && !isEmptyState && !hasRealAudienceData && !showMockData && (
|
||||
<div style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', pointerEvents: 'none' }}>
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px',
|
||||
@@ -892,7 +893,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
borderRadius: '12px',
|
||||
padding: '20px 28px',
|
||||
}}>
|
||||
<p style={{ color: 'rgba(255,255,255,0.85)', fontSize: '14px', fontWeight: 500, margin: 0, textAlign: 'center' }}>
|
||||
<p style={{ color: 'rgba(255,255,255,0.85)', fontSize: '16px', fontWeight: 500, margin: 0, textAlign: 'center' }}>
|
||||
누적 데이터가 부족하여 실제 시청자 정보가 없습니다.
|
||||
</p>
|
||||
</div>
|
||||
@@ -901,38 +902,36 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
</div>
|
||||
</AnimatedSection>
|
||||
|
||||
{/* 개발자 모드 전용: mock 데이터 블러 해제 버튼 */}
|
||||
{isTestPage && isEmptyState && (
|
||||
<button
|
||||
onClick={() => setShowMockData(prev => !prev)}
|
||||
style={{
|
||||
position: 'fixed',
|
||||
bottom: '24px',
|
||||
right: '24px',
|
||||
zIndex: 9999,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '6px',
|
||||
background: showMockData ? 'rgba(255,100,100,0.15)' : 'rgba(166,255,234,0.12)',
|
||||
border: `1px solid ${showMockData ? 'rgba(255,100,100,0.4)' : 'rgba(166,255,234,0.4)'}`,
|
||||
borderRadius: '10px',
|
||||
color: showMockData ? 'rgba(255,150,150,0.9)' : '#a6ffea',
|
||||
padding: '8px 14px',
|
||||
fontSize: '12px',
|
||||
fontWeight: 600,
|
||||
cursor: 'pointer',
|
||||
backdropFilter: 'blur(8px)',
|
||||
}}
|
||||
>
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
{showMockData
|
||||
? <><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94"/><path d="M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19"/><line x1="1" y1="1" x2="23" y2="23"/></>
|
||||
: <><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></>
|
||||
}
|
||||
</svg>
|
||||
{showMockData ? 'Mock 숨기기' : 'Mock 보기'} [DEV]
|
||||
</button>
|
||||
)}
|
||||
{/* mock 데이터 보기 버튼 */}
|
||||
<button
|
||||
onClick={() => setShowMockData(prev => !prev)}
|
||||
style={{
|
||||
position: 'fixed',
|
||||
bottom: '24px',
|
||||
right: '24px',
|
||||
zIndex: 9999,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '6px',
|
||||
background: showMockData ? 'rgba(255,100,100,0.15)' : 'rgba(166,255,234,0.12)',
|
||||
border: `1px solid ${showMockData ? 'rgba(255,100,100,0.4)' : 'rgba(166,255,234,0.4)'}`,
|
||||
borderRadius: '10px',
|
||||
color: showMockData ? 'rgba(255,150,150,0.9)' : '#a6ffea',
|
||||
padding: '8px 14px',
|
||||
fontSize: '12px',
|
||||
fontWeight: 600,
|
||||
cursor: 'pointer',
|
||||
backdropFilter: 'blur(8px)',
|
||||
}}
|
||||
>
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
{showMockData
|
||||
? <><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94"/><path d="M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19"/><line x1="1" y1="1" x2="23" y2="23"/></>
|
||||
: <><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></>
|
||||
}
|
||||
</svg>
|
||||
{showMockData ? 'Sample 숨기기' : 'Sample 보기'}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user