about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-06-15 20:51:39 +0200
committerThibaut Girka <thib@sitedethib.com>2018-06-15 20:51:39 +0200
commitdb200226b805db324a8efdfb951d7725eac3f9da (patch)
treea7d8298fc65bbd81e2f843048240de6e4fceffcf /app/views
parentafceef74c2377192f100b9307068895ec0ec7d45 (diff)
parent0df91c7b1e05952ebbfc552915e995d55af0a403 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
	app/javascript/mastodon/initial_state.js
	db/schema.rb

Upstream added a new field to initial_state.
Not too sure about what happened with db/schema.rb though…
Diffstat (limited to 'app/views')
-rw-r--r--app/views/auth/registrations/new.html.haml5
-rw-r--r--app/views/authorize_follows/_card.html.haml14
-rw-r--r--app/views/invites/_form.html.haml3
3 files changed, 20 insertions, 2 deletions
diff --git a/app/views/auth/registrations/new.html.haml b/app/views/auth/registrations/new.html.haml
index 2d4c0f5ac..0fac8e10d 100644
--- a/app/views/auth/registrations/new.html.haml
+++ b/app/views/auth/registrations/new.html.haml
@@ -7,6 +7,11 @@
 = simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
   = render 'shared/error_messages', object: resource
 
+  - if @invite.present? && @invite.autofollow?
+    .fields-group{ style: 'margin-bottom: 30px' }
+      %p.hint{ style: 'text-align: center' }= t('invites.invited_by')
+      = render 'authorize_follows/card', account: @invite.user.account
+
   = f.simple_fields_for :account do |ff|
     .input-with-append
       = ff.input :username, autofocus: true, placeholder: t('simple_form.labels.defaults.username'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username'), :autocomplete => 'off' }
diff --git a/app/views/authorize_follows/_card.html.haml b/app/views/authorize_follows/_card.html.haml
index 9abcfd37e..edc03131f 100644
--- a/app/views/authorize_follows/_card.html.haml
+++ b/app/views/authorize_follows/_card.html.haml
@@ -1,4 +1,5 @@
 .account-card
+  .account-card__header{ style: "background-image: url(#{account.header.url(:original)})" }
   .detailed-status__display-name
     %div
       = image_tag account.avatar.url(:original), alt: '', width: 48, height: 48, class: 'avatar'
@@ -9,5 +10,14 @@
         %strong.emojify= display_name(account, custom_emojify: true)
         %span @#{account.acct}
 
-  - if account.note?
-    .account__header__content.emojify= Formatter.instance.simplified_format(account)
+    .counter
+      %span.counter-number= number_to_human account.statuses_count, strip_insignificant_zeros: true
+      %span.counter-label= t('accounts.posts')
+
+    .counter
+      %span.counter-number= number_to_human account.following_count, strip_insignificant_zeros: true
+      %span.counter-label= t('accounts.following')
+
+    .counter
+      %span.counter-number= number_to_human account.followers_count, strip_insignificant_zeros: true
+      %span.counter-label= t('accounts.followers')
diff --git a/app/views/invites/_form.html.haml b/app/views/invites/_form.html.haml
index 3f0871f47..42a107bb2 100644
--- a/app/views/invites/_form.html.haml
+++ b/app/views/invites/_form.html.haml
@@ -5,5 +5,8 @@
     = f.input :max_uses, wrapper: :with_label, collection: [1, 5, 10, 25, 50, 100], label_method: lambda { |num| I18n.t('invites.max_uses', count: num) }, prompt: I18n.t('invites.max_uses_prompt')
     = f.input :expires_in, wrapper: :with_label, collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i), label_method: lambda { |i| I18n.t("invites.expires_in.#{i}") }, prompt: I18n.t('invites.expires_in_prompt')
 
+  .fields-group
+    = f.input :autofollow, wrapper: :with_label
+
   .actions
     = f.button :button, t('invites.generate'), type: :submit