diff --git a/apps/app/src/components/plugin/management/BrowsePluginsTab.tsx b/apps/app/src/components/plugin/management/BrowsePluginsTab.tsx index a66880e489b..86cc5a4ea1a 100644 --- a/apps/app/src/components/plugin/management/BrowsePluginsTab.tsx +++ b/apps/app/src/components/plugin/management/BrowsePluginsTab.tsx @@ -34,7 +34,7 @@ import { sortPluginEntries, type PluginBrowseShelf, } from "./plugin-browse-discovery"; -import { pluginCatalogCategoryMutedAccentStyle } from "./plugin-ui"; +import { PluginCategoryIcon } from "./plugin-ui"; const SHELF_ENTRY_LIMIT = 6; @@ -215,12 +215,9 @@ export function BrowsePluginsTab({

{selectedShelf.key.startsWith("category:") ? ( - ) : null} {selectedShelf.label} @@ -362,11 +359,7 @@ function BrowseShelf({ ) : shelf.key === "collection:new-and-notable" ? ( ) : ( - + ) } browseAction={ diff --git a/apps/app/src/components/plugin/management/PluginCard.tsx b/apps/app/src/components/plugin/management/PluginCard.tsx index fd259082026..49938430a67 100644 --- a/apps/app/src/components/plugin/management/PluginCard.tsx +++ b/apps/app/src/components/plugin/management/PluginCard.tsx @@ -81,27 +81,45 @@ interface PluginCardAuthorProps { >; } +function pluginCardAuthorName(entry: PluginCardAuthorProps["entry"]): string { + return entry.marketplace === "bb-official" + ? "BB Official" + : (entry.author?.name ?? entry.publisherLabel); +} + +export function PluginCardAuthorAvatar({ entry }: PluginCardAuthorProps) { + return ( + + ); +} + +export function PluginCardAuthorName({ entry }: PluginCardAuthorProps) { + const name = pluginCardAuthorName(entry); + return entry.author === null ? ( + name + ) : ( + + {name} + + ); +} + export function PluginCardAuthor({ entry }: PluginCardAuthorProps) { - const name = - entry.marketplace === "bb-official" - ? "BB Official" - : (entry.author?.name ?? entry.publisherLabel); return ( - {entry.author === null ? ( - name - ) : ( - - {name} - - )} + ); } diff --git a/apps/app/src/components/plugin/management/PluginMarketplaceListing.tsx b/apps/app/src/components/plugin/management/PluginMarketplaceListing.tsx index 5cfffa7a0f5..12c00bd6dc8 100644 --- a/apps/app/src/components/plugin/management/PluginMarketplaceListing.tsx +++ b/apps/app/src/components/plugin/management/PluginMarketplaceListing.tsx @@ -1,4 +1,5 @@ import { useEffect, useMemo, useState, type ReactNode } from "react"; +import { Link } from "react-router-dom"; import { Carousel, CarouselContent, @@ -17,23 +18,51 @@ import { } from "@bb/shared-ui/resource-list"; import type { PluginCatalogSearchEntry } from "@/hooks/queries/plugin-catalog-queries"; import { PluginOverviewMarkdown } from "@/components/plugin/management/PluginOverviewMarkdown"; +import { getPluginsRoutePath } from "@/lib/route-paths"; +import { PluginCardAuthorName } from "./PluginCard"; import { CatalogEntryIconChip, formatUrlLabel, - PluginCategoryLabel, + pluginCatalogCategoryIconName, + PluginCategoryIcon, } from "./plugin-ui"; import { entriesByMarketplaceAuthor, pluginMarketplaceAuthorKey, } from "./plugin-marketplace-author"; -export function PluginMarketplaceCategoryPill({ +export function PluginMarketplaceByline({ entry, }: { - entry: PluginCatalogSearchEntry; + entry: Pick< + PluginCatalogSearchEntry, + "author" | "marketplace" | "publisherLabel" | "category" | "categoryId" + >; }) { - return entry.category === undefined ? null : ( - + return ( + + + + + {entry.category === undefined || + pluginCatalogCategoryIconName(entry.categoryId) === undefined ? null : ( + + + + {entry.category} + + + )} + ); } @@ -63,9 +92,11 @@ export function PluginMarketplaceDetailMetadata({ }) { return ( <> - - {entry.marketplaceDisplayName} - + {entry.marketplace === "bb-official" ? null : ( + + {entry.marketplaceDisplayName} + + )} {entry.publishedAt === undefined ? null : (