mirror of
https://github.com/kikobar/mastodon.git
synced 2024-12-23 22:34:13 +00:00
Adds version to about/more and API (#2181)
* Adds version. * Cleans up code. * Removes standalone endpoint and adds version to instance endpoint. * Addresses feedback from #2181.
This commit is contained in:
parent
25d2853db2
commit
a0ed88a99b
|
@ -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
|
||||
|
|
4
app/views/about/_version.html.haml
Normal file
4
app/views/about/_version.html.haml
Normal file
|
@ -0,0 +1,4 @@
|
|||
.panel
|
||||
.panel-header= t 'about.version'
|
||||
.panel-body
|
||||
%strong= version.version_number
|
|
@ -30,3 +30,4 @@
|
|||
.sidebar
|
||||
= render 'contact', contact: @instance_presenter
|
||||
= render 'links'
|
||||
= render 'version', version: @instance_presenter
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -9,6 +9,7 @@ Bundler.require(*Rails.groups)
|
|||
require_relative '../app/lib/exceptions'
|
||||
require_relative '../lib/paperclip/gif_transcoder'
|
||||
require_relative '../lib/paperclip/video_transcoder'
|
||||
require_relative '../lib/mastodon/version'
|
||||
|
||||
Dotenv::Railtie.load
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ en:
|
|||
terms: Terms
|
||||
user_count_after: users
|
||||
user_count_before: Home to
|
||||
version: Version
|
||||
accounts:
|
||||
follow: Follow
|
||||
followers: Followers
|
||||
|
|
5
lib/mastodon/version.rb
Normal file
5
lib/mastodon/version.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mastodon
|
||||
VERSION = '1.2.2'
|
||||
end
|
Loading…
Reference in a new issue