Skip to content

Commit 5912057

Browse files
fix(web): use neutral indicators for inactive source control providers
1 parent 6490a9e commit 5912057

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎apps/web/src/components/settings/SourceControlSettings.tsx‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ function isVcsNotReady(item: VcsDiscoveryItem | SourceControlProviderDiscoveryIt
132132

133133
function authPresentation(auth: SourceControlProviderAuth): {
134134
readonly label: string;
135-
readonly badge: "warning" | null;
135+
readonly badge: "secondary" | null;
136136
} {
137137
if (auth.status === "authenticated") {
138138
return { label: "Authenticated", badge: null };
139139
}
140140
if (auth.status === "unauthenticated") {
141-
return { label: "Not authenticated", badge: "warning" };
141+
return { label: "Not authenticated", badge: "secondary" };
142142
}
143143
return { label: "Status unknown", badge: null };
144144
}
@@ -156,8 +156,12 @@ function RedactedAccount(props: { readonly account: string | null }) {
156156

157157
function itemStatusDot(item: VcsDiscoveryItem | SourceControlProviderDiscoveryItem): string {
158158
if (isVcsNotReady(item)) return "bg-muted-foreground/35";
159+
if (isProviderDiscoveryItem(item)) {
160+
return item.status === "available" && item.auth.status === "authenticated"
161+
? "bg-success"
162+
: "bg-muted-foreground/35";
163+
}
159164
if (item.status !== "available") return "bg-warning";
160-
if (isProviderDiscoveryItem(item) && item.auth.status !== "authenticated") return "bg-warning";
161165
return "bg-success";
162166
}
163167

0 commit comments

Comments
 (0)