critiquing-live.php
- Pfad:
src/View/content/partials/critiquing-live.php - Namespace: -
- Zeilen: 46 | Größe: 1,406 Bytes
- Geändert: 2025-12-25 09:23:28 | Gescannt: 2025-12-31 10:22:15
Code Hygiene Score: 100
- Dependencies: 100 (25%)
- LOC: 100 (20%)
- Methods: 100 (20%)
- Secrets: 100 (15%)
- Classes: 100 (10%)
- Magic Numbers: 100 (10%)
Keine Issues gefunden.
Code
<?php
/**
* Critiquing Progress Partial with Live Log (HTMX Polling)
*
* @var int $orderId Order ID for polling
* @var string $log Current log content
* @var string $step Current step
*/
$log = $log ?? '';
$step = $step ?? '';
?>
<div class="critiquing-live-container"
hx-get="/content/<?= $orderId ?>/critique-status"
hx-trigger="load delay:1s"
hx-swap="outerHTML">
<div class="critiquing-live-header">
<div class="critiquing-live-spinner">
<span class="critiquing-live-dot"></span>
<span class="critiquing-live-dot"></span>
<span class="critiquing-live-dot"></span>
</div>
<span class="critiquing-live-status">
<?php
$stepLabels = [
'init' => 'Initialisierung...',
'critics' => 'Lade Kritiker...',
'critic_1' => 'Kritiker 1 analysiert...',
'critic_2' => 'Kritiker 2 analysiert...',
'critic_3' => 'Kritiker 3 analysiert...',
'done' => 'Fertig!',
'error' => 'Fehler',
];
echo $stepLabels[$step] ?? 'Kritiker analysieren Content...';
?>
</span>
</div>
<?php if ($log): ?>
<pre class="critiquing-live-log"><?= htmlspecialchars($log) ?></pre>
<?php else: ?>
<pre class="critiquing-live-log">Warte auf Ausgabe...</pre>
<?php endif; ?>
</div>