parent
b3e7beb7c5
commit
029f2c4545
@ -1,12 +0,0 @@
|
||||
.panel
|
||||
.panel-header= t 'about.links'
|
||||
.panel-list
|
||||
%ul
|
||||
- if user_signed_in?
|
||||
%li= link_to t('about.get_started'), root_path
|
||||
- else
|
||||
- if instance.open_registrations
|
||||
%li= link_to t('about.get_started'), new_user_registration_path
|
||||
%li= link_to t('auth.login'), new_user_session_path
|
||||
%li= link_to t('about.terms'), terms_path
|
||||
%li= link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon'
|
@ -1,4 +0,0 @@
|
||||
.panel
|
||||
.panel-header= t 'about.version'
|
||||
.panel-body
|
||||
%strong= version.version_number
|
@ -1,8 +1,23 @@
|
||||
- content_for :page_title do
|
||||
= t('terms.title', instance: site_hostname)
|
||||
|
||||
.wrapper
|
||||
- if @instance_presenter.site_terms.present?
|
||||
= raw @instance_presenter.site_terms
|
||||
- else
|
||||
= t('terms.body_html')
|
||||
.landing-page
|
||||
.header-wrapper.compact
|
||||
.header
|
||||
.container.links
|
||||
.brand
|
||||
= link_to root_url do
|
||||
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
|
||||
|
||||
%ul.nav
|
||||
%li
|
||||
- if user_signed_in?
|
||||
= link_to t('settings.back'), root_url, class: 'webapp-btn'
|
||||
- else
|
||||
= link_to t('auth.login'), new_user_session_path, class: 'webapp-btn'
|
||||
%li= link_to t('about.about_this'), about_more_path
|
||||
%li= link_to t('about.other_instances'), 'https://joinmastodon.org/'
|
||||
|
||||
.extended-description
|
||||
.container
|
||||
= @instance_presenter.site_terms.html_safe.presence || t('terms.body_html')
|
||||
|
@ -1,38 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'about/_links.html.haml' do
|
||||
context 'when signed in' do
|
||||
before do
|
||||
allow(view).to receive(:user_signed_in?).and_return(true)
|
||||
end
|
||||
|
||||
it 'does not show sign in link' do
|
||||
render 'about/links', instance: InstancePresenter.new
|
||||
|
||||
expect(rendered).to have_content(I18n.t('about.get_started'))
|
||||
expect(rendered).not_to have_content(I18n.t('auth.login'))
|
||||
end
|
||||
end
|
||||
|
||||
context 'when signed out' do
|
||||
before do
|
||||
allow(view).to receive(:user_signed_in?).and_return(false)
|
||||
end
|
||||
|
||||
it 'shows get started link when registrations are allowed' do
|
||||
render 'about/links', instance: double(open_registrations: true)
|
||||
|
||||
expect(rendered).to have_content(I18n.t('about.get_started'))
|
||||
expect(rendered).to have_content(I18n.t('auth.login'))
|
||||
end
|
||||
|
||||
it 'hides get started link when registrations are closed' do
|
||||
render 'about/links', instance: double(open_registrations: false)
|
||||
|
||||
expect(rendered).not_to have_content(I18n.t('about.get_started'))
|
||||
expect(rendered).to have_content(I18n.t('auth.login'))
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in new issue