mirror of
https://github.com/discourse/discourse.git
synced 2025-02-10 05:14:59 +00:00
This commit continues on work laid out by 6039b513fe
to redesign the /about page. In this commit, we add the site age and a section on the right hand side to show site activities/statistics such as topics, posts, sign-ups, likes etc.
49 lines
1.2 KiB
Ruby
49 lines
1.2 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Components
|
|
class AboutPageSiteActivity < PageObjects::Components::Base
|
|
attr_reader :container
|
|
|
|
def initialize(container)
|
|
@container = container
|
|
end
|
|
|
|
def topics
|
|
AboutPageSiteActivityItem.new(
|
|
container.find(".about__activities-item.topics"),
|
|
translation_key: "about.activities.topics",
|
|
)
|
|
end
|
|
|
|
def posts
|
|
AboutPageSiteActivityItem.new(
|
|
container.find(".about__activities-item.posts"),
|
|
translation_key: "about.activities.posts",
|
|
)
|
|
end
|
|
|
|
def active_users
|
|
AboutPageSiteActivityItem.new(
|
|
container.find(".about__activities-item.active-users"),
|
|
translation_key: "about.activities.active_users",
|
|
)
|
|
end
|
|
|
|
def sign_ups
|
|
AboutPageSiteActivityItem.new(
|
|
container.find(".about__activities-item.sign-ups"),
|
|
translation_key: "about.activities.sign_ups",
|
|
)
|
|
end
|
|
|
|
def likes
|
|
AboutPageSiteActivityItem.new(
|
|
container.find(".about__activities-item.likes"),
|
|
translation_key: "about.activities.likes",
|
|
)
|
|
end
|
|
end
|
|
end
|
|
end
|