Merge branch 'gs-master' into glitch-theme
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
- processed_bio = FrontmatterHandler.instance.process_bio Formatter.instance.simplified_format account
|
||||
.card.h-card.p-author{ style: "background-image: url(#{account.header.url(:original)})" }
|
||||
.card__illustration
|
||||
- unless account.memorial?
|
||||
- unless account.memorial? || account.moved?
|
||||
- if user_signed_in? && current_account.id != account.id && !current_account.requested?(account)
|
||||
.controls
|
||||
- if current_account.following?(account)
|
||||
@@ -27,15 +27,15 @@
|
||||
%small
|
||||
%span @#{account.local_username_and_domain}
|
||||
= fa_icon('lock') if account.locked?
|
||||
|
||||
- if account.user_admin?
|
||||
.roles
|
||||
.account-role.admin
|
||||
= t 'accounts.roles.admin'
|
||||
- elsif account.user_moderator?
|
||||
.roles
|
||||
.account-role.moderator
|
||||
= t 'accounts.roles.moderator'
|
||||
- if Setting.show_staff_badge
|
||||
- if account.user_admin?
|
||||
.roles
|
||||
.account-role.admin
|
||||
= t 'accounts.roles.admin'
|
||||
- elsif account.user_moderator?
|
||||
.roles
|
||||
.account-role.moderator
|
||||
= t 'accounts.roles.moderator'
|
||||
.bio
|
||||
.account__header__content.p-note.emojify!=processed_bio[:text]
|
||||
- if processed_bio[:metadata].length > 0
|
||||
|
17
app/views/accounts/_moved_strip.html.haml
Normal file
17
app/views/accounts/_moved_strip.html.haml
Normal file
@@ -0,0 +1,17 @@
|
||||
- moved_to_account = account.moved_to_account
|
||||
|
||||
.moved-strip
|
||||
.moved-strip__message
|
||||
= fa_icon 'suitcase'
|
||||
= t('accounts.moved_html', name: content_tag(:strong, display_name(account), class: :emojify), new_profile_link: link_to(content_tag(:strong, safe_join(['@', content_tag(:span, moved_to_account.acct)])), TagManager.instance.url_for(moved_to_account), class: 'mention'))
|
||||
|
||||
.moved-strip__card
|
||||
= link_to TagManager.instance.url_for(moved_to_account), class: 'detailed-status__display-name p-author h-card', target: '_blank', rel: 'noopener' do
|
||||
.detailed-status__display-avatar
|
||||
.account__avatar-overlay
|
||||
.account__avatar-overlay-base{ style: "background-image: url('#{moved_to_account.avatar.url(:original)}')" }
|
||||
.account__avatar-overlay-overlay{ style: "background-image: url('#{account.avatar.url(:original)}')" }
|
||||
|
||||
%span.display-name
|
||||
%strong.emojify= display_name(moved_to_account)
|
||||
%span @#{moved_to_account.acct}
|
@@ -14,6 +14,8 @@
|
||||
|
||||
- if @account.memorial?
|
||||
.memoriam-strip= t('in_memoriam_html')
|
||||
- elsif @account.moved?
|
||||
= render partial: 'moved_strip', locals: { account: @account }
|
||||
- elsif show_landing_strip?
|
||||
= render partial: 'shared/landing_strip', locals: { account: @account }
|
||||
|
||||
|
15
app/views/admin/action_logs/_action_log.html.haml
Normal file
15
app/views/admin/action_logs/_action_log.html.haml
Normal file
@@ -0,0 +1,15 @@
|
||||
%li.log-entry
|
||||
.log-entry__header
|
||||
.log-entry__avatar
|
||||
= image_tag action_log.account.avatar.url(:original), alt: '', width: 40, height: 40, class: 'avatar'
|
||||
.log-entry__content
|
||||
.log-entry__title
|
||||
= t("admin.action_logs.actions.#{action_log.action}_#{action_log.target_type.underscore}", name: content_tag(:span, action_log.account.username, class: 'username'), target: content_tag(:span, log_target(action_log), class: 'target')).html_safe
|
||||
.log-entry__timestamp
|
||||
%time= l action_log.created_at
|
||||
.spacer
|
||||
.log-entry__icon
|
||||
= fa_icon icon_for_log(action_log)
|
||||
.log-entry__icon__overlay{ class: class_for_log_icon(action_log) }
|
||||
.log-entry__extras
|
||||
= log_extra_attributes relevant_log_changes(action_log)
|
7
app/views/admin/action_logs/index.html.haml
Normal file
7
app/views/admin/action_logs/index.html.haml
Normal file
@@ -0,0 +1,7 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.action_logs.title')
|
||||
|
||||
%ul
|
||||
= render @action_logs
|
||||
|
||||
= paginate @action_logs
|
21
app/views/admin/invites/_invite.html.haml
Normal file
21
app/views/admin/invites/_invite.html.haml
Normal file
@@ -0,0 +1,21 @@
|
||||
%tr
|
||||
%td
|
||||
.name-tag
|
||||
= image_tag invite.user.account.avatar.url(:original), alt: '', width: 16, height: 16, class: 'avatar'
|
||||
%span.username= invite.user.account.username
|
||||
%td
|
||||
= invite.uses
|
||||
= " / #{invite.max_uses}" unless invite.max_uses.nil?
|
||||
%td
|
||||
- if invite.expired?
|
||||
= t('invites.expired')
|
||||
- else
|
||||
- if invite.expires_at.nil?
|
||||
∞
|
||||
- else
|
||||
%time.formatted{ datetime: invite.expires_at.iso8601, title: l(invite.expires_at) }
|
||||
= l invite.expires_at
|
||||
%td= table_link_to 'link', public_invite_url(invite_code: invite.code), public_invite_url(invite_code: invite.code)
|
||||
%td
|
||||
- if !invite.expired? && policy(invite).destroy?
|
||||
= table_link_to 'times', t('invites.delete'), admin_invite_path(invite), method: :delete
|
30
app/views/admin/invites/index.html.haml
Normal file
30
app/views/admin/invites/index.html.haml
Normal file
@@ -0,0 +1,30 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.invites.title')
|
||||
|
||||
.filters
|
||||
.filter-subset
|
||||
%strong= t('admin.invites.filter.title')
|
||||
%ul
|
||||
%li= filter_link_to t('admin.invites.filter.all'), available: nil, expired: nil
|
||||
%li= filter_link_to t('admin.invites.filter.available'), available: 1, expired: nil
|
||||
%li= filter_link_to t('admin.invites.filter.expired'), available: nil, expired: 1
|
||||
|
||||
- if policy(:invite).create?
|
||||
%p= t('invites.prompt')
|
||||
|
||||
= render 'invites/form'
|
||||
|
||||
%hr/
|
||||
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th
|
||||
%th= t('invites.table.uses')
|
||||
%th= t('invites.table.expires_at')
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
= render @invites
|
||||
|
||||
= paginate @invites
|
@@ -18,6 +18,9 @@
|
||||
.fields-group
|
||||
= f.input :timeline_preview, as: :boolean, wrapper: :with_label, label: t('admin.settings.timeline_preview.title'), hint: t('admin.settings.timeline_preview.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :show_staff_badge, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_staff_badge.title'), hint: t('admin.settings.show_staff_badge.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :open_registrations, as: :boolean, wrapper: :with_label, label: t('admin.settings.registrations.open.title'), hint: t('admin.settings.registrations.open.desc_html')
|
||||
|
||||
@@ -29,6 +32,11 @@
|
||||
|
||||
%hr/
|
||||
|
||||
.fields-group
|
||||
= f.input :min_invite_role, wrapper: :with_label, collection: %i(disabled user moderator admin), label: t('admin.settings.registrations.min_invite_role.title'), label_method: lambda { |role| role == :disabled ? t('admin.settings.registrations.min_invite_role.disabled') : t("admin.accounts.roles.#{role}") }, as: :radio_buttons, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
|
||||
%hr/
|
||||
|
||||
.fields-group
|
||||
= f.input :site_extended_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description_extended.title'), hint: t('admin.settings.site_description_extended.desc_html'), input_html: { rows: 8 }
|
||||
= f.input :site_terms, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_terms.title'), hint: t('admin.settings.site_terms.desc_html'), input_html: { rows: 8 }
|
||||
|
@@ -16,6 +16,7 @@
|
||||
= f.input :email, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off' }
|
||||
= f.input :password, placeholder: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }
|
||||
= f.input :password_confirmation, placeholder: t('simple_form.labels.defaults.confirm_password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_password'), :autocomplete => 'off' }
|
||||
= f.input :invite_code, as: :hidden
|
||||
|
||||
.actions
|
||||
= f.button :button, t('auth.register'), type: :submit
|
||||
|
9
app/views/invites/_form.html.haml
Normal file
9
app/views/invites/_form.html.haml
Normal file
@@ -0,0 +1,9 @@
|
||||
= simple_form_for(@invite, url: controller.is_a?(Admin::InvitesController) ? admin_invites_path : invites_path) do |f|
|
||||
= render 'shared/error_messages', object: @invite
|
||||
|
||||
.fields-group
|
||||
= 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].map(&:to_i), label_method: lambda { |i| I18n.t("invites.expires_in.#{i}") }, prompt: I18n.t('invites.expires_in_prompt')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('invites.generate'), type: :submit
|
17
app/views/invites/_invite.html.haml
Normal file
17
app/views/invites/_invite.html.haml
Normal file
@@ -0,0 +1,17 @@
|
||||
%tr
|
||||
%td
|
||||
= invite.uses
|
||||
= " / #{invite.max_uses}" unless invite.max_uses.nil?
|
||||
%td
|
||||
- if invite.expired?
|
||||
= t('invites.expired')
|
||||
- else
|
||||
- if invite.expires_at.nil?
|
||||
∞
|
||||
- else
|
||||
%time.formatted{ datetime: invite.expires_at.iso8601, title: l(invite.expires_at) }
|
||||
= l invite.expires_at
|
||||
%td= table_link_to 'link', public_invite_url(invite_code: invite.code), public_invite_url(invite_code: invite.code)
|
||||
%td
|
||||
- if invite.expired? && policy(invite).destroy?
|
||||
= table_link_to 'times', t('invites.delete'), invite_path(invite), method: :delete
|
19
app/views/invites/index.html.haml
Normal file
19
app/views/invites/index.html.haml
Normal file
@@ -0,0 +1,19 @@
|
||||
- content_for :page_title do
|
||||
= t('invites.title')
|
||||
|
||||
- if policy(:invite).create?
|
||||
%p= t('invites.prompt')
|
||||
|
||||
= render 'form'
|
||||
|
||||
%hr/
|
||||
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('invites.table.uses')
|
||||
%th= t('invites.table.expires_at')
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
= render @invites
|
17
app/views/settings/migrations/show.html.haml
Normal file
17
app/views/settings/migrations/show.html.haml
Normal file
@@ -0,0 +1,17 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.migrate')
|
||||
|
||||
= simple_form_for @migration, as: :migration, url: settings_migration_path, html: { method: :put } do |f|
|
||||
- if @migration.account
|
||||
%p.hint= t('migrations.currently_redirecting')
|
||||
|
||||
.fields-group
|
||||
= render partial: 'authorize_follows/card', locals: { account: @migration.account }
|
||||
|
||||
= render 'shared/error_messages', object: @migration
|
||||
|
||||
.fields-group
|
||||
= f.input :acct, placeholder: t('migrations.acct')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('migrations.proceed'), type: :submit, class: 'negative'
|
@@ -21,3 +21,8 @@
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
||||
%hr/
|
||||
|
||||
%h6= t('auth.migrate_account')
|
||||
%p.muted-hint= t('auth.migrate_account_html', path: settings_migration_path)
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
= opengraph 'og:site_name', site_title
|
||||
= opengraph 'og:type', 'article'
|
||||
= opengraph 'og:title', "#{@account.username} on #{site_hostname}"
|
||||
= opengraph 'og:title', "#{@account.display_name.presence || @account.username} on #{site_hostname}"
|
||||
= opengraph 'og:url', account_stream_entry_url(@account, @stream_entry)
|
||||
|
||||
= render 'stream_entries/og_description', activity: @stream_entry.activity
|
||||
|
Reference in New Issue
Block a user