diff --git a/src/features/content/renderers/collections/EarAcupunctureRenderers.tsx b/src/features/content/renderers/collections/EarAcupunctureRenderers.tsx index fb5a42a..15d9c9f 100644 --- a/src/features/content/renderers/collections/EarAcupunctureRenderers.tsx +++ b/src/features/content/renderers/collections/EarAcupunctureRenderers.tsx @@ -33,6 +33,9 @@ export function EarAcupunctureCatalogCardRenderer({ const contentCount = asNumber(attributes.content_count); const contentLabel = asString(attributes.content_label).trim(); + const isCatalog = + contentCount !== null || + (attributes.link as Record | undefined)?.type === "template_ref"; return ( ); diff --git a/src/features/content/renderers/shared/StandardIndexCard.tsx b/src/features/content/renderers/shared/StandardIndexCard.tsx index 65dff01..946e126 100644 --- a/src/features/content/renderers/shared/StandardIndexCard.tsx +++ b/src/features/content/renderers/shared/StandardIndexCard.tsx @@ -20,6 +20,7 @@ export interface StandardIndexCardProps { count?: number | null; countLabel?: string | null; tone?: StandardIndexCardTone; + icon?: "dot" | "book"; onPress: () => void; } @@ -30,12 +31,13 @@ export function StandardIndexCard({ count, countLabel, tone, + icon = "dot", onPress, }: StandardIndexCardProps) { const { tone: contextTone } = usePageTone(); const normalizedTitle = title.trim(); const normalizedSubtitle = subtitle?.trim() || null; - const effectiveTone = tone || contextTone || "purple"; + const effectiveTone = tone || (icon === "book" ? "green" : contextTone) || "purple"; const currentTone = cardTones[effectiveTone] || cardTones.purple; return ( @@ -46,7 +48,11 @@ export function StandardIndexCard({ style={({ pressed }) => [styles.row, pressed && styles.pressed]} > - + {icon === "book" ? ( + + ) : ( + + )} diff --git a/src/features/content/screens/CollectionTemplateScreen.tsx b/src/features/content/screens/CollectionTemplateScreen.tsx index c91bca0..cba5a49 100644 --- a/src/features/content/screens/CollectionTemplateScreen.tsx +++ b/src/features/content/screens/CollectionTemplateScreen.tsx @@ -5,7 +5,7 @@ import { Ionicons } from "@expo/vector-icons"; import { router } from "expo-router"; import { Colors } from "@/theme"; -import { PageToneProvider } from "../context/PageToneContext"; +import { type PageTone, PageToneProvider } from "../context/PageToneContext"; import { ContentPageHeader } from "../components/layout/ContentPageHeader"; import { ScreenError } from "../components/ContentScreenState"; import { ContractSortModal } from "../components/search/ContractSortModal"; @@ -131,8 +131,15 @@ export function CollectionTemplateScreen({ ); + const isCatalog = + collectionRendererCode === "module_catalog_collection" || + itemRendererCode === "module_catalog_card" || + templateCode === "m0001_ct0001" || + templateCode === "m0002_ct0001"; + const pageTone: PageTone = isCatalog ? "green" : "purple"; + return ( - +