Add card with who invited you to join when displaying rules on sign-up (#23475)
This commit is contained in:
parent
94329f28e1
commit
0766c9a631
5 changed files with 21 additions and 16 deletions
|
@ -3,11 +3,8 @@
|
||||||
display: block;
|
display: block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
|
overflow: hidden;
|
||||||
|
border-radius: 4px;
|
||||||
@media screen and (max-width: $no-gap-breakpoint) {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:active,
|
&:active,
|
||||||
|
@ -22,7 +19,6 @@
|
||||||
height: 130px;
|
height: 130px;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: darken($ui-base-color, 12%);
|
background: darken($ui-base-color, 12%);
|
||||||
border-radius: 4px 4px 0 0;
|
|
||||||
|
|
||||||
img {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -30,7 +26,6 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
border-radius: 4px 4px 0 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (width <= 600px) {
|
@media screen and (width <= 600px) {
|
||||||
|
@ -45,11 +40,6 @@
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: lighten($ui-base-color, 4%);
|
background: lighten($ui-base-color, 4%);
|
||||||
border-radius: 0 0 4px 4px;
|
|
||||||
|
|
||||||
@media screen and (max-width: $no-gap-breakpoint) {
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
|
|
|
@ -137,6 +137,10 @@ code {
|
||||||
color: $secondary-text-color;
|
color: $secondary-text-color;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
|
|
||||||
|
&.invited-by {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: $highlight-text-color;
|
color: $highlight-text-color;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
- account_url = local_assigns[:admin] ? admin_account_path(account.id) : ActivityPub::TagManager.instance.url_for(account)
|
- account_url = local_assigns[:admin] ? admin_account_path(account.id) : ActivityPub::TagManager.instance.url_for(account)
|
||||||
|
- compact ||= false
|
||||||
|
|
||||||
.card.h-card
|
.card.h-card
|
||||||
= link_to account_url, target: '_blank', rel: 'noopener noreferrer' do
|
= link_to account_url, target: '_blank', rel: 'noopener noreferrer' do
|
||||||
|
- unless compact
|
||||||
.card__img
|
.card__img
|
||||||
= image_tag account.header.url, alt: ''
|
= image_tag account.header.url, alt: ''
|
||||||
.card__bar
|
.card__bar
|
||||||
|
|
|
@ -7,6 +7,12 @@
|
||||||
.simple_form
|
.simple_form
|
||||||
= render 'auth/shared/progress', stage: 'rules'
|
= render 'auth/shared/progress', stage: 'rules'
|
||||||
|
|
||||||
|
- 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')
|
%h1.title= t('auth.rules.title')
|
||||||
%p.lead= t('auth.rules.preamble', domain: site_hostname)
|
%p.lead= t('auth.rules.preamble', domain: site_hostname)
|
||||||
|
|
||||||
|
|
|
@ -1031,8 +1031,11 @@ en:
|
||||||
rules:
|
rules:
|
||||||
accept: Accept
|
accept: Accept
|
||||||
back: Back
|
back: Back
|
||||||
|
invited_by: 'You can join %{domain} thanks to the invitation you have received from:'
|
||||||
preamble: These are set and enforced by the %{domain} moderators.
|
preamble: These are set and enforced by the %{domain} moderators.
|
||||||
|
preamble_invited: Before you proceed, please consider the ground rules set by the moderators of %{domain}.
|
||||||
title: Some ground rules.
|
title: Some ground rules.
|
||||||
|
title_invited: You've been invited.
|
||||||
security: Security
|
security: Security
|
||||||
set_new_password: Set new password
|
set_new_password: Set new password
|
||||||
setup:
|
setup:
|
||||||
|
|
Loading…
Reference in a new issue