diff --git a/webview-ui/src/components/cloud/CloudView.tsx b/webview-ui/src/components/cloud/CloudView.tsx index a89d3ee0d3..78dfba7494 100644 --- a/webview-ui/src/components/cloud/CloudView.tsx +++ b/webview-ui/src/components/cloud/CloudView.tsx @@ -11,6 +11,8 @@ import { ToggleSwitch } from "@/components/ui/toggle-switch" import { renderCloudBenefitsContent } from "./CloudUpsellDialog" import { TriangleAlert } from "lucide-react" import { cn } from "@/lib/utils" +import { Tab, TabContent, TabHeader } from "../common/Tab" +import { Button } from "@/components/ui/button" // Define the production URL constant locally to avoid importing from cloud package in tests const PRODUCTION_ROO_CODE_API_URL = "https://app.roocode.com" @@ -153,186 +155,187 @@ export const CloudView = ({ userInfo, isAuthenticated, cloudApiUrl, onDone }: Cl } return ( -
-
-

{isAuthenticated && t("cloud:title")}

- - {t("settings:common.done")} - -
- {isAuthenticated ? ( - <> - {userInfo && ( -
-
- {userInfo?.picture ? ( - {t("cloud:profilePicture")} - ) : ( -
- {userInfo?.name?.charAt(0) || userInfo?.email?.charAt(0) || "?"} -
- )} -
- {userInfo.name && ( -

{userInfo.name}

- )} - {userInfo?.email && ( -

{userInfo?.email}

- )} - {userInfo?.organizationName && ( -
- {userInfo.organizationImageUrl && ( + + +

{isAuthenticated && t("cloud:title")}

+ +
+ + + {isAuthenticated ? ( + <> + {userInfo && ( +
+
+ {userInfo?.picture ? ( {userInfo.organizationName} - )} - {userInfo.organizationName} -
- )} -
- )} - - {/* Task Sync Toggle - Always shown when authenticated */} -
-
- - {t("cloud:taskSync")} -
-
- {t("cloud:taskSyncDescription")} -
- {userInfo?.organizationId && ( -
- {t("cloud:taskSyncManagedByOrganization")} -
- )} - - {/* Remote Control Toggle - Only shown when both extensionBridgeEnabled and featureRoomoteControlEnabled are true */} - {userInfo?.extensionBridgeEnabled && featureRoomoteControlEnabled && ( - <> -
- - - {t("cloud:remoteControl")} - -
-
- {t("cloud:remoteControlDescription")} - {!taskSyncEnabled && ( -
- {t("cloud:remoteControlRequiresTaskSync")} + ) : ( +
+ {userInfo?.name?.charAt(0) || userInfo?.email?.charAt(0) || "?"}
)}
- - )} - - {/* Info text about usage metrics */} -
- {t("cloud:usageMetricsAlwaysReported")} -
- -
-
- -
- - {t("cloud:visitCloudWebsite")} - - - {t("cloud:logOut")} - -
- - ) : ( - <> -
-
{renderCloudBenefitsContent(t)}
- - {!authInProgress && ( - - {t("cloud:connect")} - - )} - - {/* Manual entry section */} - {authInProgress && !showManualEntry && ( - // Timeout message with "Having trouble?" link -
-
- - {t("cloud:authWaiting")} -
- {!showManualEntry && ( - + {userInfo.name && ( +

{userInfo.name}

+ )} + {userInfo?.email && ( +

{userInfo?.email}

+ )} + {userInfo?.organizationName && ( +
+ {userInfo.organizationImageUrl && ( + {userInfo.organizationName} + )} + {userInfo.organizationName} +
)}
)} - {showManualEntry && ( - // Manual URL entry form -
-

- {t("cloud:pasteCallbackUrl")} -

- +
+ -

- or{" "} - -

+ {t("cloud:taskSync")}
- )} +
+ {t("cloud:taskSyncDescription")} +
+ {userInfo?.organizationId && ( +
+ {t("cloud:taskSyncManagedByOrganization")} +
+ )} + + {/* Remote Control Toggle - Only shown when both extensionBridgeEnabled and featureRoomoteControlEnabled are true */} + {userInfo?.extensionBridgeEnabled && featureRoomoteControlEnabled && ( + <> +
+ + + {t("cloud:remoteControl")} + +
+
+ {t("cloud:remoteControlDescription")} + {!taskSyncEnabled && ( +
+ {t("cloud:remoteControlRequiresTaskSync")} +
+ )} +
+ + )} + + {/* Info text about usage metrics */} +
+ {t("cloud:usageMetricsAlwaysReported")} +
+ +
+
+ +
+ + {t("cloud:visitCloudWebsite")} + + + {t("cloud:logOut")} + +
+ + ) : ( + <> +
+
{renderCloudBenefitsContent(t)}
+ + {!authInProgress && ( + + {t("cloud:connect")} + + )} + + {/* Manual entry section */} + {authInProgress && !showManualEntry && ( + // Timeout message with "Having trouble?" link +
+
+ + {t("cloud:authWaiting")} +
+ {!showManualEntry && ( + + )} +
+ )} + + {showManualEntry && ( + // Manual URL entry form +
+

+ {t("cloud:pasteCallbackUrl")} +

+ +

+ or{" "} + +

+
+ )} +
+ + )} + {cloudApiUrl && cloudApiUrl !== PRODUCTION_ROO_CODE_API_URL && ( +
+
+ + {t("cloud:cloudUrlPillLabel")}: + +
- - )} - {cloudApiUrl && cloudApiUrl !== PRODUCTION_ROO_CODE_API_URL && ( -
-
- - {t("cloud:cloudUrlPillLabel")}: - -
-
- )} -
+ )} + + ) }