feat: new channel

This commit is contained in:
hashbro
2026-08-15 03:12:09 +08:00
parent 7c0066562f
commit 74067e7b54
9 changed files with 285 additions and 46 deletions
+1 -10
View File
@@ -46,16 +46,7 @@ layui.use(['table', 'form', 'layer'], function () {
var table = layui.table, form = layui.form, layer = layui.layer, $ = layui.$;
var portal = @json($portal);
var token = @json(csrf_token());
var agents = @json(($agents ?? collect())->map(function ($a) {
$name = trim((string) $a->username);
$comment = trim((string) ($a->comment ?? ''));
return [
'id' => $a->id,
'username' => $name,
'label' => $comment !== '' ? $name.'/'.$comment : $name,
];
})->values());
var agents = @json($agentOptions ?? []);
var isAdmin = portal === 'admin';
var maxPerAgent = @json($maxPerAgent ?? 5);