@props([ 'emulatorOnline', 'jarExists', 'serviceName', 'sourceCommit', 'remoteVersion', 'canBuild', 'jarPath', 'sourcePath', ]) @php $sourceCommitShort = substr($sourceCommit, 0, 7); $hasUpdate = $sourceCommit !== 'N/A' && $remoteVersion !== 'N/A' && $sourceCommitShort !== $remoteVersion; $updateColor = $hasUpdate ? '#f59e0b' : '#22c55e'; $updateText = $hasUpdate ? '🔄 ' . __('commandocentrum.update_available') : '✓ ' . __('commandocentrum.up_to_date'); $btnColor = $hasUpdate ? '#f59e0b' : '#3b82f6'; $btnGradient = $hasUpdate ? 'linear-gradient(135deg,#f59e0b,#d97706)' : 'linear-gradient(135deg,#3b82f6,#2563eb)'; $btnText = $hasUpdate ? '⚡ ' . __('commandocentrum.update') : '🔄 ' . __('commandocentrum.rebuild'); $jarFileName = ''; if ($jarExists) { $jarSize = shell_exec('ls -lh ' . escapeshellarg($jarPath) . '/*.jar 2>/dev/null | head -1'); if ($jarSize) { preg_match('/(\S+\.jar)/', $jarSize, $matches); if (isset($matches[1])) { $jarFileName = basename($matches[1]); } } } @endphp