You've already forked Atomcms-edit
60 lines
3.0 KiB
PHP
Executable File
60 lines
3.0 KiB
PHP
Executable File
<div>
|
|
<div class="bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-200 dark:border-gray-700">
|
|
{{-- Header --}}
|
|
<div class="flex flex-wrap items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700 gap-3">
|
|
<div class="flex items-center gap-3">
|
|
<h3 class="text-lg font-semibold">📜 Emulator Logs</h3>
|
|
|
|
<select wire:model="selectedFile" wire:change="loadLogContent" class="text-sm border-gray-300 dark:border-gray-600 dark:bg-gray-700 rounded-lg px-3 py-1.5">
|
|
@foreach($logFiles as $file)
|
|
<option value="{{ $file }}">{{ basename($file) }}</option>
|
|
@endforeach
|
|
</select>
|
|
|
|
<select wire:model="lines" wire:change="loadLogContent" class="text-sm border-gray-300 dark:border-gray-600 dark:bg-gray-700 rounded-lg px-3 py-1.5">
|
|
<option value="50">50 regels</option>
|
|
<option value="100">100 regels</option>
|
|
<option value="200">200 regels</option>
|
|
<option value="500">500 regels</option>
|
|
<option value="1000">1000 regels</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="flex items-center gap-2">
|
|
<label class="flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400">
|
|
<input type="checkbox" wire:model="autoRefresh" class="rounded">
|
|
Auto-refresh ({{ $refreshInterval }}s)
|
|
</label>
|
|
|
|
<button wire:click="loadLogContent" class="px-3 py-1.5 text-sm bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition">
|
|
🔄 Vernieuw
|
|
</button>
|
|
|
|
<button wire:click="clearLog" onclick="return confirm('Weet je zeker dat je het log wilt legen?')" class="px-3 py-1.5 text-sm bg-red-500 text-white rounded-lg hover:bg-red-600 transition">
|
|
🗑️ Leeg
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- Log Content --}}
|
|
<div class="p-4">
|
|
<div class="bg-gray-900 rounded-lg overflow-hidden">
|
|
<div class="flex items-center justify-between px-4 py-2 bg-gray-800 border-b border-gray-700">
|
|
<span class="text-xs text-gray-400">{{ basename($selectedFile) ?? 'Geen bestand' }}</span>
|
|
<span class="text-xs text-gray-500">{{ $lines }} regels</span>
|
|
</div>
|
|
<pre class="p-4 text-green-400 text-xs font-mono overflow-auto max-h-96 whitespace-pre-wrap leading-relaxed">{{ $logContent }}</pre>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- Auto Refresh Script --}}
|
|
@if($autoRefresh)
|
|
<script>
|
|
setInterval(() => {
|
|
@this.call('loadLogContent');
|
|
}, {{ $refreshInterval * 1000 }});
|
|
</script>
|
|
@endif
|
|
</div>
|
|
</div>
|