feat: support theme update and various improvements

- Add support for updating themes if a newer version is uploaded
- Hide config button for plugins without configuration items
- Auto refresh theme cache after panel update
- Fix issue where user used traffic cannot be set as a decimal
- Fix subscription issue for shadowrocket in v2board theme
This commit is contained in:
xboard committed 2025-07-15 01:26:14 +08:00
1 parent 342dc9df5a
commit 6ac0cc7ce5
7 files changed
+42 -30

No files matched your search

@@ -206,9 +206,10 @@ class UserController extends Controller
if (!$user) {
return $this->fail([400202, '用户不存在']);
}
// 检查邮箱是否被使用
if (User::where('email', $params['email'])->first() && $user->email !== $params['email']) {
return $this->fail([400201, '邮箱已被使用']);
if (isset($params['email'])) {
if (User::where('email', $params['email'])->first() && $user->email !== $params['email']) {
return $this->fail([400201, '邮箱已被使用']);
}
}
// 处理密码
if (isset($params['password'])) {
@@ -223,7 +224,6 @@ class UserController extends Controller
if (!$plan) {
return $this->fail([400202, '订阅计划不存在']);
}
// return json_encode($plan);
$params['group_id'] = $plan->group_id;
}
// 处理邀请用户