mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 23:01:29 +00:00
Update the theme
This commit is contained in:
@@ -176,7 +176,7 @@ class ProfileController extends BasePageController
|
||||
// Update color scheme
|
||||
if ($request->has('color_scheme')) {
|
||||
$schemeValue = $request->input('color_scheme');
|
||||
if (in_array($schemeValue, ['blue', 'emerald', 'violet'], true)) {
|
||||
if (in_array($schemeValue, ['blue', 'indigo', 'cyan', 'teal', 'emerald', 'violet', 'pink', 'rose', 'red', 'orange', 'amber'], true)) {
|
||||
User::where('id', $userid)->update(['color_scheme' => $schemeValue]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class UpdateProfileRequest extends FormRequest
|
||||
'email' => ['nullable', 'string', 'email', 'max:255', 'unique:users,email,'.$userId, new ValidEmailDomain],
|
||||
'password' => ['nullable', 'string', 'min:8', 'confirmed', 'regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/'],
|
||||
'theme_preference' => ['sometimes', 'in:light,dark,system'],
|
||||
'color_scheme' => ['sometimes', 'in:blue,emerald,violet'],
|
||||
'color_scheme' => ['sometimes', 'in:blue,indigo,cyan,teal,emerald,violet,pink,rose,red,orange,amber'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class UpdateThemeRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'theme_preference' => ['sometimes', 'in:light,dark,system'],
|
||||
'color_scheme' => ['sometimes', 'in:blue,emerald,violet'],
|
||||
'color_scheme' => ['sometimes', 'in:blue,indigo,cyan,teal,emerald,violet,pink,rose,red,orange,amber'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user