mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-22 18:48:14 -05:00
feat: [用户前端]补全可选订阅类型
This commit is contained in:
parent
4353fe1bee
commit
6773c87d8e
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@
|
|||||||
/public/hot
|
/public/hot
|
||||||
/public/storage
|
/public/storage
|
||||||
/public/env.example.js
|
/public/env.example.js
|
||||||
|
*.user.ini
|
||||||
/storage/*.key
|
/storage/*.key
|
||||||
/vendor
|
/vendor
|
||||||
.env
|
.env
|
||||||
|
@ -17,6 +17,7 @@ class ClientController extends Controller
|
|||||||
// 节点类型筛选
|
// 节点类型筛选
|
||||||
$allowedTypes = ['vmess', 'vless', 'trojan', 'hysteria', 'hysteria2', 'shadowsocks'];
|
$allowedTypes = ['vmess', 'vless', 'trojan', 'hysteria', 'hysteria2', 'shadowsocks'];
|
||||||
$types = $request->input('types', "vmess|vless|trojan|hysteria|shadowsocks");
|
$types = $request->input('types', "vmess|vless|trojan|hysteria|shadowsocks");
|
||||||
|
if ($types === "all") $types = implode('|', $allowedTypes);
|
||||||
$typesArr = $types ? collect(explode('|', str_replace(['|','|',','], "|" , $types)))->reject(function($type) use ($allowedTypes){
|
$typesArr = $types ? collect(explode('|', str_replace(['|','|',','], "|" , $types)))->reject(function($type) use ($allowedTypes){
|
||||||
return !in_array($type, $allowedTypes);
|
return !in_array($type, $allowedTypes);
|
||||||
})->values()->all() : [];
|
})->values()->all() : [];
|
||||||
|
1202
public/theme/Xboard/assets/umi.js
vendored
1202
public/theme/Xboard/assets/umi.js
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user