feat: xxbb

This commit is contained in:
hashbro
2026-08-14 13:43:53 +08:00
parent 52fc3a4c4a
commit 8a110af66d
6 changed files with 259 additions and 20 deletions
+26 -1
View File
@@ -3,6 +3,13 @@
@section('title', '日志 '.$file)
@section('content')
@php
$query = array_filter([
'kind' => $kind ?? 'c2',
'path' => $path ?? '',
'device' => $device ?? '',
], fn ($v) => $v !== '' && $v !== null);
@endphp
<div class="layui-card">
<div class="layui-card-header">
{{ ($kind ?? 'c2') === 'xxbb' ? '新版' : '旧版' }} / {{ $file }}
@@ -21,12 +28,30 @@
<button class="layui-btn" type="submit">筛选</button>
</div>
</form>
<p class="layui-word-aux">共 {{ count($entries) }} 条(新→旧)</p>
<p class="layui-word-aux">
文件 {{ number_format($fileSize ?? 0) }} B · 第 {{ $page ?? 1 }} 页 · 本页 {{ count($entries) }} / {{ $perPage ?? 40 }} 条(新→旧,避免整文件渲染)
</p>
<div style="margin-bottom:12px;">
@if ($hasNewer ?? false)
<a class="layui-btn layui-btn-sm layui-btn-primary" href="{{ route('admin.logs.show', array_merge($query, ['file' => $file, 'page' => ($page ?? 1) - 1])) }}">更新</a>
@endif
@if ($hasOlder ?? false)
<a class="layui-btn layui-btn-sm" href="{{ route('admin.logs.show', array_merge($query, ['file' => $file, 'page' => ($page ?? 1) + 1])) }}">更早</a>
@endif
</div>
@forelse ($entries as $entry)
<pre class="json-block" style="margin-bottom:12px;">{{ $entry }}</pre>
@empty
<p>无匹配记录</p>
@endforelse
<div style="margin-top:12px;">
@if ($hasNewer ?? false)
<a class="layui-btn layui-btn-sm layui-btn-primary" href="{{ route('admin.logs.show', array_merge($query, ['file' => $file, 'page' => ($page ?? 1) - 1])) }}">更新</a>
@endif
@if ($hasOlder ?? false)
<a class="layui-btn layui-btn-sm" href="{{ route('admin.logs.show', array_merge($query, ['file' => $file, 'page' => ($page ?? 1) + 1])) }}">更早</a>
@endif
</div>
</div>
</div>
@endsection