feat: update tag and timeline share panel copy for clarity and conciseness
Some checks failed
docker-images / resolve-build-targets (push) Successful in 7s
ui-regression / playwright-regression (push) Failing after 13m4s
docker-images / build-and-push (admin) (push) Successful in 1m17s
docker-images / build-and-push (backend) (push) Successful in 28m13s
docker-images / build-and-push (frontend) (push) Successful in 47s
docker-images / submit-indexnow (push) Successful in 13s
Some checks failed
docker-images / resolve-build-targets (push) Successful in 7s
ui-regression / playwright-regression (push) Failing after 13m4s
docker-images / build-and-push (admin) (push) Successful in 1m17s
docker-images / build-and-push (backend) (push) Successful in 28m13s
docker-images / build-and-push (frontend) (push) Successful in 47s
docker-images / submit-indexnow (push) Successful in 13s
style: enhance global CSS for better responsiveness of terminal chips and navigation pills test: remove inline subscription test and add maintenance mode access code test feat: implement media library picker dialog for selecting images from the media library feat: add media URL controls for uploading and managing media assets feat: add migration for music_enabled and maintenance_mode settings in site settings feat: implement maintenance mode functionality with access control feat: create maintenance page with access code input and error handling chore: add TypeScript declaration for QR code module
This commit is contained in:
@@ -246,9 +246,7 @@ fn normalize_tracking_source_token(value: Option<String>) -> String {
|
||||
"chatgpt-search".to_string()
|
||||
}
|
||||
value if value.contains("perplexity") => "perplexity".to_string(),
|
||||
value if value.contains("copilot") || value.contains("bing") => {
|
||||
"copilot-bing".to_string()
|
||||
}
|
||||
value if value.contains("copilot") || value.contains("bing") => "copilot-bing".to_string(),
|
||||
value if value.contains("gemini") => "gemini".to_string(),
|
||||
value if value.contains("google") => "google".to_string(),
|
||||
value if value.contains("claude") => "claude".to_string(),
|
||||
@@ -289,11 +287,10 @@ fn sorted_referrer_buckets(
|
||||
let mut items = breakdown
|
||||
.iter()
|
||||
.filter_map(|(referrer, count)| {
|
||||
predicate(referrer)
|
||||
.then(|| AnalyticsReferrerBucket {
|
||||
referrer: referrer.clone(),
|
||||
count: *count,
|
||||
})
|
||||
predicate(referrer).then(|| AnalyticsReferrerBucket {
|
||||
referrer: referrer.clone(),
|
||||
count: *count,
|
||||
})
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
@@ -648,8 +645,11 @@ pub async fn build_admin_analytics(ctx: &AppContext) -> Result<AdminAnalyticsRes
|
||||
page_views_last_24h += 1;
|
||||
}
|
||||
|
||||
let referrer =
|
||||
normalize_tracking_source(Some(&event.path), event.referrer.clone(), event.metadata.as_ref());
|
||||
let referrer = normalize_tracking_source(
|
||||
Some(&event.path),
|
||||
event.referrer.clone(),
|
||||
event.metadata.as_ref(),
|
||||
);
|
||||
*referrer_breakdown.entry(referrer).or_insert(0) += 1;
|
||||
}
|
||||
|
||||
@@ -737,7 +737,8 @@ pub async fn build_admin_analytics(ctx: &AppContext) -> Result<AdminAnalyticsRes
|
||||
providers_last_7d.truncate(6);
|
||||
|
||||
let top_referrers = sorted_referrer_buckets(&referrer_breakdown, |_| true, 8);
|
||||
let ai_referrers_last_7d = sorted_referrer_buckets(&referrer_breakdown, is_ai_discovery_source, 6);
|
||||
let ai_referrers_last_7d =
|
||||
sorted_referrer_buckets(&referrer_breakdown, is_ai_discovery_source, 6);
|
||||
let ai_discovery_page_views_last_7d = referrer_breakdown
|
||||
.iter()
|
||||
.filter(|(referrer, _)| is_ai_discovery_source(referrer))
|
||||
@@ -747,7 +748,17 @@ pub async fn build_admin_analytics(ctx: &AppContext) -> Result<AdminAnalyticsRes
|
||||
let mut popular_posts = post_breakdown
|
||||
.into_iter()
|
||||
.map(
|
||||
|(slug, (page_views, read_completes, total_progress, progress_count, total_duration, duration_count))| {
|
||||
|(
|
||||
slug,
|
||||
(
|
||||
page_views,
|
||||
read_completes,
|
||||
total_progress,
|
||||
progress_count,
|
||||
total_duration,
|
||||
duration_count,
|
||||
),
|
||||
)| {
|
||||
AnalyticsPopularPost {
|
||||
title: post_titles
|
||||
.get(&slug)
|
||||
@@ -1018,7 +1029,8 @@ pub async fn build_public_content_highlights(
|
||||
} else {
|
||||
0.0
|
||||
},
|
||||
avg_duration_ms: (duration_count > 0).then(|| total_duration / duration_count as f64),
|
||||
avg_duration_ms: (duration_count > 0)
|
||||
.then(|| total_duration / duration_count as f64),
|
||||
},
|
||||
)
|
||||
.collect::<Vec<_>>();
|
||||
@@ -1085,8 +1097,22 @@ pub async fn build_public_content_windows(
|
||||
.await?;
|
||||
|
||||
Ok(vec![
|
||||
summarize_public_content_window(&events, &post_titles, now - Duration::hours(24), "24h", "24h", 1),
|
||||
summarize_public_content_window(&events, &post_titles, now - Duration::days(7), "7d", "7d", 7),
|
||||
summarize_public_content_window(
|
||||
&events,
|
||||
&post_titles,
|
||||
now - Duration::hours(24),
|
||||
"24h",
|
||||
"24h",
|
||||
1,
|
||||
),
|
||||
summarize_public_content_window(
|
||||
&events,
|
||||
&post_titles,
|
||||
now - Duration::days(7),
|
||||
"7d",
|
||||
"7d",
|
||||
7,
|
||||
),
|
||||
summarize_public_content_window(&events, &post_titles, since_30d, "30d", "30d", 30),
|
||||
])
|
||||
}
|
||||
@@ -1233,7 +1259,8 @@ fn summarize_public_content_window(
|
||||
} else {
|
||||
0.0
|
||||
},
|
||||
avg_duration_ms: (duration_count > 0).then(|| total_duration / duration_count as f64),
|
||||
avg_duration_ms: (duration_count > 0)
|
||||
.then(|| total_duration / duration_count as f64),
|
||||
},
|
||||
)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
Reference in New Issue
Block a user