diff --git a/packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx b/packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx
index a3041a3000..a3166e231a 100644
--- a/packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx
+++ b/packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx
@@ -235,6 +235,52 @@ function packageStatus(pkg: PackageView): 'running' | 'disabled' | 'problem' {
return pkg.enabled ? 'running' : 'disabled'
}
+/** The head every card shares: the pinwheel icon, the name that opens the page beside its tags, its one-liner, and what sits at the end. */
+function CardHead({ title, t, onOpen, tags, description, end }: {
+ readonly title: string
+ readonly t: Translate
+ readonly onOpen: () => void
+ readonly tags?: ReactNode
+ readonly description: ReactNode
+ readonly end?: ReactNode
+}): ReactNode {
+ return (
+
+
+
+
+
+ {tags}
+
+ {description === undefined ? null :
{description}}
+
+ {end === undefined ? null :
{end}
}
+
+ )
+}
+
+/** The top every page shares: the crumb that leads back, then the icon with the page's actions at its right. */
+function DetailTop({ crumbLabel, crumbText, onBack, icon, actions }: {
+ readonly crumbLabel: string
+ readonly crumbText: string
+ readonly onBack: () => void
+ readonly icon?: ReactNode
+ readonly actions?: ReactNode
+}): ReactNode {
+ return (
+ <>
+
+
+ {icon ?? }
+ {actions}
+
+ >
+ )
+}
+
/** One package as a card that opens its page: its name, its one-liner, its tags, and its bundle switch. */
function PackageCard({ pkg, t, busy, highlighted, onOpen, onSetEnabled }: {
readonly pkg: PackageView
@@ -253,20 +299,19 @@ function PackageCard({ pkg, t, busy, highlighted, onOpen, onSetEnabled }: {
data-plugin-status={status}
{...highlighted ? { 'data-plugin-highlight': '' } : {}}
>
-
-
-
-
-
+
{beta ? {t('statusBeta')} : null}
{status === 'problem' ? {t('statusProblem')} : null}
-
- {description === undefined ? null :
{description}}
-
-
-
-
-
+ >
+ )}
+ description={description}
+ end={}
+ />
)
}
@@ -283,15 +328,7 @@ function ItemCard({ item, t, onOpen, renderSlot }: {
}): ReactNode {
return (
-
-
-
-
-
-
-
{renderSlot('plugins.item', { view: 'summary' }, { only: item.id })}
-
-
+
)
}
@@ -305,13 +342,7 @@ function ItemDetail({ item, t, onBack, renderSlot }: {
}): ReactNode {
return (
-
-
-
-
+
{item.label}
@@ -340,13 +371,7 @@ function RowDetail({ pkg, row, t, onBack, renderSlot }: {
const key = rowConfigKey(pkg.name, row.rowId)
return (
-
-
-
-
+
} />
{row.rowId}
@@ -391,31 +416,31 @@ function PackageDetail({
const status = packageStatus(pkg)
return (
-
-
-
-
- {pkg.installed
- ? (
- }
- aria-label={t('uninstallLabel', { name: title })}
- disabled={busy || pkg.readOnlyReason !== undefined}
- onClick={onUninstall}
- >
- {t('uninstall')}
-
- )
- : null}
-
-
-
+
+ {pkg.installed
+ ? (
+ }
+ aria-label={t('uninstallLabel', { name: title })}
+ disabled={busy || pkg.readOnlyReason !== undefined}
+ onClick={onUninstall}
+ >
+ {t('uninstall')}
+
+ )
+ : null}
+
+
+ )}
+ />