2026-02-11 17:28:36 +08:00
|
|
|
@extends('layouts.admin')
|
|
|
|
|
|
|
|
|
|
@section('title', '来源白名单管理')
|
|
|
|
|
|
2026-02-12 17:10:36 +08:00
|
|
|
@section('head')
|
|
|
|
|
@include('admin.partials.modern-index-head')
|
|
|
|
|
@endsection
|
|
|
|
|
|
2026-02-11 17:28:36 +08:00
|
|
|
@section('content')
|
2026-02-12 17:10:36 +08:00
|
|
|
<div class="card modern-index-toolbar mb-3">
|
|
|
|
|
<div class="card-body d-flex flex-column flex-lg-row gap-3 align-items-lg-center justify-content-between">
|
2026-02-11 17:28:36 +08:00
|
|
|
<form method="get" action="{{ route('admin.sources.index') }}" class="d-flex flex-column flex-md-row gap-2 w-100">
|
|
|
|
|
<input class="form-control" type="text" name="q" value="{{ $filters['q'] ?? '' }}" placeholder="搜索来源名称 / 域名">
|
|
|
|
|
<button class="btn btn-primary" type="submit"><i class="bi bi-search me-1"></i>搜索</button>
|
|
|
|
|
</form>
|
|
|
|
|
<a class="btn btn-success" href="{{ route('admin.sources.create') }}"><i class="bi bi-plus-circle me-1"></i>新建来源</a>
|
|
|
|
|
</div>
|
2026-02-12 17:10:36 +08:00
|
|
|
<div class="card-footer bg-transparent border-0 pt-0">
|
|
|
|
|
<div class="toolbar-meta">共 {{ number_format($items->total()) }} 条来源记录</div>
|
|
|
|
|
</div>
|
2026-02-11 17:28:36 +08:00
|
|
|
</div>
|
|
|
|
|
|
2026-02-12 17:10:36 +08:00
|
|
|
<div class="card modern-index-card">
|
2026-02-11 17:28:36 +08:00
|
|
|
<div class="table-responsive">
|
2026-02-12 17:10:36 +08:00
|
|
|
<table class="table table-vcenter card-table modern-index-table">
|
2026-02-11 17:28:36 +08:00
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>名称</th>
|
|
|
|
|
<th>域名</th>
|
|
|
|
|
<th>类型</th>
|
|
|
|
|
<th>信任等级</th>
|
|
|
|
|
<th>白名单</th>
|
|
|
|
|
<th class="text-end">操作</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@forelse($items as $item)
|
|
|
|
|
<tr>
|
2026-02-12 17:10:36 +08:00
|
|
|
<td class="modern-index-title">{{ $item->name }}</td>
|
|
|
|
|
<td><code>{{ $item->domain }}</code></td>
|
2026-02-11 17:28:36 +08:00
|
|
|
<td>{{ $item->type }}</td>
|
|
|
|
|
<td>{{ $item->trust_level?->value ?? '-' }}</td>
|
|
|
|
|
<td>
|
|
|
|
|
@if($item->is_whitelisted)
|
|
|
|
|
<span class="badge bg-green-lt text-green-fg">是</span>
|
|
|
|
|
@else
|
|
|
|
|
<span class="badge bg-gray-200 text-dark">否</span>
|
|
|
|
|
@endif
|
|
|
|
|
</td>
|
2026-02-12 17:10:36 +08:00
|
|
|
<td class="text-end">
|
|
|
|
|
<a class="btn btn-sm btn-outline-primary" href="{{ route('admin.sources.edit', $item) }}">编辑</a>
|
|
|
|
|
</td>
|
2026-02-11 17:28:36 +08:00
|
|
|
</tr>
|
|
|
|
|
@empty
|
2026-02-12 17:10:36 +08:00
|
|
|
<tr>
|
|
|
|
|
<td colspan="6" class="text-center text-muted py-5">暂无来源数据,先新增一条内容吧。</td>
|
|
|
|
|
</tr>
|
2026-02-11 17:28:36 +08:00
|
|
|
@endforelse
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-footer">{{ $items->links() }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
@endsection
|
2026-02-12 17:10:36 +08:00
|
|
|
|