1
0
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:
Toby Zerner
2016-03-23 22:17:42 +10:30
parent cb428f1e4a
commit a5c8ef0566
4 changed files with 78 additions and 22 deletions

View File

@@ -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(),

View File

@@ -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
];
}