Analytics: unique visitors this week + probed-URLs list; Scripture Index: most-studied strip + print; admin warning for unparseable passage references; v2.44.0
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6a5d525d6e
commit
e9d9dd0d50
13 files changed
+143
-9
No files matched your search
+8
-1
@@ -1,3 +1,4 @@
|
||||
import { checkPassageReference } from '../shared/bible-books.js'
|
||||
import DOMPurify from 'dompurify'
|
||||
import React, { useEffect, useRef, useState } from 'react'
|
||||
import { DndContext, closestCenter, PointerSensor, useSensor, useSensors } from '@dnd-kit/core'
|
||||
@@ -616,6 +617,8 @@ export interface AdminStats {
|
||||
topPaths: Array<{ path: string; hits: number }>
|
||||
topPathsReal: Array<{ path: string; hits: number }>
|
||||
topPathsBot: Array<{ path: string; hits: number }>
|
||||
topUnknownPaths?: Array<{ path: string; hits: number }>
|
||||
uniqueVisitors7d?: number
|
||||
last7Days: Array<{ day: string; hits: number }>
|
||||
last7DaysReal: Array<{ day: string; hits: number }>
|
||||
last7DaysBot: Array<{ day: string; hits: number }>
|
||||
@@ -4137,7 +4140,7 @@ const [dashboardNow, setDashboardNow] = useState(() => new Date())
|
||||
<div className="admin-dashboard-card">
|
||||
<div className="admin-dashboard-card-value">{thisWeekReal.toLocaleString()}</div>
|
||||
<div className="admin-dashboard-card-label">Real Visits (7 Days)</div>
|
||||
<div className="admin-dashboard-card-sub">{thisWeekHits.toLocaleString()} total · {stats?.visitors?.uniqueVisitors?.toLocaleString() ?? '—'} unique all time</div>
|
||||
<div className="admin-dashboard-card-sub">{thisWeekHits.toLocaleString()} total · {stats?.uniqueVisitors7d?.toLocaleString() ?? '—'} unique this week · {stats?.visitors?.uniqueVisitors?.toLocaleString() ?? '—'} all time (consented)</div>
|
||||
<button type="button" className="admin-dashboard-card-action" onClick={() => navigateTo('analytics')}>Full Analytics →</button>
|
||||
</div>
|
||||
<div className="admin-dashboard-card">
|
||||
@@ -6301,6 +6304,10 @@ const [dashboardNow, setDashboardNow] = useState(() => new Date())
|
||||
<div className="admin-field">
|
||||
<label htmlFor={`sl-reference-${activeLesson.id}`}>Passage Reference</label>
|
||||
<input id={`sl-reference-${activeLesson.id}`} type="text" value={activeLesson.reference} placeholder="1:1-2" onChange={e => updateStudySection(activeStudy.id, activeLesson.id, 'reference', e.target.value)} />
|
||||
{(() => {
|
||||
const refProblem = checkPassageReference(activeLesson.reference, activeStudy.bibleBook?.trim() || activeStudy.slug)
|
||||
return refProblem ? <p className="admin-field-warning" role="alert" style={{ color: '#e0a030', fontSize: '0.85rem', margin: '0.35rem 0 0' }}>⚠ {refProblem}</p> : null
|
||||
})()}
|
||||
</div>
|
||||
<div className="admin-field">
|
||||
<label htmlFor={`sl-title-${activeLesson.id}`}>Section Title</label>
|
||||
|
||||
Reference in new issue
Block a user