Skip to content
TypeScript

fix(web): use neutral indicators for inactive source control providers (#22778)

Utkarsh Patildac58fa7a6f7
diff --git a/apps/web/src/components/settings/SourceControlSettings.tsx b/apps/web/src/components/settings/SourceControlSettings.tsx
index 7f7b0a90ebc..b519f7322c7 100644
--- a/apps/web/src/components/settings/SourceControlSettings.tsx
+++ b/apps/web/src/components/settings/SourceControlSettings.tsx
@@ -74,13 +74,13 @@ function isVcsNotReady(item: VcsDiscoveryItem | SourceControlProviderDiscoveryIt
function authPresentation(auth: SourceControlProviderAuth): {
readonly label: string;
- readonly badge: "warning" | null;
+ readonly badge: "secondary" | null;
} {
if (auth.status === "authenticated") {
return { label: "Authenticated", badge: null };
}
if (auth.status === "unauthenticated") {
- return { label: "Not authenticated", badge: "warning" };
+ return { label: "Not authenticated", badge: "secondary" };
}
return { label: "Status unknown", badge: null };
}
@@ -98,8 +98,12 @@ function RedactedAccount(props: { readonly account: string | null }) {
function itemStatusDot(item: VcsDiscoveryItem | SourceControlProviderDiscoveryItem): string {
if (isVcsNotReady(item)) return "bg-muted-foreground/35";
+ if (isProviderDiscoveryItem(item)) {
+ return item.status === "available" && item.auth.status === "authenticated"
+ ? "bg-success"
+ : "bg-muted-foreground/35";
+ }
if (item.status !== "available") return "bg-warning";
- if (isProviderDiscoveryItem(item) && item.auth.status !== "authenticated") return "bg-warning";
return "bg-success";
}