mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Unseen feature indicator in admin sidebar (#28397)
This commit adds a blue dot next to the "What's New"
link in the admin sidebar if the user has not seen the
new features yet, as a followup to 3e5976f843
which removed the tab on the dashboard that had this same
functionality.
When the admin visits the "What's New" page they count
as having seen all the features straight away. This could
be something we want to change, but for now this keeps the
same functionality.
This commit is contained in:
@@ -77,7 +77,8 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
:can_view_raw_email,
|
||||
:use_glimmer_topic_list?,
|
||||
:login_method,
|
||||
:render_experimental_about_page
|
||||
:render_experimental_about_page,
|
||||
:has_unseen_features
|
||||
|
||||
delegate :user_stat, to: :object, private: true
|
||||
delegate :any_posts, :draft_count, :pending_posts_count, :read_faq?, to: :user_stat
|
||||
@@ -142,6 +143,14 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
object.staff?
|
||||
end
|
||||
|
||||
def has_unseen_features
|
||||
DiscourseUpdates.has_unseen_features?(object.id)
|
||||
end
|
||||
|
||||
def include_has_unseen_features?
|
||||
object.staff?
|
||||
end
|
||||
|
||||
def render_experimental_about_page
|
||||
object.in_any_groups?(SiteSetting.experimental_redesigned_about_page_groups_map)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user