Fix JS errors and add back commit hash

master
Ondřej Hruška 7 years ago
parent 7e5691804d
commit b7cf758fbe
  1. 1
      app/javascript/mastodon/features/compose/components/compose_form.js
  2. 4
      app/presenters/instance_presenter.rb
  3. 8
      app/views/about/more.html.haml
  4. 8
      app/views/about/show.html.haml

@ -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?' },

@ -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

@ -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}"

@ -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})"

Loading…
Cancel
Save