1
0

Fix JS errors and add back commit hash

This commit is contained in:
Ondřej Hruška 2017-07-25 21:54:12 +02:00
parent 7e5691804d
commit b7cf758fbe
4 changed files with 14 additions and 7 deletions

View File

@ -19,7 +19,6 @@ import WarningContainer from '../containers/warning_container';
import { isMobile } from '../../../is_mobile'; import { isMobile } from '../../../is_mobile';
import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePureComponent from 'react-immutable-pure-component';
import { length } from 'stringz'; import { length } from 'stringz';
import { isMobile } from '../../../is_mobile';
const messages = defineMessages({ const messages = defineMessages({
placeholder: { id: 'compose_form.placeholder', defaultMessage: 'What is on your mind?' }, placeholder: { id: 'compose_form.placeholder', defaultMessage: 'What is on your mind?' },

View File

@ -35,9 +35,9 @@ class InstancePresenter
def commit_hash def commit_hash
current_release_file = Pathname.new('CURRENT_RELEASE').expand_path current_release_file = Pathname.new('CURRENT_RELEASE').expand_path
if current_release_file.file? if current_release_file.file?
IO.read(current_release_file) IO.read(current_release_file).strip!
else else
"" ''
end end
end end
end end

View File

@ -60,5 +60,9 @@
.footer-links .footer-links
.container .container
%p %p
= link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon' = link_to t('about.source_code'), 'https://github.com/glitch-soc/mastodon'
= " (#{@instance_presenter.version_number})" - if @instance_presenter.commit_hash == ""
%strong= @instance_presenter.version_number
- else
%strong= "#{@instance_presenter.version_number}, "
%strong= "#{@instance_presenter.commit_hash}"

View File

@ -73,5 +73,9 @@
.footer-links .footer-links
.container .container
%p %p
= link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon' = link_to t('about.source_code'), 'https://github.com/glitch-soc/mastodon'
= " (#{@instance_presenter.version_number})" - if @instance_presenter.commit_hash == ""
%strong= " (#{@instance_presenter.version_number})"
- else
%strong= " (#{@instance_presenter.version_number}, "
%strong= " #{@instance_presenter.commit_hash})"