feat: hook post-job cosma-nav + style dashboard + docker-compose update
This commit is contained in:
@@ -174,6 +174,8 @@ code { background: rgba(255,255,255,0.05); padding: 0 0.25rem; border-radius: 3p
|
||||
.docs-link:hover { background: #2d2f31; }
|
||||
.btn-glb, .btn-ply-dl { display: inline-block; text-decoration: none; padding: 3px 10px; border: 1px solid #8bc34a; border-radius: 3px; color: #8bc34a; font-size: 0.72rem; background: transparent; cursor: pointer; font-family: inherit; }
|
||||
.btn-glb:hover, .btn-ply-dl:hover { background: #8bc34a; color: #000; }
|
||||
.btn-qc { display: inline-block; text-decoration: none; padding: 3px 10px; border: 1px solid #29b6f6; border-radius: 3px; color: #29b6f6; font-size: 0.72rem; background: transparent; cursor: pointer; font-family: inherit; }
|
||||
.btn-qc:hover { background: #29b6f6; color: #000; }
|
||||
|
||||
/* Section évolutions */
|
||||
#evolutions { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border, #333); }
|
||||
@@ -192,3 +194,7 @@ code { background: rgba(255,255,255,0.05); padding: 0 0.25rem; border-radius: 3p
|
||||
.pipeline-box ol { margin: 0; padding-left: 1.4rem; }
|
||||
.pipeline-box li { padding: 0.18rem 0; font-size: 0.78rem; color: var(--muted, #888); }
|
||||
.pipeline-box code { font-size: 0.73rem; background: rgba(255,255,255,0.07); padding: 1px 5px; border-radius: 3px; color: #cef; }
|
||||
|
||||
.viewer-btn { background: #1a3a2a; color: #4ade80; border: 1px solid #4ade80; border-radius: 3px; padding: 2px 8px; cursor: pointer; font-size: 0.8rem; }
|
||||
.viewer-btn:hover { background: #4ade80; color: #0a1a10; }
|
||||
.viewer-btn:disabled { opacity: 0.5; cursor: wait; }
|
||||
|
||||
@@ -75,16 +75,26 @@ document.addEventListener('click', async (e) => {
|
||||
const btn = e.target.closest('.viewer-btn');
|
||||
if (!btn) return;
|
||||
e.preventDefault();
|
||||
const url = btn.dataset.viewUrl;
|
||||
const liveUrl = btn.dataset.liveUrl;
|
||||
const viewUrl = btn.dataset.viewUrl;
|
||||
btn.textContent = '…';
|
||||
btn.disabled = true;
|
||||
try {
|
||||
const res = await fetch(url, { method: 'POST' });
|
||||
const data = await res.json();
|
||||
if (res.ok && data.url) window.open(data.url, '_blank');
|
||||
else alert(data.detail || 'Erreur lancement viewer');
|
||||
} catch (err) { alert('Erreur réseau: ' + err); }
|
||||
btn.textContent = 'viser';
|
||||
let url = null;
|
||||
if (liveUrl) {
|
||||
try {
|
||||
const res = await fetch(liveUrl, { method: 'POST' });
|
||||
if (res.ok) { const d = await res.json(); url = d.url; }
|
||||
} catch {}
|
||||
}
|
||||
if (!url && viewUrl) {
|
||||
try {
|
||||
const res = await fetch(viewUrl, { method: 'POST' });
|
||||
if (res.ok) { const d = await res.json(); url = d.url; }
|
||||
else { const d = await res.json(); alert(d.detail || 'Erreur lancement viewer'); }
|
||||
} catch (err) { alert('Erreur réseau: ' + err); }
|
||||
}
|
||||
if (url) window.open(url, '_blank');
|
||||
btn.textContent = 'viser ↗';
|
||||
btn.disabled = false;
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user