闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
869 B

  1. # frozen_string_literal: true
  2. class AboutController < ApplicationController
  3. before_action :set_body_classes
  4. def index
  5. @description = Setting.site_description
  6. @user = User.new
  7. @user.build_account
  8. end
  9. def more
  10. @description = Setting.site_description
  11. @extended_description = Setting.site_extended_description
  12. @contact_account = Account.find_local(Setting.site_contact_username)
  13. @contact_email = Setting.site_contact_email
  14. @user_count = Rails.cache.fetch('user_count') { User.count }
  15. @status_count = Rails.cache.fetch('local_status_count') { Status.local.count }
  16. @domain_count = Rails.cache.fetch('distinct_domain_count') { Account.distinct.count(:domain) }
  17. end
  18. def terms; end
  19. private
  20. def set_body_classes
  21. @body_classes = 'about-body'
  22. end
  23. end