diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/presenters/instance_presenter.rb | 4 | ||||
-rw-r--r-- | app/views/about/_version.html.haml | 4 | ||||
-rw-r--r-- | app/views/about/more.html.haml | 1 | ||||
-rw-r--r-- | app/views/api/v1/instances/show.rabl | 1 |
4 files changed, 10 insertions, 0 deletions
diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb index 4188650d5..e583a38d0 100644 --- a/app/presenters/instance_presenter.rb +++ b/app/presenters/instance_presenter.rb @@ -25,4 +25,8 @@ class InstancePresenter def domain_count Rails.cache.fetch('distinct_domain_count') { Account.distinct.count(:domain) } end + + def version_number + Mastodon::VERSION + end end diff --git a/app/views/about/_version.html.haml b/app/views/about/_version.html.haml new file mode 100644 index 000000000..f8ebc4c6d --- /dev/null +++ b/app/views/about/_version.html.haml @@ -0,0 +1,4 @@ +.panel + .panel-header= t 'about.version' + .panel-body + %strong= version.version_number diff --git a/app/views/about/more.html.haml b/app/views/about/more.html.haml index 8f9cd2f6a..ab5b21850 100644 --- a/app/views/about/more.html.haml +++ b/app/views/about/more.html.haml @@ -30,3 +30,4 @@ .sidebar = render 'contact', contact: @instance_presenter = render 'links' + = render 'version', version: @instance_presenter diff --git a/app/views/api/v1/instances/show.rabl b/app/views/api/v1/instances/show.rabl index f5598fde3..e1d4700a0 100644 --- a/app/views/api/v1/instances/show.rabl +++ b/app/views/api/v1/instances/show.rabl @@ -4,3 +4,4 @@ node(:uri) { site_hostname } node(:title) { Setting.site_title } node(:description) { Setting.site_description } node(:email) { Setting.site_contact_email } +node(:version) { Mastodon::VERSION } |