Skip to content

Commit 5a198a4

Browse files
More UI fixes when an app is disconnected from its Git provider
1 parent 5b6f4eb commit 5a198a4

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

frontend/src/pages/app/OverviewTab.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { api } from "@/lib/api";
1111
import { cn, isWorkloadConfig } from "@/lib/utils";
1212
import { GitHubIcon } from "@/pages/create-app/CreateAppView";
1313
import {
14+
AlertCircle,
1415
CheckCheck,
1516
ChevronLeft,
1617
ChevronRight,
@@ -275,8 +276,19 @@ export const OverviewTab = ({
275276
</div>
276277
<ToggleCDForm app={app} refetchApp={refetchApp} className="mt-4" />
277278
<h3 className="mt-8 text-xl font-medium">Recent Deployments</h3>
278-
<p className="mb-2 opacity-50">
279-
{app.config.source === "git" && app.cdEnabled ? (
279+
<p className="mb-2 text-pretty opacity-50">
280+
{app.config.source === "git" && !app.repositoryURL ? (
281+
<>
282+
<AlertCircle className="inline size-6" /> This organization is no
283+
longer connected to its Git provider. Deployments will not be
284+
created automatically from Git pushes until the app is reconnected
285+
from the{" "}
286+
<Link to="?tab=configuration" className="underline">
287+
Configuration tab
288+
</Link>
289+
.
290+
</>
291+
) : app.config.source === "git" && app.cdEnabled ? (
280292
<>
281293
Automatically triggered by {deployTrigger}
282294
<a href={`${app.repositoryURL}/tree/${app.config.branch}`}>
@@ -517,7 +529,7 @@ const ToggleCDForm = ({
517529
"/app/{appId}/cd",
518530
);
519531

520-
if (app.config.source !== "git") {
532+
if (app.config.source !== "git" || !app.repositoryURL) {
521533
return null;
522534
}
523535

0 commit comments

Comments
 (0)