| ... | ... | @@ -1549,6 +1549,18 @@ function SavedBackendListRow({ |
| 1549 | 1549 | versionMismatch !== null && |
| 1550 | 1550 | (serverUpdateState.status === "idle" || serverUpdateState.status === "failed"); |
| 1551 | 1551 | |
| 1552 | const statusTooltip = `${ |
| 1553 | unsupported |
| 1554 | ? (environment.connection.error ?? connectionStatusText(environment.connection)) |
| 1555 | : enabled |
| 1556 | ? connectionStatusText(environment.connection) |
| 1557 | : "Switched off" |
| 1558 | }${ |
| 1559 | versionMismatch |
| 1560 | ? `\nUpdate available: ${versionMismatch.serverVersion} → ${versionMismatch.clientVersion}` |
| 1561 | : "" |
| 1562 | }`; |
| 1563 | |
| 1552 | 1564 | return ( |
| 1553 | 1565 | <EnvironmentRow |
| 1554 | 1566 | kind={machineKind} |
| ... | ... | @@ -1556,7 +1568,10 @@ function SavedBackendListRow({ |
| 1556 | 1568 | dimmed={!enabled} |
| 1557 | 1569 | subtitle={ |
| 1558 | 1570 | <Tooltip> |
| 1571 | {/* The status can change while the tooltip is open, and base-ui only |
| 1572 | re-measures the popup when the trigger's payload changes. */} |
| 1559 | 1573 | <TooltipTrigger |
| 1574 | payload={statusTooltip} |
| 1560 | 1575 | render={ |
| 1561 | 1576 | <span |
| 1562 | 1577 | className={cn( |
| ... | ... | @@ -1569,14 +1584,7 @@ function SavedBackendListRow({ |
| 1569 | 1584 | {subtitleText} |
| 1570 | 1585 | </TooltipTrigger> |
| 1571 | 1586 | <TooltipPopup side="top" className="whitespace-pre-wrap"> |
| 1572 | | {unsupported |
| 1573 | | ? (environment.connection.error ?? connectionStatusText(environment.connection)) |
| 1574 | | : enabled |
| 1575 | | ? connectionStatusText(environment.connection) |
| 1576 | | : "Switched off"} |
| 1577 | | {versionMismatch |
| 1578 | | ? `\nUpdate available: ${versionMismatch.serverVersion} → ${versionMismatch.clientVersion}` |
| 1579 | | : ""} |
| 1587 | {statusTooltip} |
| 1580 | 1588 | </TooltipPopup> |
| 1581 | 1589 | </Tooltip> |
| 1582 | 1590 | } |