mirror of
https://github.com/flarum/core.git
synced 2025-08-24 09:03:05 +02:00
Tweak user email confirmation alert
- Make sure is_activated is serialized to a bool (otherwise "0" will evaluate to true) - Remove "error" class from message so it's more friendly - Make the alert more prominent by mounting it into a new div at the top of the page - Add loading UX to the resend button
This commit is contained in:
@@ -20,7 +20,7 @@ class CurrentUserSerializer extends UserSerializer
|
||||
$attributes = parent::getDefaultAttributes($user);
|
||||
|
||||
$attributes += [
|
||||
'isActivated' => $user->is_activated,
|
||||
'isActivated' => (bool) $user->is_activated,
|
||||
'email' => $user->email,
|
||||
'readTime' => $this->formatDate($user->read_time),
|
||||
'unreadNotificationsCount' => (int) $user->getUnreadNotificationsCount(),
|
||||
|
@@ -55,7 +55,7 @@ class UserSerializer extends UserBasicSerializer
|
||||
|
||||
if ($canEdit || $this->actor->id === $user->id) {
|
||||
$attributes += [
|
||||
'isActivated' => $user->is_activated,
|
||||
'isActivated' => (bool) $user->is_activated,
|
||||
'email' => $user->email
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user