diff --git a/apps/web/src/components/settings/ProviderInstanceCard.tsx b/apps/web/src/components/settings/ProviderInstanceCard.tsx index 226043c7ce1f..415ebb97c029 100644 --- a/apps/web/src/components/settings/ProviderInstanceCard.tsx +++ b/apps/web/src/components/settings/ProviderInstanceCard.tsx @@ -593,7 +593,11 @@ export function ProviderInstanceCard({ compatibility.status !== "supported" && compatibility.status !== "unknown"; const VersionAdvisoryIcon = hasCompatibilityWarning ? AlertTriangleIcon : ArrowUpCircleIcon; - const onRunVersionAction = versionAdvisory?.targetVersion ? onInstallRecommended : onRunUpdate; + const onRunVersionAction = readOnly + ? undefined + : versionAdvisory?.targetVersion + ? onInstallRecommended + : onRunUpdate; const urlAuthAction = liveProvider?.auth.action; const displayName = instance.displayName?.trim() || driverOption?.label || String(instance.driver); @@ -765,6 +769,101 @@ export function ProviderInstanceCard({ ) : null} ); + const versionAdvisoryNode = versionAdvisory ? ( + + + + + + } + /> + } + /> + {versionAdvisory.title} + + +
+
+

+ {versionAdvisory.title} +

+

+ {versionAdvisory.detail} +

+
+ {onRunVersionAction ? ( + + ) : null} + {onRunVersionAction && updateCommand ? ( +
+ + or, update manually using + +
+ ) : null} + {updateCommand ? ( +
+ + {updateCommand} + + + copyToClipboard(updateCommand, { providerName: displayName })} + aria-label="Copy update command" + > + + + } + /> + Copy command + +
+ ) : null} +
+
+
+ ) : null; + if (mode === "list") { return (
) : null} - {versionAdvisory ? ( - hasCompatibilityWarning ? ( - - - - - } - /> - {versionAdvisory.detail} - - ) : updateCommand ? ( - - - copyToClipboard(updateCommand, { providerName: displayName }) - } - > - - - } - /> - Copy update command - - ) : ( - - - - ) - ) : null} + {versionAdvisoryNode} {statusDotNode ? ( @@ -876,105 +933,12 @@ export function ProviderInstanceCard({ ) : null} {versionCodeNode} + {versionAdvisoryNode} - {versionAdvisory ? ( - - - - - - } - /> - } - /> - {versionAdvisory.title} - - -
-
-

- {versionAdvisory.title} -

-

- {versionAdvisory.detail} -

-
- {onRunVersionAction ? ( - - ) : null} - {onRunVersionAction && updateCommand ? ( -
- - or, update manually using - -
- ) : null} - {updateCommand ? ( -
- - {updateCommand} - - - - copyToClipboard(updateCommand, { providerName: displayName }) - } - aria-label="Copy update command" - > - - - } - /> - Copy command - -
- ) : null} -
-
-
- ) : null} {titleTailNode} {onDelete ? (