Add card with who invited you to join when displaying rules on sign-up (#23475)

This commit is contained in:
Claire
2023-06-02 18:35:37 +02:00
committed by GitHub
parent 94329f28e1
commit 0766c9a631
5 changed files with 21 additions and 16 deletions

View File

@ -1,9 +1,11 @@
- account_url = local_assigns[:admin] ? admin_account_path(account.id) : ActivityPub::TagManager.instance.url_for(account)
- compact ||= false
.card.h-card
= link_to account_url, target: '_blank', rel: 'noopener noreferrer' do
.card__img
= image_tag account.header.url, alt: ''
- unless compact
.card__img
= image_tag account.header.url, alt: ''
.card__bar
.avatar
= image_tag account.avatar.url, alt: '', width: 48, height: 48, class: 'u-photo'

View File

@ -7,8 +7,14 @@
.simple_form
= render 'auth/shared/progress', stage: 'rules'
%h1.title= t('auth.rules.title')
%p.lead= t('auth.rules.preamble', domain: site_hostname)
- if @invite.present? && @invite.autofollow?
%h1.title= t('auth.rules.title_invited')
%p.lead.invited-by= t('auth.rules.invited_by', domain: site_hostname)
= render 'application/card', account: @invite.user.account, compact: true
%p.lead= t('auth.rules.preamble_invited', domain: site_hostname)
- else
%h1.title= t('auth.rules.title')
%p.lead= t('auth.rules.preamble', domain: site_hostname)
%ol.rules-list
- @rules.each do |rule|