diff --git a/src/components/AssignedProjectCard.jsx b/src/components/AssignedProjectCard.jsx
index d28a0ef..d40973d 100644
--- a/src/components/AssignedProjectCard.jsx
+++ b/src/components/AssignedProjectCard.jsx
@@ -1,37 +1,18 @@
import { useState } from 'react'
-import { FaCodeBranch } from 'react-icons/fa'
-import { FaLinkSlash } from 'react-icons/fa6'
+import { Badge, Button } from './ui'
import PreviewBlock from './PreviewBlock'
import AnalyseRow from './AnalyseRow'
import GiteaLinkButton from './GiteaLinkButton'
import PreviewLinkButton from './PreviewLinkButton'
+import { statusValueTone } from './projectTones'
import { suggestSubdomain } from '../lib/subdomain'
import { needsPreviewButton, assignSummary } from '../lib/projectAssign'
import { updateWebsiteProject, backfillProjectPushes } from '../lib/projectAdminApi'
-const STATUS_COLORS = {
- ready: 'var(--green-fg)',
- live: 'var(--green-fg)',
- online: 'var(--green-fg)',
- provisioning: 'var(--orange-fg)',
- pending: 'var(--orange-fg)',
- building: 'var(--blue-fg)',
- error: 'var(--red-fg)',
- failed: 'var(--red-fg)',
-}
-
-function StatusBadge({ label, value }) {
+// Status und Provisioning: Wert als Badge, ohne Wert nichts
+function StatusValue({ label, value }) {
if (!value) return null
- const color = STATUS_COLORS[String(value).toLowerCase()] || 'var(--text-2)'
- return (
-
- {label}:
-
-
- {value}
-
-
- )
+ return {label}: {value}
}
export default function AssignedProjectCard({ project, onUnassign, showActions = false, customerName = '', onChanged = () => {} }) {
@@ -79,65 +60,47 @@ export default function AssignedProjectCard({ project, onUnassign, showActions =
}
return (
-
-
-
+
+
+
{project.projectName}
- {project.subdomain &&
({project.subdomain})}
- {project.repoFullName && (
-
- {project.repoFullName}
-
- )}
+ {project.subdomain && <>{' '}
({project.subdomain})>}
+ {project.repoFullName &&
{project.repoFullName}
}
-
+
{showActions && onUnassign && (
-
+
)}
- {/* Status- und Provisioning-Zeile */}
-
-
-
-
+ {(project.status || project.provisioningStatus) && (
+
+
+
+
+ )}
{project.subdomain &&
}
{showActions && project.subdomain && (
-
-
+ {showPreviewBlock &&
}
+ >
)}
{showActions && (
-
-
+ <>
+
{needsPreviewButton(project) && !showPreviewInput && (
-
+
Preview einschalten
)}
@@ -145,32 +108,23 @@ export default function AssignedProjectCard({ project, onUnassign, showActions =
<>
setSubdomain(e.target.value)}
/>
-
+
Einschalten
-
+
>
)}
-
+
Pushes nachtragen
- {(previewMessage || pushMessage) && (
-
- {previewMessage &&
{previewMessage}
}
- {pushMessage &&
{pushMessage}
}
-
- )}
-
+ {previewMessage &&
{previewMessage}
}
+ {pushMessage &&
{pushMessage}
}
+ >
)}
)
diff --git a/src/styles/global.css b/src/styles/global.css
index e2109d9..6448d6b 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -1121,7 +1121,7 @@ button.link { text-align: left; } /* Reset und Gewicht von button.link stehen im
.projects-table td.cell-address code { display: block; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.projects-table td.cell-updated { min-width: 70px; }
.projects-table tr.is-archived td { opacity: .72; }
-.row-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
+.row-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 13px; } /* Links (a) und Textknoepfe (button) auf einer Zeile; ohne baseline sitzt ein button.link-danger in einer hoeheren Zeile mittig statt oben */
.row-actions .link { white-space: nowrap; }
.projects-table .row-actions { justify-content: flex-end; }
/* Unter 860 px steht jede Zeile als zweispaltiges Raster: Projekt ueber beide Spalten, Kunde und Status nebeneinander, Aktionen darunter. */