FEATURE: Show an educational message in the quick access menu for personal messages when there are none (#12564)

If the user has not been sent any messages, show a message in the quick access menu with an educational message. If the user can send private messages, also show a link to open the "new message" composer:

This also adds a general improvement to the quick-access-panel, to be able to show an `emptyStateWidget` instead of just a message if there is nothing to show in the panel, as well as initial general styles for empty state.
This commit is contained in:
Martin Brennan
2021-04-01 10:22:40 +10:00
committed by GitHub
parent 7cf42cd830
commit 28d67b4583
8 changed files with 86 additions and 3 deletions

View File

@ -19,6 +19,7 @@ class CurrentUserSerializer < BasicUserSerializer
:dynamic_favicon,
:trust_level,
:can_send_private_email_messages,
:can_send_private_messages,
:can_edit,
:can_invite_to_forum,
:no_password,
@ -126,6 +127,10 @@ class CurrentUserSerializer < BasicUserSerializer
scope.can_send_private_messages_to_email?
end
def can_send_private_messages
scope.can_send_private_message?(Discourse.system_user)
end
def can_edit
true
end