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 ImmutablePureComponent from 'react-immutable-pure-component';
import { length } from 'stringz';
import { isMobile } from '../../../is_mobile';
const messages = defineMessages({
placeholder: { id: 'compose_form.placeholder', defaultMessage: 'What is on your mind?' },

View File

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

View File

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