init
This commit is contained in:
53
resources/views/admin/sources/index.blade.php
Normal file
53
resources/views/admin/sources/index.blade.php
Normal file
@@ -0,0 +1,53 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', '来源白名单管理')
|
||||
|
||||
@section('content')
|
||||
<div class="card mb-3">
|
||||
<div class="card-body d-flex flex-column flex-lg-row gap-2 align-items-lg-center justify-content-between">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-vcenter card-table">
|
||||
<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>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->domain }}</td>
|
||||
<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>
|
||||
<td class="text-end"><a class="btn btn-sm btn-outline-primary" href="{{ route('admin.sources.edit', $item) }}">编辑</a></td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="6" class="text-center text-muted py-4">暂无来源数据</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">{{ $items->links() }}</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user