From 1e19f5ad8ba5e8410b537f518453b1a1df8beb52 Mon Sep 17 00:00:00 2001 From: KI-Sparringpartner Date: Mon, 3 Aug 2026 20:18:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20UI:=20Push=20Button=20nur=20zeig?= =?UTF-8?q?en=20wenn=20Changes=20vorhanden=20sind=20+=20has=5Fchanges=20St?= =?UTF-8?q?atus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/templates/index.html | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/app/templates/index.html b/app/templates/index.html index 7bd5663..0c21cda 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -12,6 +12,7 @@ .btn-subscribe { background: #007bff; color: white; } .btn-unsubscribe { background: #dc3545; color: white; } .btn-push { background: #28a745; color: white; } + .btn-changes { background: #ffc107; color: white; } .status-ok { color: #28a745; font-size: 13px; } .status-warn { color: #dc3545; font-size: 13px; } hr { border: none; border-top: 1px solid #ccc; margin: 20px 0; } @@ -68,6 +69,17 @@ async function loadProjects() { const writeStatus = proj.can_write ? '✅ Schreibfrei' : '❌ Nur Lesen'; + + // ✅ NEU: Zeige Changes an wenn vorhanden! + let changesHtml = ''; + if (proj.has_changes && proj.uncommitted_files) { + const fileCount = proj.uncommitted_files.filter(f => f && !f.startsWith('??')).length; + if (fileCount > 0) { + changesHtml = `⚠️ ${fileCount} Datei(en) geändert (nicht committed)`; + } else { + changesHtml = '⚠️ Neuer Inhalt erkannt'; + } + } card.innerHTML = `
@@ -75,9 +87,11 @@ async function loadProjects() { ${writeStatus}
${proj.has_git ? '📦 Git Repository' : ''} + ${changesHtml}
- - + ${(proj.has_changes && proj.can_write) ? '' : ''} + ${!proj.can_write && !proj.has_changes ? 'Push nur bei Berechtigung & Changes möglich' : ''} +
`;