feat: add media assets library

This commit is contained in:
Codex
2026-04-30 11:31:40 +08:00
parent 3da316fed9
commit bf28e37ae5
16 changed files with 1398 additions and 2 deletions
@@ -14,6 +14,8 @@ const CACHE_PATHS = [
'/zh/where-to-buy',
'/en/downloads',
'/zh/downloads',
'/en/media-assets',
'/zh/media-assets',
'/en/news',
'/zh/news',
'/en/products',
@@ -31,6 +33,10 @@ const CACHE_PATHS = [
const CACHE_ROUTE_PATTERNS = [
'/en/downloads/[slug]',
'/zh/downloads/[slug]',
'/en/media-assets/[category]',
'/zh/media-assets/[category]',
'/en/media-assets/[category]/[subcategory]',
'/zh/media-assets/[category]/[subcategory]',
'/en/news/[slug]',
'/zh/news/[slug]',
'/en/products/[slug]',
@@ -19,6 +19,11 @@ const QUICK_LINKS = [
href: '/admin/collections/downloads',
title: 'Downloads',
},
{
description: 'Maintain press-facing media asset categories, thumbnails, package links, and downloadable files.',
href: '/admin/collections/mediaAssetCategories',
title: 'Media assets',
},
{
description: 'Keep support landing copy, FAQ content, contact instructions, and warranty policy aligned.',
href: '/admin/globals/supportPage',
@@ -55,6 +60,7 @@ async function getOverviewCounts() {
downloads,
productVideos,
productReviews,
mediaAssetCategories,
news,
faqs,
dealers,
@@ -66,6 +72,7 @@ async function getOverviewCounts() {
payload.count({ collection: 'downloads' }),
payload.count({ collection: 'productVideos' }),
payload.count({ collection: 'productReviews' }),
payload.count({ collection: 'mediaAssetCategories' }),
payload.count({ collection: 'news' }),
payload.count({ collection: 'faqs' }),
payload.count({ collection: 'dealers' }),
@@ -79,6 +86,7 @@ async function getOverviewCounts() {
{ eyebrow: 'Catalog', href: '/admin/collections/downloads', title: 'Downloads', value: downloads.totalDocs },
{ eyebrow: 'Social Proof', href: '/admin/collections/productVideos', title: 'Product Videos', value: productVideos.totalDocs },
{ eyebrow: 'Social Proof', href: '/admin/collections/productReviews', title: 'Product Reviews', value: productReviews.totalDocs },
{ eyebrow: 'Assets', href: '/admin/collections/mediaAssetCategories', title: 'Media Assets', value: mediaAssetCategories.totalDocs },
{ eyebrow: 'Publishing', href: '/admin/collections/news', title: 'News', value: news.totalDocs },
{ eyebrow: 'Support', href: '/admin/collections/faqs', title: 'FAQs', value: faqs.totalDocs },
{ eyebrow: 'Sales', href: '/admin/collections/dealers', title: 'Dealers', value: dealers.totalDocs },