Merge tag 'v3.0.0' into hometown-dev
This commit is contained in:
12
app/views/about/_domain_blocks.html.haml
Normal file
12
app/views/about/_domain_blocks.html.haml
Normal file
@ -0,0 +1,12 @@
|
||||
%table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('about.unavailable_content_description.domain')
|
||||
%th= t('about.unavailable_content_description.reason')
|
||||
%tbody
|
||||
- domain_blocks.each do |domain_block|
|
||||
%tr
|
||||
%td.nowrap
|
||||
%span{ title: domain_block.domain }= domain_block.domain
|
||||
%td
|
||||
= domain_block.public_comment if display_blocks_rationale?
|
@ -1,4 +1,4 @@
|
||||
= simple_form_for(new_user, url: user_session_path) do |f|
|
||||
= simple_form_for(new_user, url: user_session_path, namespace: 'login') do |f|
|
||||
.fields-group
|
||||
- if use_seamless_external_login?
|
||||
= f.input :email, placeholder: t('simple_form.labels.defaults.username_or_email'), input_html: { 'aria-label' => t('simple_form.labels.defaults.username_or_email') }, hint: false
|
||||
|
@ -1,4 +1,4 @@
|
||||
= simple_form_for(new_user, url: user_registration_path) do |f|
|
||||
= simple_form_for(new_user, url: user_registration_path, namespace: 'registration') do |f|
|
||||
.simple_form__overlay-area
|
||||
%p.lead= t('about.federation_hint_html', instance: content_tag(:strong, site_title))
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
= javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
|
||||
= render partial: 'shared/og'
|
||||
|
||||
.grid-3
|
||||
.grid-4
|
||||
.column-0
|
||||
.public-account-header.public-account-header--no-bar
|
||||
.public-account-header__image
|
||||
@ -40,20 +40,53 @@
|
||||
= svg_logo
|
||||
|
||||
.column-2
|
||||
.landing-page__information.contact-widget
|
||||
%p
|
||||
%strong= t 'about.administered_by'
|
||||
.contact-widget
|
||||
%h4= t 'about.administered_by'
|
||||
|
||||
= account_link_to(@instance_presenter.contact_account)
|
||||
|
||||
- if @instance_presenter.site_contact_email.present?
|
||||
%p.contact-widget__mail
|
||||
%strong
|
||||
= succeed ':' do
|
||||
= t 'about.contact'
|
||||
%br/
|
||||
= mail_to @instance_presenter.site_contact_email, nil, title: @instance_presenter.site_contact_email
|
||||
%h4
|
||||
= succeed ':' do
|
||||
= t 'about.contact'
|
||||
|
||||
= mail_to @instance_presenter.site_contact_email, nil, title: @instance_presenter.site_contact_email
|
||||
|
||||
.column-3
|
||||
.box-widget
|
||||
.rich-formatting= @instance_presenter.site_extended_description.html_safe.presence || t('about.extended_description_html')
|
||||
= render 'application/flashes'
|
||||
|
||||
- if @contents.blank? && (!display_blocks? || @blocks&.empty?)
|
||||
= nothing_here
|
||||
- else
|
||||
.box-widget
|
||||
.rich-formatting
|
||||
= @contents.html_safe
|
||||
|
||||
- if display_blocks? && !@blocks.empty?
|
||||
%h2#unavailable-content= t('about.unavailable_content')
|
||||
|
||||
%p= t('about.unavailable_content_html')
|
||||
|
||||
- if (blocks = @blocks.select(&:reject_media?)) && !blocks.empty?
|
||||
%p= t('about.unavailable_content_description.rejecting_media')
|
||||
= render partial: 'domain_blocks', locals: { domain_blocks: blocks }
|
||||
- if (blocks = @blocks.select(&:silence?)) && !blocks.empty?
|
||||
%p= t('about.unavailable_content_description.silenced')
|
||||
= render partial: 'domain_blocks', locals: { domain_blocks: blocks }
|
||||
- if (blocks = @blocks.select(&:suspend?)) && !blocks.empty?
|
||||
%p= t('about.unavailable_content_description.suspended')
|
||||
= render partial: 'domain_blocks', locals: { domain_blocks: blocks }
|
||||
|
||||
.column-4
|
||||
%ul.table-of-contents
|
||||
- @table_of_contents.each do |item|
|
||||
%li
|
||||
= link_to item.title, "##{item.anchor}"
|
||||
|
||||
- unless item.children.empty?
|
||||
%ul
|
||||
- item.children.each do |sub_item|
|
||||
%li= link_to sub_item.title, "##{sub_item.anchor}"
|
||||
|
||||
- if display_blocks? && !@blocks.empty?
|
||||
%li= link_to t('about.unavailable_content'), '#unavailable-content'
|
||||
|
@ -3,10 +3,10 @@
|
||||
.moved-account-widget
|
||||
.moved-account-widget__message
|
||||
= fa_icon 'suitcase'
|
||||
= t('accounts.moved_html', name: content_tag(:bdi, content_tag(:strong, display_name(account, custom_emojify: true), 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'))
|
||||
= t('accounts.moved_html', name: content_tag(:bdi, content_tag(:strong, display_name(account, custom_emojify: true), class: :emojify)), new_profile_link: link_to(content_tag(:strong, safe_join(['@', content_tag(:span, moved_to_account.acct)])), ActivityPub::TagManager.instance.url_for(moved_to_account), class: 'mention'))
|
||||
|
||||
.moved-account-widget__card
|
||||
= link_to TagManager.instance.url_for(moved_to_account), class: 'detailed-status__display-name p-author h-card', target: '_blank', rel: 'me noopener' do
|
||||
= link_to ActivityPub::TagManager.instance.url_for(moved_to_account), class: 'detailed-status__display-name p-author h-card', target: '_blank', rel: 'me noopener' do
|
||||
.detailed-status__display-avatar
|
||||
.account__avatar-overlay
|
||||
.account__avatar-overlay-base{ style: "background-image: url('#{moved_to_account.avatar.url(:original)}')" }
|
||||
|
@ -7,9 +7,7 @@
|
||||
- if @account.user&.setting_noindex
|
||||
%meta{ name: 'robots', content: 'noindex, noarchive' }/
|
||||
|
||||
%link{ rel: 'salmon', href: api_salmon_url(@account.id) }/
|
||||
%link{ rel: 'alternate', type: 'application/atom+xml', href: account_url(@account, format: 'atom') }/
|
||||
%link{ rel: 'alternate', type: 'application/rss+xml', href: account_url(@account, format: 'rss') }/
|
||||
%link{ rel: 'alternate', type: 'application/rss+xml', href: @rss_url }/
|
||||
%link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(@account) }/
|
||||
|
||||
- if @older_url
|
||||
@ -40,12 +38,12 @@
|
||||
- else
|
||||
.activity-stream.activity-stream--under-tabs
|
||||
- if params[:page].to_i.zero?
|
||||
= render partial: 'stream_entries/status', collection: @pinned_statuses, as: :status, locals: { pinned: true }
|
||||
= render partial: 'statuses/status', collection: @pinned_statuses, as: :status, locals: { pinned: true }
|
||||
|
||||
- if @newer_url
|
||||
.entry= link_to_more @newer_url
|
||||
|
||||
= render partial: 'stream_entries/status', collection: @statuses, as: :status
|
||||
= render partial: 'statuses/status', collection: @statuses, as: :status
|
||||
|
||||
- if @older_url
|
||||
.entry= link_to_more @older_url
|
||||
@ -58,24 +56,33 @@
|
||||
|
||||
= render 'bio', account: @account
|
||||
|
||||
- unless @endorsed_accounts.empty?
|
||||
- if @endorsed_accounts.empty? && @account.id == current_account&.id
|
||||
.placeholder-widget= t('accounts.endorsements_hint')
|
||||
- elsif !@endorsed_accounts.empty?
|
||||
.endorsements-widget
|
||||
%h4= t 'accounts.choices_html', name: content_tag(:bdi, display_name(@account, custom_emojify: true))
|
||||
|
||||
- @endorsed_accounts.each do |account|
|
||||
= account_link_to account
|
||||
|
||||
- @account.featured_tags.order(statuses_count: :desc).each do |featured_tag|
|
||||
.directory__tag{ class: params[:tag] == featured_tag.name ? 'active' : nil }
|
||||
= link_to short_account_tag_path(@account, featured_tag.tag) do
|
||||
%h4
|
||||
= fa_icon 'hashtag'
|
||||
= featured_tag.name
|
||||
%small
|
||||
- if featured_tag.last_status_at.nil?
|
||||
= t('accounts.nothing_here')
|
||||
- else
|
||||
%time.formatted{ datetime: featured_tag.last_status_at.iso8601, title: l(featured_tag.last_status_at) }= l featured_tag.last_status_at
|
||||
.trends__item__current= number_to_human featured_tag.statuses_count, strip_insignificant_zeros: true
|
||||
- if @featured_hashtags.empty? && @account.id == current_account&.id
|
||||
.placeholder-widget
|
||||
= t('accounts.featured_tags_hint')
|
||||
= link_to settings_featured_tags_path do
|
||||
= t('featured_tags.add_new')
|
||||
= fa_icon 'chevron-right fw'
|
||||
- else
|
||||
- @featured_hashtags.each do |featured_tag|
|
||||
.directory__tag{ class: params[:tag] == featured_tag.name ? 'active' : nil }
|
||||
= link_to short_account_tag_path(@account, featured_tag.tag) do
|
||||
%h4
|
||||
= fa_icon 'hashtag'
|
||||
= featured_tag.name
|
||||
%small
|
||||
- if featured_tag.last_status_at.nil?
|
||||
= t('accounts.nothing_here')
|
||||
- else
|
||||
%time.formatted{ datetime: featured_tag.last_status_at.iso8601, title: l(featured_tag.last_status_at) }= l featured_tag.last_status_at
|
||||
.trends__item__current= number_to_human featured_tag.statuses_count, strip_insignificant_zeros: true
|
||||
|
||||
= render 'application/sidebar'
|
||||
|
@ -13,6 +13,10 @@
|
||||
.fields-group
|
||||
= f.input :send_email_notification, as: :boolean, wrapper: :with_label
|
||||
|
||||
- if params[:report_id].present?
|
||||
.fields-group
|
||||
= f.input :include_statuses, as: :boolean, wrapper: :with_label
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
- unless @warning_presets.empty?
|
||||
|
@ -19,4 +19,4 @@
|
||||
= table_link_to 'times', t('admin.accounts.reject'), reject_admin_account_path(account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:reject, account.user)
|
||||
- else
|
||||
= table_link_to 'circle', t('admin.accounts.web'), web_path("accounts/#{account.id}")
|
||||
= table_link_to 'globe', t('admin.accounts.public'), TagManager.instance.url_for(account)
|
||||
= table_link_to 'globe', t('admin.accounts.public'), ActivityPub::TagManager.instance.url_for(account)
|
||||
|
@ -3,6 +3,34 @@
|
||||
|
||||
= render 'application/card', account: @account
|
||||
|
||||
- account = @account
|
||||
- proofs = account.identity_proofs.active
|
||||
- fields = account.fields
|
||||
- unless fields.empty? && proofs.empty? && account.note.blank?
|
||||
.admin-account-bio
|
||||
- unless fields.empty? && proofs.empty?
|
||||
%div
|
||||
.account__header__fields
|
||||
- proofs.each do |proof|
|
||||
%dl
|
||||
%dt= proof.provider.capitalize
|
||||
%dd.verified
|
||||
= link_to fa_icon('check'), proof.badge.proof_url, class: 'verified__mark', title: t('accounts.link_verified_on', date: l(proof.updated_at))
|
||||
= link_to proof.provider_username, proof.badge.profile_url
|
||||
|
||||
- fields.each do |field|
|
||||
%dl
|
||||
%dt.emojify{ title: field.name }= Formatter.instance.format_field(account, field.name, custom_emojify: true)
|
||||
%dd{ title: field.value, class: custom_field_classes(field) }
|
||||
- if field.verified?
|
||||
%span.verified__mark{ title: t('accounts.link_verified_on', date: l(field.verified_at)) }
|
||||
= fa_icon 'check'
|
||||
= Formatter.instance.format_field(account, field.value, custom_emojify: true)
|
||||
|
||||
- if account.note.present?
|
||||
%div
|
||||
.account__header__content.emojify= Formatter.instance.simplified_format(account, custom_emojify: true)
|
||||
|
||||
.dashboard__counters{ style: 'margin-top: 10px' }
|
||||
%div
|
||||
= link_to admin_account_statuses_path(@account.id) do
|
||||
@ -174,7 +202,7 @@
|
||||
|
||||
- unless @account.local?
|
||||
- if DomainBlock.where(domain: @account.domain).exists?
|
||||
= link_to t('admin.domain_blocks.undo'), admin_instance_path(@account.domain), class: 'button'
|
||||
= link_to t('admin.domain_blocks.view'), admin_instance_path(@account.domain), class: 'button'
|
||||
- else
|
||||
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: @account.domain), class: 'button button--destructive'
|
||||
|
||||
|
@ -1,28 +1,31 @@
|
||||
%tr
|
||||
%td
|
||||
= custom_emoji_tag(custom_emoji)
|
||||
%td
|
||||
%samp= ":#{custom_emoji.shortcode}:"
|
||||
%td
|
||||
- if custom_emoji.local?
|
||||
= t('admin.accounts.location.local')
|
||||
- else
|
||||
= link_to custom_emoji.domain, admin_custom_emojis_path(by_domain: custom_emoji.domain)
|
||||
%td
|
||||
- if custom_emoji.local?
|
||||
- if custom_emoji.visible_in_picker
|
||||
= table_link_to 'eye', t('admin.custom_emojis.listed'), admin_custom_emoji_path(custom_emoji, custom_emoji: { visible_in_picker: false }, page: params[:page], **@filter_params), method: :patch
|
||||
.batch-table__row
|
||||
%label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
|
||||
= f.check_box :custom_emoji_ids, { multiple: true, include_hidden: false }, custom_emoji.id
|
||||
.batch-table__row__content.batch-table__row__content--with-image
|
||||
.batch-table__row__content__image
|
||||
= custom_emoji_tag(custom_emoji, animate = current_account&.user&.setting_auto_play_gif)
|
||||
|
||||
.batch-table__row__content__text
|
||||
%samp= ":#{custom_emoji.shortcode}:"
|
||||
|
||||
- if custom_emoji.local?
|
||||
%span.account-role.bot= custom_emoji.category&.name || t('admin.custom_emojis.uncategorized')
|
||||
|
||||
.batch-table__row__content__extra
|
||||
- if custom_emoji.local?
|
||||
= t('admin.accounts.location.local')
|
||||
- else
|
||||
= table_link_to 'eye-slash', t('admin.custom_emojis.unlisted'), admin_custom_emoji_path(custom_emoji, custom_emoji: { visible_in_picker: true }, page: params[:page], **@filter_params), method: :patch
|
||||
- else
|
||||
- if custom_emoji.local_counterpart.present?
|
||||
= link_to safe_join([custom_emoji_tag(custom_emoji.local_counterpart), t('admin.custom_emojis.overwrite')]), copy_admin_custom_emoji_path(custom_emoji, page: params[:page], **@filter_params), method: :post, class: 'table-action-link'
|
||||
= custom_emoji.domain
|
||||
|
||||
%br/
|
||||
|
||||
- if custom_emoji.disabled?
|
||||
= t('admin.custom_emojis.disabled')
|
||||
- else
|
||||
= table_link_to 'copy', t('admin.custom_emojis.copy'), copy_admin_custom_emoji_path(custom_emoji, page: params[:page], **@filter_params), method: :post
|
||||
%td
|
||||
- if custom_emoji.disabled?
|
||||
= table_link_to 'power-off', t('admin.custom_emojis.enable'), enable_admin_custom_emoji_path(custom_emoji, page: params[:page], **@filter_params), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
- else
|
||||
= table_link_to 'power-off', t('admin.custom_emojis.disable'), disable_admin_custom_emoji_path(custom_emoji, page: params[:page], **@filter_params), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
%td
|
||||
= table_link_to 'times', t('admin.custom_emojis.delete'), admin_custom_emoji_path(custom_emoji, page: params[:page], **@filter_params), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
= t('admin.custom_emojis.enabled')
|
||||
- if custom_emoji.local?
|
||||
•
|
||||
- if custom_emoji.visible_in_picker?
|
||||
= t('admin.custom_emojis.listed')
|
||||
- else
|
||||
= t('admin.custom_emojis.unlisted')
|
||||
|
@ -1,6 +1,9 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.custom_emojis.title')
|
||||
|
||||
- content_for :header_tags do
|
||||
= javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'
|
||||
|
||||
.filters
|
||||
.filter-subset
|
||||
%strong= t('admin.accounts.location.title')
|
||||
@ -20,8 +23,7 @@
|
||||
= form_tag admin_custom_emojis_url, method: 'GET', class: 'simple_form' do
|
||||
.fields-group
|
||||
- Admin::FilterHelper::CUSTOM_EMOJI_FILTERS.each do |key|
|
||||
- if params[key].present?
|
||||
= hidden_field_tag key, params[key]
|
||||
= hidden_field_tag key, params[key] if params[key].present?
|
||||
|
||||
- %i(shortcode by_domain).each do |key|
|
||||
.input.string.optional
|
||||
@ -31,18 +33,54 @@
|
||||
%button= t('admin.accounts.search')
|
||||
= link_to t('admin.accounts.reset'), admin_custom_emojis_path, class: 'button negative'
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('admin.custom_emojis.emoji')
|
||||
%th= t('admin.custom_emojis.shortcode')
|
||||
%th= t('admin.accounts.domain')
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
= render @custom_emojis
|
||||
= form_for(@form, url: batch_admin_custom_emojis_path) do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
- Admin::FilterHelper::CUSTOM_EMOJI_FILTERS.each do |key|
|
||||
= hidden_field_tag key, params[key] if params[key].present?
|
||||
|
||||
.batch-table
|
||||
.batch-table__toolbar
|
||||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
- if params[:local] == '1'
|
||||
= f.button safe_join([fa_icon('save'), t('generic.save_changes')]), name: :update, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
|
||||
= f.button safe_join([fa_icon('eye'), t('admin.custom_emojis.list')]), name: :list, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
|
||||
= f.button safe_join([fa_icon('eye-slash'), t('admin.custom_emojis.unlist')]), name: :unlist, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
|
||||
= f.button safe_join([fa_icon('power-off'), t('admin.custom_emojis.enable')]), name: :enable, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
|
||||
= f.button safe_join([fa_icon('power-off'), t('admin.custom_emojis.disable')]), name: :disable, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
|
||||
= f.button safe_join([fa_icon('times'), t('admin.custom_emojis.delete')]), name: :delete, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
|
||||
- unless params[:local] == '1'
|
||||
= f.button safe_join([fa_icon('copy'), t('admin.custom_emojis.copy')]), name: :copy, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
|
||||
- if params[:local] == '1'
|
||||
.batch-table__form.simple_form
|
||||
.fields-row
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
.input.select.optional
|
||||
.label_input
|
||||
= f.select :category_id, options_from_collection_for_select(CustomEmojiCategory.all, 'id', 'name'), prompt: t('admin.custom_emojis.assign_category'), class: 'select optional', 'aria-label': t('admin.custom_emojis.assign_category')
|
||||
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
.input.string.optional
|
||||
.label_input
|
||||
= f.text_field :category_name, class: 'string optional', placeholder: t('admin.custom_emojis.create_new_category'), 'aria-label': t('admin.custom_emojis.create_new_category')
|
||||
|
||||
.batch-table__body
|
||||
- if @custom_emojis.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
- else
|
||||
= render partial: 'custom_emoji', collection: @custom_emojis, locals: { f: f }
|
||||
|
||||
= paginate @custom_emojis
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
= link_to t('admin.custom_emojis.upload'), new_admin_custom_emoji_path, class: 'button'
|
||||
|
@ -4,27 +4,43 @@
|
||||
.dashboard__counters
|
||||
%div
|
||||
= link_to admin_accounts_url(local: 1, recent: 1) do
|
||||
.dashboard__counters__num= number_with_delimiter @users_count
|
||||
.dashboard__counters__num{ title: number_with_delimiter(@users_count, strip_insignificant_zeros: true) }
|
||||
= number_to_human @users_count, strip_insignificant_zeros: true
|
||||
.dashboard__counters__label= t 'admin.dashboard.total_users'
|
||||
%div
|
||||
%div
|
||||
.dashboard__counters__num= number_with_delimiter @registrations_week
|
||||
.dashboard__counters__num{ title: number_with_delimiter(@registrations_week, strip_insignificant_zeros: true) }
|
||||
= number_to_human @registrations_week, strip_insignificant_zeros: true
|
||||
.dashboard__counters__label= t 'admin.dashboard.week_users_new'
|
||||
%div
|
||||
%div
|
||||
.dashboard__counters__num= number_with_delimiter @logins_week
|
||||
.dashboard__counters__num{ title: number_with_delimiter(@logins_week, strip_insignificant_zeros: true) }
|
||||
= number_to_human @logins_week, strip_insignificant_zeros: true
|
||||
.dashboard__counters__label= t 'admin.dashboard.week_users_active'
|
||||
%div
|
||||
%div
|
||||
.dashboard__counters__num= number_with_delimiter @interactions_week
|
||||
.dashboard__counters__label= t 'admin.dashboard.week_interactions'
|
||||
= link_to admin_pending_accounts_path do
|
||||
.dashboard__counters__num{ title: number_with_delimiter(@pending_users_count, strip_insignificant_zeros: true) }
|
||||
= number_to_human @pending_users_count, strip_insignificant_zeros: true
|
||||
.dashboard__counters__label= t 'admin.dashboard.pending_users'
|
||||
%div
|
||||
= link_to admin_reports_url do
|
||||
.dashboard__counters__num= number_with_delimiter @reports_count
|
||||
.dashboard__counters__num{ title: number_with_delimiter(@reports_count, strip_insignificant_zeros: true) }
|
||||
= number_to_human @reports_count, strip_insignificant_zeros: true
|
||||
.dashboard__counters__label= t 'admin.dashboard.open_reports'
|
||||
%div
|
||||
= link_to admin_tags_path(pending_review: '1') do
|
||||
.dashboard__counters__num{ title: number_with_delimiter(@pending_tags_count, strip_insignificant_zeros: true) }
|
||||
= number_to_human @pending_tags_count, strip_insignificant_zeros: true
|
||||
.dashboard__counters__label= t 'admin.dashboard.pending_tags'
|
||||
%div
|
||||
%div
|
||||
.dashboard__counters__num{ title: number_with_delimiter(@interactions_week, strip_insignificant_zeros: true) }
|
||||
= number_to_human @interactions_week, strip_insignificant_zeros: true
|
||||
.dashboard__counters__label= t 'admin.dashboard.week_interactions'
|
||||
%div
|
||||
= link_to sidekiq_url do
|
||||
.dashboard__counters__num= number_with_delimiter @queue_backlog
|
||||
.dashboard__counters__num{ title: number_with_delimiter(@queue_backlog, strip_insignificant_zeros: true) }
|
||||
= number_to_human @queue_backlog, strip_insignificant_zeros: true
|
||||
.dashboard__counters__label= t 'admin.dashboard.backlog'
|
||||
|
||||
.dashboard__widgets
|
||||
@ -49,8 +65,12 @@
|
||||
= feature_hint(link_to(t('admin.dashboard.feature_profile_directory'), edit_admin_settings_path), @profile_directory)
|
||||
%li
|
||||
= feature_hint(link_to(t('admin.dashboard.feature_timeline_preview'), edit_admin_settings_path), @timeline_preview)
|
||||
%li
|
||||
= feature_hint(link_to(t('admin.dashboard.trends'), edit_admin_settings_path), @trends_enabled)
|
||||
%li
|
||||
= feature_hint(link_to(t('admin.dashboard.feature_relay'), admin_relays_path), @relay_enabled)
|
||||
%li
|
||||
= feature_hint(link_to(t('admin.dashboard.feature_spam_check'), edit_admin_settings_path), @spam_check_enabled)
|
||||
|
||||
.dashboard__widgets__versions
|
||||
%div
|
||||
@ -88,6 +108,10 @@
|
||||
= feature_hint(t('admin.dashboard.search'), @search_enabled)
|
||||
%li
|
||||
= feature_hint(t('admin.dashboard.single_user_mode'), @single_user_mode)
|
||||
%li
|
||||
= feature_hint(t('admin.dashboard.authorized_fetch_mode'), @authorized_fetch)
|
||||
%li
|
||||
= feature_hint(t('admin.dashboard.whitelist_mode'), @whitelist_enabled)
|
||||
%li
|
||||
= feature_hint('LDAP', @ldap_enabled)
|
||||
%li
|
||||
@ -105,5 +129,5 @@
|
||||
%ul
|
||||
- @trending_hashtags.each do |tag|
|
||||
%li
|
||||
= link_to "##{tag.name}", web_url("timelines/tag/#{tag.name}")
|
||||
= link_to content_tag(:span, "##{tag.name}", class: !tag.trendable? && !tag.reviewed? ? 'warning-hint' : (!tag.trendable? ? 'negative-hint' : nil)), admin_tag_path(tag.id)
|
||||
%span.pull-right= number_with_delimiter(tag.history[0][:accounts].to_i)
|
||||
|
14
app/views/admin/domain_allows/new.html.haml
Normal file
14
app/views/admin/domain_allows/new.html.haml
Normal file
@ -0,0 +1,14 @@
|
||||
- content_for :header_tags do
|
||||
= javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'
|
||||
|
||||
- content_for :page_title do
|
||||
= t('admin.domain_allows.add_new')
|
||||
|
||||
= simple_form_for @domain_allow, url: admin_domain_allows_path do |f|
|
||||
= render 'shared/error_messages', object: @domain_allow
|
||||
|
||||
.fields-group
|
||||
= f.input :domain, wrapper: :with_label, label: t('admin.domain_blocks.domain'), required: true
|
||||
|
||||
.actions
|
||||
= f.button :button, t('admin.domain_allows.add_new'), type: :submit
|
30
app/views/admin/domain_blocks/edit.html.haml
Normal file
30
app/views/admin/domain_blocks/edit.html.haml
Normal file
@ -0,0 +1,30 @@
|
||||
- content_for :header_tags do
|
||||
= javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'
|
||||
|
||||
- content_for :page_title do
|
||||
= t('admin.domain_blocks.edit')
|
||||
|
||||
= simple_form_for @domain_block, url: admin_domain_block_path(@domain_block), method: :put do |f|
|
||||
= render 'shared/error_messages', object: @domain_block
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :domain, wrapper: :with_label, label: t('admin.domain_blocks.domain'), hint: t('admin.domain_blocks.new.hint'), required: true, readonly: true, disabled: true
|
||||
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| t("admin.domain_blocks.new.severity.#{type}") }, hint: t('admin.domain_blocks.new.severity.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_media'), hint: I18n.t('admin.domain_blocks.reject_media_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_reports, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reports'), hint: I18n.t('admin.domain_blocks.reject_reports_hint')
|
||||
|
||||
.field-group
|
||||
= f.input :private_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.private_comment'), hint: t('admin.domain_blocks.private_comment_hint'), rows: 6
|
||||
|
||||
.field-group
|
||||
= f.input :public_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.public_comment'), hint: t('admin.domain_blocks.public_comment_hint'), rows: 6
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
@ -20,5 +20,11 @@
|
||||
.fields-group
|
||||
= f.input :reject_reports, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reports'), hint: I18n.t('admin.domain_blocks.reject_reports_hint')
|
||||
|
||||
.field-group
|
||||
= f.input :private_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.private_comment'), hint: t('admin.domain_blocks.private_comment_hint'), rows: 6
|
||||
|
||||
.field-group
|
||||
= f.input :public_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.public_comment'), hint: t('admin.domain_blocks.public_comment_hint'), rows: 6
|
||||
|
||||
.actions
|
||||
= f.button :button, t('.create'), type: :submit
|
||||
|
@ -1,6 +1,18 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.domain_blocks.show.title', domain: @domain_block.domain)
|
||||
|
||||
- if @domain_block.private_comment.present?
|
||||
.speech-bubble
|
||||
.speech-bubble__bubble
|
||||
= simple_format(h(@domain_block.private_comment))
|
||||
.speech-bubble__owner= t 'admin.instances.private_comment'
|
||||
|
||||
- if @domain_block.public_comment.present?
|
||||
.speech-bubble
|
||||
.speech-bubble__bubble
|
||||
= simple_format(h(@domain_block.public_comment))
|
||||
.speech-bubble__owner= t 'admin.instances.public_comment'
|
||||
|
||||
= simple_form_for @domain_block, url: admin_domain_block_path(@domain_block), method: :delete do |f|
|
||||
|
||||
- unless (@domain_block.noop?)
|
||||
|
@ -6,24 +6,30 @@
|
||||
%strong= t('admin.instances.moderation.title')
|
||||
%ul
|
||||
%li= filter_link_to t('admin.instances.moderation.all'), limited: nil
|
||||
%li= filter_link_to t('admin.instances.moderation.limited'), limited: '1'
|
||||
|
||||
- unless whitelist_mode?
|
||||
%li= filter_link_to t('admin.instances.moderation.limited'), limited: '1'
|
||||
|
||||
%div{ style: 'flex: 1 1 auto; text-align: right' }
|
||||
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button'
|
||||
- if whitelist_mode?
|
||||
= link_to t('admin.domain_allows.add_new'), new_admin_domain_allow_path, class: 'button'
|
||||
- else
|
||||
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button'
|
||||
|
||||
= form_tag admin_instances_url, method: 'GET', class: 'simple_form' do
|
||||
.fields-group
|
||||
- Admin::FilterHelper::INSTANCES_FILTERS.each do |key|
|
||||
- if params[key].present?
|
||||
= hidden_field_tag key, params[key]
|
||||
- unless whitelist_mode?
|
||||
= form_tag admin_instances_url, method: 'GET', class: 'simple_form' do
|
||||
.fields-group
|
||||
- Admin::FilterHelper::INSTANCES_FILTERS.each do |key|
|
||||
- if params[key].present?
|
||||
= hidden_field_tag key, params[key]
|
||||
|
||||
- %i(by_domain).each do |key|
|
||||
.input.string.optional
|
||||
= text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.instances.#{key}")
|
||||
- %i(by_domain).each do |key|
|
||||
.input.string.optional
|
||||
= text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.instances.#{key}")
|
||||
|
||||
.actions
|
||||
%button= t('admin.accounts.search')
|
||||
= link_to t('admin.accounts.reset'), admin_instances_path, class: 'button negative'
|
||||
.actions
|
||||
%button= t('admin.accounts.search')
|
||||
= link_to t('admin.accounts.reset'), admin_instances_path, class: 'button negative'
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
@ -38,17 +44,21 @@
|
||||
- if !instance.domain_block.noop?
|
||||
= t("admin.domain_blocks.severity.#{instance.domain_block.severity}")
|
||||
- first_item = false
|
||||
- if instance.domain_block.reject_media?
|
||||
- unless first_item
|
||||
•
|
||||
= t('admin.domain_blocks.rejecting_media')
|
||||
- first_item = false
|
||||
- if instance.domain_block.reject_reports?
|
||||
- unless first_item
|
||||
•
|
||||
= t('admin.domain_blocks.rejecting_reports')
|
||||
- unless instance.domain_block.suspend?
|
||||
- if instance.domain_block.reject_media?
|
||||
- unless first_item
|
||||
•
|
||||
= t('admin.domain_blocks.rejecting_media')
|
||||
- first_item = false
|
||||
- if instance.domain_block.reject_reports?
|
||||
- unless first_item
|
||||
•
|
||||
= t('admin.domain_blocks.rejecting_reports')
|
||||
- elsif whitelist_mode?
|
||||
= t('admin.accounts.whitelisted')
|
||||
- else
|
||||
= t('admin.accounts.no_limits_imposed')
|
||||
- if instance.countable?
|
||||
.trends__item__current{ title: t('admin.instances.known_accounts', count: instance.accounts_count) }= number_to_human instance.accounts_count, strip_insignificant_zeros: true
|
||||
|
||||
= paginate paginated_instances
|
||||
|
@ -31,6 +31,18 @@
|
||||
= fa_icon 'times'
|
||||
.dashboard__counters__label= t 'admin.instances.delivery_available'
|
||||
|
||||
- if @private_comment.present?
|
||||
.speech-bubble
|
||||
.speech-bubble__bubble
|
||||
= simple_format(h(@private_comment))
|
||||
.speech-bubble__owner= t 'admin.instances.private_comment'
|
||||
|
||||
- if @public_comment.present?
|
||||
.speech-bubble
|
||||
.speech-bubble__bubble
|
||||
= simple_format(h(@public_comment))
|
||||
.speech-bubble__owner= t 'admin.instances.public_comment'
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
%div{ style: 'overflow: hidden' }
|
||||
@ -38,7 +50,10 @@
|
||||
= link_to t('admin.accounts.title'), admin_accounts_path(remote: '1', by_domain: @instance.domain), class: 'button'
|
||||
|
||||
%div{ style: 'float: right' }
|
||||
- if @domain_block
|
||||
- if @domain_allow
|
||||
= link_to t('admin.domain_allows.undo'), admin_domain_allow_path(@domain_allow), class: 'button button--destructive', data: { confirm: t('admin.accounts.are_you_sure'), method: :delete }
|
||||
- elsif @domain_block
|
||||
= link_to t('admin.domain_blocks.edit'), edit_admin_domain_block_path(@domain_block), class: 'button'
|
||||
= link_to t('admin.domain_blocks.undo'), admin_domain_block_path(@domain_block), class: 'button'
|
||||
- else
|
||||
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: @instance.domain), class: 'button'
|
||||
|
@ -16,11 +16,14 @@
|
||||
- video = status.proper.media_attachments.first
|
||||
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: !current_account&.user&.show_all_media? && status.proper.sensitive? || current_account&.user&.hide_all_media?, width: 610, height: 343, inline: true, alt: video.description
|
||||
- else
|
||||
= react_component :media_gallery, height: 343, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.proper.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }
|
||||
= react_component :media_gallery, height: 343, sensitive: !current_account&.user&.show_all_media? && status.proper.sensitive? || current_account&.user&.hide_all_media?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.proper.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }
|
||||
|
||||
.detailed-status__meta
|
||||
= link_to TagManager.instance.url_for(status), class: 'detailed-status__datetime', target: stream_link_target, rel: 'noopener' do
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'detailed-status__datetime', target: stream_link_target, rel: 'noopener' do
|
||||
%time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
|
||||
- if status.discarded?
|
||||
·
|
||||
%span.negative-hint= t('admin.statuses.deleted')
|
||||
·
|
||||
- if status.reblog?
|
||||
= fa_icon('retweet fw')
|
||||
|
@ -28,7 +28,9 @@
|
||||
- reports.each do |report|
|
||||
.report-card__summary__item
|
||||
.report-card__summary__item__reported-by
|
||||
- if report.account.local?
|
||||
- if report.account.instance_actor?
|
||||
= site_hostname
|
||||
- elsif report.account.local?
|
||||
= admin_account_link_to report.account
|
||||
- else
|
||||
= report.account.domain
|
||||
|
@ -29,7 +29,9 @@
|
||||
%td= table_link_to 'file', pluralize(@report.target_account.targeted_moderation_notes.count, t('admin.reports.account.note')), admin_reports_path(target_account_id: @report.target_account.id)
|
||||
%tr
|
||||
%th= t('admin.reports.reported_by')
|
||||
- if @report.account.local?
|
||||
- if @report.account.instance_actor?
|
||||
%td{ colspan: 3 }= site_hostname
|
||||
- elsif @report.account.local?
|
||||
%td= admin_account_link_to @report.account
|
||||
%td= table_link_to 'flag', pluralize(@report.account.targeted_reports.count, t('admin.reports.account.report')), admin_reports_path(target_account_id: @report.account.id)
|
||||
%td= table_link_to 'file', pluralize(@report.account.targeted_moderation_notes.count, t('admin.reports.account.note')), admin_reports_path(target_account_id: @report.account.id)
|
||||
|
@ -42,11 +42,12 @@
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.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')
|
||||
- unless whitelist_mode?
|
||||
.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_known_fediverse_at_about_page, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_known_fediverse_at_about_page.title'), hint: t('admin.settings.show_known_fediverse_at_about_page.desc_html')
|
||||
.fields-group
|
||||
= f.input :show_known_fediverse_at_about_page, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_known_fediverse_at_about_page.title'), hint: t('admin.settings.show_known_fediverse_at_about_page.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')
|
||||
@ -54,26 +55,42 @@
|
||||
.fields-group
|
||||
= f.input :open_deletion, as: :boolean, wrapper: :with_label, label: t('admin.settings.registrations.deletion.title'), hint: t('admin.settings.registrations.deletion.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :activity_api_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.activity_api_enabled.title'), hint: t('admin.settings.activity_api_enabled.desc_html')
|
||||
- unless whitelist_mode?
|
||||
.fields-group
|
||||
= f.input :activity_api_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.activity_api_enabled.title'), hint: t('admin.settings.activity_api_enabled.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :peers_api_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.peers_api_enabled.title'), hint: t('admin.settings.peers_api_enabled.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :preview_sensitive_media, as: :boolean, wrapper: :with_label, label: t('admin.settings.preview_sensitive_media.title'), hint: t('admin.settings.preview_sensitive_media.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :profile_directory, as: :boolean, wrapper: :with_label, label: t('admin.settings.profile_directory.title'), hint: t('admin.settings.profile_directory.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :trends, as: :boolean, wrapper: :with_label, label: t('admin.settings.trends.title'), hint: t('admin.settings.trends.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :noindex, as: :boolean, wrapper: :with_label, label: t('admin.settings.default_noindex.title'), hint: t('admin.settings.default_noindex.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :peers_api_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.peers_api_enabled.title'), hint: t('admin.settings.peers_api_enabled.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :preview_sensitive_media, as: :boolean, wrapper: :with_label, label: t('admin.settings.preview_sensitive_media.title'), hint: t('admin.settings.preview_sensitive_media.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :profile_directory, as: :boolean, wrapper: :with_label, label: t('admin.settings.profile_directory.title'), hint: t('admin.settings.profile_directory.desc_html')
|
||||
= f.input :spam_check_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.spam_check_enabled.title'), hint: t('admin.settings.spam_check_enabled.desc_html')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.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}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :show_domain_blocks, wrapper: :with_label, collection: %i(disabled users all), label: t('admin.settings.domain_blocks.title'), label_method: lambda { |value| t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :show_domain_blocks_rationale, wrapper: :with_label, collection: %i(disabled users all), label: t('admin.settings.domain_blocks_rationale.title'), label_method: lambda { |value| t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
|
||||
.fields-group
|
||||
= f.input :closed_registrations_message, as: :text, wrapper: :with_block_label, label: t('admin.settings.registrations.closed_message.title'), hint: t('admin.settings.registrations.closed_message.desc_html'), input_html: { rows: 8 }
|
||||
= 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_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 } unless whitelist_mode?
|
||||
= 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 }
|
||||
= f.input :custom_css, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }, label: t('admin.settings.custom_css.title'), hint: t('admin.settings.custom_css.desc_html')
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
%tr
|
||||
%td
|
||||
%samp= subscription.account.acct
|
||||
%td
|
||||
%samp= subscription.callback_url
|
||||
%td
|
||||
- if subscription.confirmed?
|
||||
%i.fa.fa-check
|
||||
%td{ style: "color: #{subscription.expired? ? 'red' : 'inherit'};" }
|
||||
%time.time-ago{ datetime: subscription.expires_at.iso8601, title: l(subscription.expires_at) }
|
||||
= precede subscription.expired? ? '-' : '' do
|
||||
= time_ago_in_words(subscription.expires_at)
|
||||
%td
|
||||
- if subscription.last_successful_delivery_at?
|
||||
%time.formatted{ datetime: subscription.last_successful_delivery_at.iso8601, title: l(subscription.last_successful_delivery_at) }
|
||||
= l subscription.last_successful_delivery_at
|
||||
- else
|
||||
%i.fa.fa-times
|
@ -1,16 +0,0 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.subscriptions.title')
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('admin.subscriptions.topic')
|
||||
%th= t('admin.subscriptions.callback_url')
|
||||
%th= t('admin.subscriptions.confirmed')
|
||||
%th= t('admin.subscriptions.expires_in')
|
||||
%th= t('admin.subscriptions.last_delivery')
|
||||
%tbody
|
||||
= render @subscriptions
|
||||
|
||||
= paginate @subscriptions
|
@ -1,12 +1,20 @@
|
||||
%tr
|
||||
%td
|
||||
= link_to explore_hashtag_path(tag) do
|
||||
= fa_icon 'hashtag'
|
||||
= tag.name
|
||||
%td
|
||||
= t('directories.people', count: tag.accounts_count)
|
||||
%td
|
||||
- if tag.hidden?
|
||||
= table_link_to 'eye', t('admin.tags.unhide'), unhide_admin_tag_path(tag.id, **@filter_params), method: :post
|
||||
- else
|
||||
= table_link_to 'eye-slash', t('admin.tags.hide'), hide_admin_tag_path(tag.id, **@filter_params), method: :post
|
||||
.batch-table__row
|
||||
%label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
|
||||
= f.check_box :tag_ids, { multiple: true, include_hidden: false }, tag.id
|
||||
|
||||
.directory__tag
|
||||
= link_to admin_tag_path(tag.id) do
|
||||
%h4
|
||||
= fa_icon 'hashtag'
|
||||
= tag.name
|
||||
|
||||
%small
|
||||
= t('admin.tags.in_directory', count: tag.accounts_count)
|
||||
•
|
||||
= t('admin.tags.unique_uses_today', count: tag.history.first[:accounts])
|
||||
|
||||
- if tag.trending?
|
||||
= fa_icon 'fire fw'
|
||||
= t('admin.tags.trending_right_now')
|
||||
|
||||
.trends__item__current= number_to_human tag.history.first[:uses], strip_insignificant_zeros: true
|
||||
|
@ -1,19 +1,79 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.tags.title')
|
||||
|
||||
- content_for :header_tags do
|
||||
= javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'
|
||||
|
||||
.filters
|
||||
.filter-subset
|
||||
%strong= t('admin.reports.status')
|
||||
%strong= t('admin.tags.context')
|
||||
%ul
|
||||
%li= filter_link_to t('admin.tags.visible'), hidden: nil
|
||||
%li= filter_link_to t('admin.tags.hidden'), hidden: '1'
|
||||
%li= filter_link_to t('generic.all'), directory: nil
|
||||
%li= filter_link_to t('admin.tags.directory'), directory: '1'
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('admin.tags.name')
|
||||
%th= t('admin.tags.accounts')
|
||||
%th
|
||||
%tbody
|
||||
= render @tags
|
||||
.filter-subset
|
||||
%strong= t('admin.tags.review')
|
||||
%ul
|
||||
%li= filter_link_to t('generic.all'), reviewed: nil, unreviewed: nil, pending_review: nil
|
||||
%li= filter_link_to t('admin.tags.unreviewed'), unreviewed: '1', reviewed: nil, pending_review: nil
|
||||
%li= filter_link_to t('admin.tags.reviewed'), reviewed: '1', unreviewed: nil, pending_review: nil
|
||||
%li= filter_link_to safe_join([t('admin.accounts.moderation.pending'), "(#{Tag.pending_review.count})"], ' '), pending_review: '1', reviewed: nil, unreviewed: nil
|
||||
|
||||
.filter-subset
|
||||
%strong= t('generic.order_by')
|
||||
%ul
|
||||
%li= filter_link_to t('admin.tags.most_recent'), popular: nil, active: nil
|
||||
%li= filter_link_to t('admin.tags.most_popular'), popular: '1', active: nil
|
||||
%li= filter_link_to t('admin.tags.last_active'), active: '1', popular: nil
|
||||
|
||||
= form_tag admin_tags_url, method: 'GET', class: 'simple_form' do
|
||||
.fields-group
|
||||
- Admin::FilterHelper::TAGS_FILTERS.each do |key|
|
||||
= hidden_field_tag key, params[key] if params[key].present?
|
||||
|
||||
- %i(name).each do |key|
|
||||
.input.string.optional
|
||||
= text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.tags.#{key}")
|
||||
|
||||
.actions
|
||||
%button= t('admin.accounts.search')
|
||||
= link_to t('admin.accounts.reset'), admin_tags_path, class: 'button negative'
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
= form_for(@form, url: batch_admin_tags_path) do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
= hidden_field_tag :name, params[:name] if params[:name].present?
|
||||
|
||||
- Admin::FilterHelper::TAGS_FILTERS.each do |key|
|
||||
= hidden_field_tag key, params[key] if params[key].present?
|
||||
|
||||
.batch-table
|
||||
.batch-table__toolbar
|
||||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
- if params[:pending_review] == '1'
|
||||
= f.button safe_join([fa_icon('check'), t('admin.accounts.approve')]), name: :approve, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
|
||||
= f.button safe_join([fa_icon('times'), t('admin.accounts.reject')]), name: :reject, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
- else
|
||||
%span.neutral-hint= t('generic.no_batch_actions_available')
|
||||
|
||||
.batch-table__body
|
||||
- if @tags.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
- else
|
||||
= render partial: 'tag', collection: @tags, locals: { f: f }
|
||||
|
||||
= paginate @tags
|
||||
|
||||
- if params[:pending_review] == '1'
|
||||
%hr.spacer/
|
||||
|
||||
%div{ style: 'overflow: hidden' }
|
||||
%div{ style: 'float: right' }
|
||||
= link_to t('admin.accounts.reject_all'), reject_all_admin_tags_path, method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button button--destructive'
|
||||
|
||||
%div
|
||||
= link_to t('admin.accounts.approve_all'), approve_all_admin_tags_path, method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button'
|
||||
|
52
app/views/admin/tags/show.html.haml
Normal file
52
app/views/admin/tags/show.html.haml
Normal file
@ -0,0 +1,52 @@
|
||||
- content_for :page_title do
|
||||
= "##{@tag.name}"
|
||||
|
||||
.dashboard__counters
|
||||
%div
|
||||
= link_to tag_url(@tag), target: '_blank', rel: 'noopener' do
|
||||
.dashboard__counters__num= number_with_delimiter @accounts_today
|
||||
.dashboard__counters__label= t 'admin.tags.accounts_today'
|
||||
%div
|
||||
%div
|
||||
.dashboard__counters__num= number_with_delimiter @accounts_week
|
||||
.dashboard__counters__label= t 'admin.tags.accounts_week'
|
||||
%div
|
||||
- if @tag.accounts_count > 0
|
||||
= link_to explore_hashtag_path(@tag) do
|
||||
.dashboard__counters__num= number_with_delimiter @tag.accounts_count
|
||||
.dashboard__counters__label= t 'admin.tags.directory'
|
||||
- else
|
||||
%div
|
||||
.dashboard__counters__num= number_with_delimiter @tag.accounts_count
|
||||
.dashboard__counters__label= t 'admin.tags.directory'
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
= simple_form_for @tag, url: admin_tag_path(@tag.id) do |f|
|
||||
= render 'shared/error_messages', object: @tag
|
||||
|
||||
.fields-group
|
||||
= f.input :name, wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :usable, as: :boolean, wrapper: :with_label
|
||||
= f.input :trendable, as: :boolean, wrapper: :with_label, disabled: !Setting.trends
|
||||
= f.input :listable, as: :boolean, wrapper: :with_label, disabled: !Setting.profile_directory
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
%h3= t 'admin.tags.breakdown'
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%tbody
|
||||
- total = @usage_by_domain.sum(&:last).to_f
|
||||
|
||||
- @usage_by_domain.each do |(domain, count)|
|
||||
%tr
|
||||
%th= domain || site_hostname
|
||||
%td= number_to_percentage((count / total) * 100, precision: 1)
|
||||
%td= number_with_delimiter count
|
5
app/views/admin_mailer/new_trending_tag.text.erb
Normal file
5
app/views/admin_mailer/new_trending_tag.text.erb
Normal file
@ -0,0 +1,5 @@
|
||||
<%= raw t('application_mailer.salutation', name: display_name(@me)) %>
|
||||
|
||||
<%= raw t('admin_mailer.new_trending_tag.body', name: @tag.name) %>
|
||||
|
||||
<%= raw t('application_mailer.view')%> <%= admin_tags_url(pending_review: '1') %>
|
@ -1,4 +1,4 @@
|
||||
- account_url = local_assigns[:admin] ? admin_account_path(account.id) : TagManager.instance.url_for(account)
|
||||
- account_url = local_assigns[:admin] ? admin_account_path(account.id) : ActivityPub::TagManager.instance.url_for(account)
|
||||
|
||||
.card.h-card
|
||||
= link_to account_url, target: '_blank', rel: 'noopener' do
|
||||
@ -9,7 +9,7 @@
|
||||
= image_tag account.avatar.url, alt: '', width: 48, height: 48, class: 'u-photo'
|
||||
|
||||
.display-name
|
||||
%span{id: "default_account_display_name", style: "display:none;"}= account.username
|
||||
%span{ id: "default_account_display_name", style: "display: none" }= account.username
|
||||
%bdi
|
||||
%strong.emojify.p-name= display_name(account, custom_emojify: true)
|
||||
%span
|
||||
|
@ -5,3 +5,13 @@
|
||||
|
||||
.hero-widget__text
|
||||
%p= @instance_presenter.site_short_description.html_safe.presence || @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname)
|
||||
|
||||
- if Setting.trends && !(user_signed_in? && !current_user.setting_trends)
|
||||
- trends = TrendingTags.get(3)
|
||||
|
||||
- unless trends.empty?
|
||||
.endorsements-widget.trends-widget
|
||||
%h4.emojify= t('footer.trending_now')
|
||||
|
||||
- trends.each do |tag|
|
||||
= react_component :hashtag, hashtag: ActiveModelSerializers::SerializableResource.new(tag, serializer: REST::TagSerializer).as_json
|
||||
|
15
app/views/auth/challenges/new.html.haml
Normal file
15
app/views/auth/challenges/new.html.haml
Normal file
@ -0,0 +1,15 @@
|
||||
- content_for :page_title do
|
||||
= t('challenge.prompt')
|
||||
|
||||
= simple_form_for @challenge, url: request.get? ? auth_challenge_path : '' do |f|
|
||||
= f.input :return_to, as: :hidden
|
||||
|
||||
.field-group
|
||||
= f.input :current_password, wrapper: :with_block_label, input_html: { :autocomplete => 'off', :autofocus => true }, label: t('challenge.prompt'), required: true
|
||||
|
||||
.actions
|
||||
= f.button :button, t('challenge.confirm'), type: :submit
|
||||
|
||||
%p.hint.subtle-hint= t('challenge.hint_html')
|
||||
|
||||
.form-footer= render 'auth/shared/links'
|
@ -1,15 +0,0 @@
|
||||
- content_for :page_title do
|
||||
= t('auth.confirm_email')
|
||||
|
||||
= simple_form_for(current_user, as: 'user', url: finish_signup_path, html: { role: 'form'}) do |f|
|
||||
- if @show_errors && current_user.errors.any?
|
||||
#error_explanation
|
||||
- current_user.errors.full_messages.each do |msg|
|
||||
= msg
|
||||
%br
|
||||
|
||||
.fields-group
|
||||
= f.input :email, wrapper: :with_label, required: true, hint: false
|
||||
|
||||
.actions
|
||||
= f.submit t('auth.confirm_email'), class: 'button'
|
@ -1,6 +1,8 @@
|
||||
%h4= t 'sessions.title'
|
||||
%h3= t 'sessions.title'
|
||||
%p.muted-hint= t('sessions.explanation', title: site_title)
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.table-wrapper
|
||||
%table.table.inline-table
|
||||
%thead
|
||||
|
22
app/views/auth/registrations/_status.html.haml
Normal file
22
app/views/auth/registrations/_status.html.haml
Normal file
@ -0,0 +1,22 @@
|
||||
%h3= t('auth.status.account_status')
|
||||
|
||||
.simple_form
|
||||
%p.hint
|
||||
- if @user.account.suspended?
|
||||
%span.negative-hint= t('user_mailer.warning.explanation.suspend')
|
||||
- elsif @user.disabled?
|
||||
%span.negative-hint= t('user_mailer.warning.explanation.disable')
|
||||
- elsif @user.account.silenced?
|
||||
%span.warning-hint= t('user_mailer.warning.explanation.silence')
|
||||
- elsif !@user.confirmed?
|
||||
%span.warning-hint= t('auth.status.confirming')
|
||||
= link_to t('auth.didnt_get_confirmation'), new_user_confirmation_path
|
||||
- elsif !@user.approved?
|
||||
%span.warning-hint= t('auth.status.pending')
|
||||
- elsif @user.account.moved_to_account_id.present?
|
||||
%span.positive-hint= t('auth.status.redirecting_to', acct: @user.account.moved_to_account.acct)
|
||||
= link_to t('migrations.cancel'), settings_migration_path
|
||||
- else
|
||||
%span.positive-hint= t('auth.status.functional')
|
||||
|
||||
%hr.spacer/
|
@ -1,25 +1,28 @@
|
||||
- content_for :page_title do
|
||||
= t('auth.security')
|
||||
= t('settings.account_settings')
|
||||
|
||||
= render 'status'
|
||||
|
||||
%h3= t('auth.security')
|
||||
|
||||
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'auth_edit' }) do |f|
|
||||
= render 'shared/error_messages', object: resource
|
||||
|
||||
- if !use_seamless_external_login? || resource.encrypted_password.present?
|
||||
.fields-group
|
||||
= f.input :email, wrapper: :with_label, input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }, required: true, hint: false
|
||||
|
||||
.fields-group
|
||||
= f.input :current_password, wrapper: :with_label, input_html: { 'aria-label' => t('simple_form.labels.defaults.current_password'), :autocomplete => 'off' }, required: true
|
||||
|
||||
.fields-group
|
||||
= f.input :password, wrapper: :with_label, label: t('simple_form.labels.defaults.new_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.new_password'), :autocomplete => 'off' }, hint: false
|
||||
|
||||
.fields-group
|
||||
= f.input :password_confirmation, wrapper: :with_label, label: t('simple_form.labels.defaults.confirm_new_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_new_password'), :autocomplete => 'off' }
|
||||
.fields-row
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
= f.input :email, wrapper: :with_label, input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }, required: true, disabled: current_account.suspended?
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
= f.input :current_password, wrapper: :with_label, input_html: { 'aria-label' => t('simple_form.labels.defaults.current_password'), :autocomplete => 'off' }, required: true, disabled: current_account.suspended?, hint: false
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
= f.input :password, wrapper: :with_label, label: t('simple_form.labels.defaults.new_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.new_password'), :autocomplete => 'off' }, hint: t('simple_form.hints.defaults.password'), disabled: current_account.suspended?
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
= f.input :password_confirmation, wrapper: :with_label, label: t('simple_form.labels.defaults.confirm_new_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_new_password'), :autocomplete => 'off' }, disabled: current_account.suspended?
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
= f.button :button, t('generic.save_changes'), type: :submit, class: 'button', disabled: current_account.suspended?
|
||||
- else
|
||||
%p.hint= t('users.seamless_external_login')
|
||||
|
||||
@ -27,7 +30,18 @@
|
||||
|
||||
= render 'sessions'
|
||||
|
||||
- if open_deletion?
|
||||
%hr.spacer/
|
||||
|
||||
%h3= t('auth.migrate_account')
|
||||
%p.muted-hint= t('auth.migrate_account_html', path: settings_migration_path)
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
%h3= t('migrations.incoming_migrations')
|
||||
%p.muted-hint= t('migrations.incoming_migrations_html', path: settings_aliases_path)
|
||||
|
||||
- if open_deletion? && !current_account.suspended?
|
||||
%hr.spacer/
|
||||
%h4= t('auth.delete_account')
|
||||
|
||||
%h3= t('auth.delete_account')
|
||||
%p.muted-hint= t('auth.delete_account_html', path: settings_delete_path)
|
||||
|
@ -2,7 +2,7 @@
|
||||
= t('auth.register')
|
||||
|
||||
- content_for :header_tags do
|
||||
= render partial: 'shared/og'
|
||||
= render partial: 'shared/og', locals: { description: description_for_sign_up }
|
||||
|
||||
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
|
||||
= render 'shared/error_messages', object: resource
|
||||
@ -33,7 +33,7 @@
|
||||
= f.input :invite_code, as: :hidden
|
||||
|
||||
.fields-group
|
||||
= f.input :agreement, as: :boolean, wrapper: :with_label, label: t('auth.checkbox_agreement_html', rules_path: about_more_path, terms_path: terms_path)
|
||||
= f.input :agreement, as: :boolean, wrapper: :with_label, label: whitelist_mode? ? t('auth.checkbox_agreement_without_rules_html', terms_path: terms_path) : t('auth.checkbox_agreement_html', rules_path: about_more_path, terms_path: terms_path)
|
||||
|
||||
.actions
|
||||
= f.button :button, @invite.present? ? t('auth.register') : sign_up_message, type: :submit
|
||||
|
20
app/views/auth/setup/show.html.haml
Normal file
20
app/views/auth/setup/show.html.haml
Normal file
@ -0,0 +1,20 @@
|
||||
- content_for :page_title do
|
||||
= t('auth.setup.title')
|
||||
|
||||
- if missing_email?
|
||||
= simple_form_for(@user, url: auth_setup_path) do |f|
|
||||
= render 'shared/error_messages', object: @user
|
||||
|
||||
.fields-group
|
||||
%p.hint= t('auth.setup.email_below_hint_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :email, required: true, hint: false, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off' }
|
||||
|
||||
.actions
|
||||
= f.submit t('admin.accounts.change_email.label'), class: 'button'
|
||||
- else
|
||||
.simple_form
|
||||
%p.hint= t('auth.setup.email_settings_hint_html', email: content_tag(:strong, @user.email))
|
||||
|
||||
.form-footer= render 'auth/shared/links'
|
@ -1,12 +1,18 @@
|
||||
%ul.no-list
|
||||
- if controller_name != 'sessions'
|
||||
%li= link_to t('auth.login'), new_session_path(resource_name)
|
||||
- if user_signed_in?
|
||||
%li= link_to t('settings.account_settings'), edit_user_registration_path
|
||||
- else
|
||||
- if controller_name != 'sessions'
|
||||
%li= link_to t('auth.login'), new_user_session_path
|
||||
|
||||
- if devise_mapping.registerable? && controller_name != 'registrations'
|
||||
%li= link_to t('auth.register'), available_sign_up_path
|
||||
- if controller_name != 'registrations'
|
||||
%li= link_to t('auth.register'), available_sign_up_path
|
||||
|
||||
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
|
||||
%li= link_to t('auth.forgot_password'), new_password_path(resource_name)
|
||||
- if controller_name != 'passwords' && controller_name != 'registrations'
|
||||
%li= link_to t('auth.forgot_password'), new_user_password_path
|
||||
|
||||
- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
||||
%li= link_to t('auth.didnt_get_confirmation'), new_confirmation_path(resource_name)
|
||||
- if controller_name != 'confirmations' && (!user_signed_in? || !current_user.confirmed? || current_user.unconfirmed_email.present?)
|
||||
%li= link_to t('auth.didnt_get_confirmation'), new_user_confirmation_path
|
||||
|
||||
- if user_signed_in? && controller_name != 'setup'
|
||||
%li= link_to t('auth.logout'), destroy_user_session_path, data: { method: :delete }
|
||||
|
@ -1,4 +1,4 @@
|
||||
.post-follow-actions
|
||||
%div= link_to t('authorize_follow.post_follow.web'), web_url("accounts/#{@resource.id}"), class: 'button button--block'
|
||||
%div= link_to t('authorize_follow.post_follow.return'), TagManager.instance.url_for(@resource), class: 'button button--block'
|
||||
%div= link_to t('authorize_follow.post_follow.return'), ActivityPub::TagManager.instance.url_for(@resource), class: 'button button--block'
|
||||
%div= t('authorize_follow.post_follow.close')
|
||||
|
@ -14,58 +14,43 @@
|
||||
%h1= t('directories.explore_mastodon', title: site_title)
|
||||
%p= t('directories.explanation')
|
||||
|
||||
.grid
|
||||
.column-0
|
||||
- if @accounts.empty?
|
||||
= nothing_here
|
||||
- else
|
||||
.directory
|
||||
%table.accounts-table
|
||||
%tbody
|
||||
- @accounts.each do |account|
|
||||
%tr
|
||||
%td= account_link_to account
|
||||
%td.accounts-table__count.optional
|
||||
= number_to_human account.statuses_count, strip_insignificant_zeros: true
|
||||
%small= t('accounts.posts', count: account.statuses_count).downcase
|
||||
%td.accounts-table__count.optional
|
||||
= number_to_human account.followers_count, strip_insignificant_zeros: true
|
||||
%small= t('accounts.followers', count: account.followers_count).downcase
|
||||
%td.accounts-table__count
|
||||
- if account.last_status_at.present?
|
||||
%time.time-ago{ datetime: account.last_status_at.iso8601, title: l(account.last_status_at) }= l account.last_status_at
|
||||
- else
|
||||
\-
|
||||
%small= t('accounts.last_active')
|
||||
- if @accounts.empty?
|
||||
= nothing_here
|
||||
- else
|
||||
.directory__list
|
||||
- @accounts.each do |account|
|
||||
.directory__card
|
||||
.directory__card__img
|
||||
= image_tag account.header.url, alt: ''
|
||||
.directory__card__bar
|
||||
= link_to TagManager.instance.url_for(account), class: 'directory__card__bar__name' do
|
||||
.avatar
|
||||
= image_tag account.avatar.url, alt: '', width: 48, height: 48, class: 'u-photo'
|
||||
|
||||
= paginate @accounts
|
||||
.display-name
|
||||
%span{ id: "default_account_display_name", style: "display: none" }= account.username
|
||||
%bdi
|
||||
%strong.emojify.p-name= display_name(account, custom_emojify: true)
|
||||
%span= acct(account)
|
||||
.directory__card__bar__relationship.account__relationship
|
||||
= minimal_account_action_button(account)
|
||||
|
||||
.column-1
|
||||
- if user_signed_in?
|
||||
.box-widget.notice-widget
|
||||
- if current_account.discoverable?
|
||||
- if current_account.followers_count < Account::MIN_FOLLOWERS_DISCOVERY
|
||||
%p= t('directories.enabled_but_waiting', min_followers: Account::MIN_FOLLOWERS_DISCOVERY)
|
||||
- else
|
||||
%p= t('directories.enabled')
|
||||
- else
|
||||
%p= t('directories.how_to_enable')
|
||||
.directory__card__extra
|
||||
.account__header__content.emojify= Formatter.instance.simplified_format(account, custom_emojify: true)
|
||||
|
||||
= link_to settings_profile_path do
|
||||
= t('settings.edit_profile')
|
||||
= fa_icon 'chevron-right fw'
|
||||
.directory__card__extra
|
||||
.accounts-table__count
|
||||
= number_to_human account.statuses_count, strip_insignificant_zeros: true
|
||||
%small= t('accounts.posts', count: account.statuses_count).downcase
|
||||
.accounts-table__count
|
||||
= number_to_human account.followers_count, strip_insignificant_zeros: true
|
||||
%small= t('accounts.followers', count: account.followers_count).downcase
|
||||
.accounts-table__count
|
||||
- if account.last_status_at.present?
|
||||
%time.time-ago{ datetime: account.last_status_at.iso8601, title: l(account.last_status_at) }= l account.last_status_at
|
||||
- else
|
||||
= t('accounts.never_active')
|
||||
|
||||
- if @tags.empty? && !user_signed_in?
|
||||
.nothing-here
|
||||
- else
|
||||
- @tags.each do |tag|
|
||||
.directory__tag{ class: tag.id == @tag&.id ? 'active' : nil }
|
||||
= link_to explore_hashtag_path(tag) do
|
||||
%h4
|
||||
= fa_icon 'hashtag'
|
||||
= tag.name
|
||||
%small= t('directories.people', count: tag.accounts_count)
|
||||
%small= t('accounts.last_active')
|
||||
|
||||
.avatar-stack
|
||||
- tag.cached_sample_accounts.each do |account|
|
||||
= image_tag current_account&.user&.setting_auto_play_gif ? account.avatar_original_url : account.avatar_static_url, width: 48, height: 48, alt: '', class: 'account__avatar'
|
||||
= paginate @accounts
|
||||
|
5
app/views/errors/400.html.haml
Normal file
5
app/views/errors/400.html.haml
Normal file
@ -0,0 +1,5 @@
|
||||
- content_for :page_title do
|
||||
= t('errors.400')
|
||||
|
||||
- content_for :content do
|
||||
= t('errors.400')
|
5
app/views/errors/406.html.haml
Normal file
5
app/views/errors/406.html.haml
Normal file
@ -0,0 +1,5 @@
|
||||
- content_for :page_title do
|
||||
= t('errors.406')
|
||||
|
||||
- content_for :content do
|
||||
= t('errors.406')
|
5
app/views/errors/503.html.haml
Normal file
5
app/views/errors/503.html.haml
Normal file
@ -0,0 +1,5 @@
|
||||
- content_for :page_title do
|
||||
= t('errors.503')
|
||||
|
||||
- content_for :content do
|
||||
= t('errors.503')
|
@ -5,8 +5,7 @@
|
||||
= preload_link_tag asset_pack_path('features/notifications.js'), crossorigin: 'anonymous'
|
||||
|
||||
%meta{name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key}
|
||||
%script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
|
||||
|
||||
= render_initial_state
|
||||
= javascript_pack_tag 'application', integrity: true, crossorigin: 'anonymous'
|
||||
|
||||
.app-holder#mastodon{ data: { props: Oj.dump(default_props) } }
|
||||
|
@ -4,10 +4,21 @@
|
||||
- content_for :content do
|
||||
.admin-wrapper
|
||||
.sidebar-wrapper
|
||||
.sidebar
|
||||
%div{:class => ("logo")}
|
||||
.sidebar-wrapper__inner
|
||||
.sidebar
|
||||
= link_to root_path do
|
||||
= image_pack_tag 'logo.svg', class: 'logo', alt: 'Mastodon'
|
||||
|
||||
.sidebar__toggle
|
||||
.sidebar__toggle__logo
|
||||
= link_to root_path do
|
||||
= svg_logo_full
|
||||
|
||||
= link_to '#', class: 'sidebar__toggle__icon' do
|
||||
= fa_icon 'bars'
|
||||
|
||||
= render_navigation
|
||||
|
||||
= render_navigation
|
||||
.content-wrapper
|
||||
.content
|
||||
%h2= yield :page_title
|
||||
@ -16,4 +27,6 @@
|
||||
|
||||
= yield
|
||||
|
||||
.sidebar-wrapper.sidebar-wrapper--empty
|
||||
|
||||
= render template: 'layouts/application'
|
||||
|
@ -1,4 +1,5 @@
|
||||
- content_for :header_tags do
|
||||
= render_initial_state
|
||||
= javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
|
||||
|
||||
- content_for :content do
|
||||
@ -10,10 +11,13 @@
|
||||
= link_to root_url, class: 'brand' do
|
||||
= site_title
|
||||
|
||||
= link_to t('directories.directory'), explore_path, class: 'nav-link optional' if Setting.profile_directory
|
||||
= link_to t('about.about_this'), about_more_path, class: 'nav-link optional'
|
||||
= link_to t('about.apps'), 'https://joinmastodon.org/apps', class: 'nav-link optional'
|
||||
- unless whitelist_mode?
|
||||
= link_to t('directories.directory'), explore_path, class: 'nav-link optional' if Setting.profile_directory
|
||||
= link_to t('about.about_this'), about_more_path, class: 'nav-link optional'
|
||||
= link_to t('about.apps'), 'https://joinmastodon.org/apps', class: 'nav-link optional'
|
||||
|
||||
.nav-center
|
||||
|
||||
.nav-right
|
||||
- if user_signed_in?
|
||||
= link_to t('settings.back'), root_url, class: 'nav-link nav-button webapp-btn'
|
||||
|
@ -1,4 +1,5 @@
|
||||
- i ||= 0
|
||||
- highlighted ||= false
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0, dir: 'ltr' }
|
||||
%tbody
|
||||
@ -14,7 +15,7 @@
|
||||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.column-cell.padded.status
|
||||
%td.column-cell.padded.status{ class: highlighted ? 'status--highlighted' : '' }
|
||||
%table.status-header{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
@ -32,5 +33,13 @@
|
||||
%div{ dir: rtl_status?(status) ? 'rtl' : 'ltr' }
|
||||
= Formatter.instance.format(status)
|
||||
|
||||
- if status.media_attachments.size > 0
|
||||
%p
|
||||
- status.media_attachments.each do |a|
|
||||
- if status.local?
|
||||
= link_to medium_url(a), medium_url(a)
|
||||
- else
|
||||
= link_to a.remote_url, a.remote_url
|
||||
|
||||
%p.status-footer
|
||||
= link_to l(status.created_at), web_url("statuses/#{status.id}")
|
||||
|
@ -17,7 +17,7 @@
|
||||
= application.name
|
||||
- else
|
||||
= link_to application.name, application.website, target: '_blank', rel: 'noopener'
|
||||
%th!= application.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.join('<br />')
|
||||
%th!= application.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.join(', ')
|
||||
%td= l application.created_at
|
||||
%td
|
||||
- unless application.superapp?
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
- content_for :header_tags do
|
||||
%meta{ name: 'robots', content: 'noindex' }/
|
||||
%script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
|
||||
= javascript_pack_tag 'about', integrity: true, crossorigin: 'anonymous'
|
||||
|
||||
.page-header
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
.public-layout
|
||||
.activity-stream.activity-stream--highlighted
|
||||
= render 'stream_entries/status', status: @status
|
||||
= render 'statuses/status', status: @status
|
||||
|
||||
= simple_form_for @remote_follow, as: :remote_follow, url: remote_interaction_path(@status) do |f|
|
||||
= render 'shared/error_messages', object: @remote_follow
|
||||
|
@ -1,13 +0,0 @@
|
||||
.account-card
|
||||
.detailed-status__display-name
|
||||
%div
|
||||
= image_tag account.avatar.url(:original), alt: '', width: 48, height: 48, class: 'avatar'
|
||||
|
||||
%span.display-name
|
||||
- account_url = local_assigns[:admin] ? admin_account_path(account.id) : TagManager.instance.url_for(account)
|
||||
= link_to account_url, class: 'detailed-status__display-name p-author h-card', target: '_blank', rel: 'noopener' do
|
||||
%strong.emojify= display_name(account, custom_emojify: true)
|
||||
%span @#{account.acct}
|
||||
|
||||
- if account.note?
|
||||
.account__header__content.emojify= Formatter.instance.simplified_format(account)
|
@ -1,4 +0,0 @@
|
||||
.post-follow-actions
|
||||
%div= link_to t('authorize_follow.post_follow.web'), web_url("accounts/#{@account.id}"), class: 'button button--block'
|
||||
%div= link_to t('authorize_follow.post_follow.return'), TagManager.instance.url_for(@account), class: 'button button--block'
|
||||
%div= t('authorize_follow.post_follow.close')
|
@ -1,3 +0,0 @@
|
||||
.form-container
|
||||
.flash-message#error_explanation
|
||||
= t('remote_unfollow.error')
|
@ -1,10 +0,0 @@
|
||||
- content_for :page_title do
|
||||
= t('remote_unfollow.title', acct: @account.acct)
|
||||
|
||||
.form-container
|
||||
.follow-prompt
|
||||
%h2= t('remote_unfollow.unfollowed')
|
||||
|
||||
= render 'application/card', account: @account
|
||||
|
||||
= render 'post_follow_actions'
|
29
app/views/settings/aliases/index.html.haml
Normal file
29
app/views/settings/aliases/index.html.haml
Normal file
@ -0,0 +1,29 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.aliases')
|
||||
|
||||
= simple_form_for @alias, url: settings_aliases_path do |f|
|
||||
= render 'shared/error_messages', object: @alias
|
||||
|
||||
%p.hint= t('aliases.hint_html')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.fields-group
|
||||
= f.input :acct, wrapper: :with_block_label, input_html: { autocapitalize: 'none', autocorrect: 'off' }
|
||||
|
||||
.actions
|
||||
= f.button :button, t('aliases.add_new'), type: :submit, class: 'button'
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.table-wrapper
|
||||
%table.table.inline-table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('simple_form.labels.account_alias.acct')
|
||||
%th
|
||||
%tbody
|
||||
- @aliases.each do |account_alias|
|
||||
%tr
|
||||
%td= account_alias.acct
|
||||
%td= table_link_to 'trash', t('aliases.remove'), settings_alias_path(account_alias), data: { method: :delete }
|
@ -2,15 +2,28 @@
|
||||
= t('settings.delete')
|
||||
|
||||
= simple_form_for @confirmation, url: settings_delete_path, method: :delete do |f|
|
||||
.warning
|
||||
%strong
|
||||
= fa_icon('warning')
|
||||
= t('deletes.warning_title')
|
||||
= t('deletes.warning_html')
|
||||
%p.hint= t('deletes.warning.before')
|
||||
|
||||
%p.hint= t('deletes.description_html')
|
||||
%ul.hint
|
||||
- if current_user.confirmed? && current_user.approved?
|
||||
%li.warning-hint= t('deletes.warning.irreversible')
|
||||
%li.warning-hint= t('deletes.warning.username_unavailable')
|
||||
%li.warning-hint= t('deletes.warning.data_removal')
|
||||
%li.warning-hint= t('deletes.warning.caches')
|
||||
- else
|
||||
%li.positive-hint= t('deletes.warning.email_change_html', path: edit_user_registration_path)
|
||||
%li.positive-hint= t('deletes.warning.email_reconfirmation_html', path: new_user_confirmation_path)
|
||||
%li.positive-hint= t('deletes.warning.email_contact_html', email: Setting.site_contact_email)
|
||||
%li.positive-hint= t('deletes.warning.username_available')
|
||||
|
||||
= f.input :password, placeholder: t('simple_form.labels.defaults.current_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.current_password'), :autocomplete => 'off' }, hint: t('deletes.confirm_password')
|
||||
%p.hint= t('deletes.warning.more_details_html', terms_path: terms_path)
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
- if current_user.encrypted_password.present?
|
||||
= f.input :password, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, hint: t('deletes.confirm_password')
|
||||
- else
|
||||
= f.input :username, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, hint: t('deletes.confirm_username')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('deletes.proceed'), type: :submit, class: 'negative'
|
||||
|
@ -37,12 +37,16 @@
|
||||
%td= number_with_delimiter @export.total_domain_blocks
|
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_domain_blocks_path(format: :csv)
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
%p.muted-hint= t('exports.archive_takeout.hint_html')
|
||||
|
||||
- if policy(:backup).create?
|
||||
%p= link_to t('exports.archive_takeout.request'), settings_export_path, class: 'button', method: :post
|
||||
|
||||
- unless @backups.empty?
|
||||
%hr.spacer/
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
|
@ -1,6 +1,10 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.featured_tags')
|
||||
|
||||
%p= t('featured_tags.hint_html')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
= simple_form_for @featured_tag, url: settings_featured_tags_path do |f|
|
||||
= render 'shared/error_messages', object: @featured_tag
|
||||
|
||||
|
27
app/views/settings/migration/redirects/new.html.haml
Normal file
27
app/views/settings/migration/redirects/new.html.haml
Normal file
@ -0,0 +1,27 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.migrate')
|
||||
|
||||
= simple_form_for @redirect, url: settings_migration_redirect_path do |f|
|
||||
%p.hint= t('migrations.warning.before')
|
||||
|
||||
%ul.hint
|
||||
%li.warning-hint= t('migrations.warning.redirect')
|
||||
%li.warning-hint= t('migrations.warning.other_data')
|
||||
%li.warning-hint= t('migrations.warning.disabled_account')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
= render 'shared/error_messages', object: @redirect
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
= f.input :acct, wrapper: :with_block_label, input_html: { autocapitalize: 'none', autocorrect: 'off' }, label: t('simple_form.labels.account_migration.acct'), hint: t('simple_form.hints.account_migration.acct')
|
||||
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
- if current_user.encrypted_password.present?
|
||||
= f.input :current_password, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, required: true
|
||||
- else
|
||||
= f.input :current_username, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, required: true
|
||||
|
||||
.actions
|
||||
= f.button :button, t('migrations.set_redirect'), type: :submit, class: 'button button--destructive'
|
@ -1,17 +1,89 @@
|
||||
- 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')
|
||||
.simple_form
|
||||
- if current_account.moved_to_account.present?
|
||||
.fields-row
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
= render 'application/card', account: current_account.moved_to_account
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
%p.hint
|
||||
%span.positive-hint= t('migrations.redirecting_to', acct: current_account.moved_to_account.acct)
|
||||
|
||||
.fields-group
|
||||
= render partial: 'application/card', locals: { account: @migration.account }
|
||||
%p.hint= t('migrations.cancel_explanation')
|
||||
|
||||
%p.hint= link_to t('migrations.cancel'), settings_migration_redirect_path, data: { method: :delete }
|
||||
- else
|
||||
%p.hint
|
||||
%span.positive-hint= t('migrations.not_redirecting')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
%h3= t('auth.migrate_account')
|
||||
|
||||
= simple_form_for @migration, url: settings_migration_path do |f|
|
||||
- if on_cooldown?
|
||||
%p.hint
|
||||
%span.warning-hint= t('migrations.on_cooldown', count: ((@cooldown.cooldown_at - Time.now.utc) / 1.day.seconds).ceil)
|
||||
- else
|
||||
%p.hint= t('migrations.warning.before')
|
||||
|
||||
%ul.hint
|
||||
%li.warning-hint= t('migrations.warning.followers')
|
||||
%li.warning-hint= t('migrations.warning.redirect')
|
||||
%li.warning-hint= t('migrations.warning.other_data')
|
||||
%li.warning-hint= t('migrations.warning.backreference_required')
|
||||
%li.warning-hint= t('migrations.warning.cooldown')
|
||||
%li.warning-hint= t('migrations.warning.disabled_account')
|
||||
|
||||
%p.hint= t('migrations.warning.only_redirect_html', path: new_settings_migration_redirect_path)
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
= render 'shared/error_messages', object: @migration
|
||||
|
||||
.fields-group
|
||||
= f.input :acct, placeholder: t('migrations.acct')
|
||||
.fields-row
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
= f.input :acct, wrapper: :with_block_label, input_html: { autocapitalize: 'none', autocorrect: 'off' }, disabled: on_cooldown?
|
||||
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
- if current_user.encrypted_password.present?
|
||||
= f.input :current_password, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, required: true, disabled: on_cooldown?
|
||||
- else
|
||||
= f.input :current_username, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, required: true, disabled: on_cooldown?
|
||||
|
||||
.actions
|
||||
= f.button :button, t('migrations.proceed'), type: :submit, class: 'negative'
|
||||
= f.button :button, t('migrations.proceed_with_move'), type: :submit, class: 'button button--destructive', disabled: on_cooldown?
|
||||
|
||||
- unless @migrations.empty?
|
||||
%hr.spacer/
|
||||
|
||||
%h3= t 'migrations.past_migrations'
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.table-wrapper
|
||||
%table.table.inline-table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('migrations.acct')
|
||||
%th= t('migrations.followers_count')
|
||||
%th
|
||||
%tbody
|
||||
- @migrations.each do |migration|
|
||||
%tr
|
||||
%td
|
||||
- if migration.target_account.present?
|
||||
= compact_account_link_to migration.target_account
|
||||
- else
|
||||
= migration.acct
|
||||
|
||||
%td= number_with_delimiter migration.followers_count
|
||||
|
||||
%td
|
||||
%time.time-ago{ datetime: migration.created_at.iso8601, title: l(migration.created_at) }= l(migration.created_at)
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
%h3= t 'migrations.incoming_migrations'
|
||||
%p.muted-hint= t('migrations.incoming_migrations_html', path: settings_aliases_path)
|
||||
|
@ -17,11 +17,19 @@
|
||||
|
||||
%h4= t 'appearance.animations_and_accessibility'
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_use_pending_items, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_auto_play_gif, as: :boolean, wrapper: :with_label, recommended: true
|
||||
= f.input :setting_reduce_motion, as: :boolean, wrapper: :with_label
|
||||
= f.input :setting_system_font_ui, as: :boolean, wrapper: :with_label
|
||||
|
||||
%h4= t 'appearance.discovery'
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_trends, as: :boolean, wrapper: :with_label
|
||||
|
||||
%h4= t 'appearance.confirmation_dialogs'
|
||||
|
||||
.fields-group
|
||||
@ -34,6 +42,9 @@
|
||||
.fields-group
|
||||
= f.input :setting_display_media, collection: ['default', 'show_all', 'hide_all'],label_method: lambda { |item| t("simple_form.hints.defaults.setting_display_media_#{item}") }, hint: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', wrapper: :with_floating_label
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_use_blurhash, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_expand_spoilers, as: :boolean, wrapper: :with_label
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
- if current_user.staff?
|
||||
= ff.input :report, as: :boolean, wrapper: :with_label
|
||||
= ff.input :pending_account, as: :boolean, wrapper: :with_label
|
||||
= ff.input :trending_tag, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff|
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
- if Setting.profile_directory
|
||||
.fields-group
|
||||
= f.input :discoverable, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.discoverable_html', min_followers: Account::MIN_FOLLOWERS_DISCOVERY, path: explore_path), recommended: true
|
||||
= f.input :discoverable, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.discoverable'), recommended: true
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
@ -60,6 +60,11 @@
|
||||
%h6= t('auth.migrate_account')
|
||||
%p.muted-hint= t('auth.migrate_account_html', path: settings_migration_path)
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
%h6= t 'migrations.incoming_migrations'
|
||||
%p.muted-hint= t('migrations.incoming_migrations_html', path: settings_aliases_path)
|
||||
|
||||
- if open_deletion?
|
||||
%hr.spacer/
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
%samp.qr-alternative__code= current_user.otp_secret.scan(/.{4}/).join(' ')
|
||||
|
||||
.fields-group
|
||||
= f.input :code, wrapper: :with_label, hint: t('two_factor_authentication.code_hint'), label: t('simple_form.labels.defaults.otp_attempt'), input_html: { :autocomplete => 'off' }, required: true
|
||||
= f.input :otp_attempt, wrapper: :with_label, hint: t('two_factor_authentication.code_hint'), label: t('simple_form.labels.defaults.otp_attempt'), input_html: { :autocomplete => 'off' }, required: true
|
||||
|
||||
.actions
|
||||
= f.button :button, t('two_factor_authentication.enable'), type: :submit
|
||||
|
@ -2,33 +2,35 @@
|
||||
= t('settings.two_factor_authentication')
|
||||
|
||||
- if current_user.otp_required_for_login
|
||||
%p.positive-hint
|
||||
= fa_icon 'check'
|
||||
= ' '
|
||||
= t 'two_factor_authentication.enabled'
|
||||
%p.hint
|
||||
%span.positive-hint
|
||||
= fa_icon 'check'
|
||||
= ' '
|
||||
= t 'two_factor_authentication.enabled'
|
||||
|
||||
%hr/
|
||||
%hr.spacer/
|
||||
|
||||
= simple_form_for @confirmation, url: settings_two_factor_authentication_path, method: :delete do |f|
|
||||
= f.input :code, wrapper: :with_label, hint: t('two_factor_authentication.code_hint'), label: t('simple_form.labels.defaults.otp_attempt'), input_html: { :autocomplete => 'off' }, required: true
|
||||
.fields-group
|
||||
= f.input :otp_attempt, wrapper: :with_block_label, hint: t('two_factor_authentication.code_hint'), label: t('simple_form.labels.defaults.otp_attempt'), input_html: { :autocomplete => 'off' }, required: true
|
||||
|
||||
.actions
|
||||
= f.button :button, t('two_factor_authentication.disable'), type: :submit
|
||||
= f.button :button, t('two_factor_authentication.disable'), type: :submit, class: 'negative'
|
||||
|
||||
%hr/
|
||||
%hr.spacer/
|
||||
|
||||
%h6= t('two_factor_authentication.recovery_codes')
|
||||
%p.muted-hint
|
||||
= t('two_factor_authentication.lost_recovery_codes')
|
||||
= link_to t('two_factor_authentication.generate_recovery_codes'),
|
||||
settings_two_factor_authentication_recovery_codes_path,
|
||||
data: { method: :post }
|
||||
%h3= t('two_factor_authentication.recovery_codes')
|
||||
%p.muted-hint= t('two_factor_authentication.lost_recovery_codes')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.simple_form
|
||||
= link_to t('two_factor_authentication.generate_recovery_codes'), settings_two_factor_authentication_recovery_codes_path, data: { method: :post }, class: 'block-button'
|
||||
|
||||
- else
|
||||
.simple_form
|
||||
%p.hint= t('two_factor_authentication.description_html')
|
||||
|
||||
= link_to t('two_factor_authentication.setup'),
|
||||
settings_two_factor_authentication_path,
|
||||
data: { method: :post },
|
||||
class: 'block-button'
|
||||
%hr.spacer/
|
||||
|
||||
= link_to t('two_factor_authentication.setup'), settings_two_factor_authentication_path, data: { method: :post }, class: 'block-button'
|
||||
|
@ -1,5 +1,5 @@
|
||||
- thumbnail = @instance_presenter.thumbnail
|
||||
- description = strip_tags(@instance_presenter.site_short_description.presence || @instance_presenter.site_description.presence || t('about.about_mastodon_html'))
|
||||
- thumbnail = @instance_presenter.thumbnail
|
||||
- description ||= strip_tags(@instance_presenter.site_short_description.presence || @instance_presenter.site_description.presence || t('about.about_mastodon_html'))
|
||||
|
||||
%meta{ name: 'description', content: description }/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
- content_for :header_tags do
|
||||
%script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
|
||||
= render_initial_state
|
||||
= javascript_pack_tag 'share', integrity: true, crossorigin: 'anonymous'
|
||||
|
||||
#mastodon-compose{ data: { props: Oj.dump(default_props) } }
|
||||
|
@ -1,6 +1,6 @@
|
||||
.detailed-status.detailed-status--flex
|
||||
.p-author.h-card
|
||||
= link_to TagManager.instance.url_for(status.account), class: 'detailed-status__display-name u-url', target: stream_link_target, rel: 'noopener' do
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status.account), class: 'detailed-status__display-name u-url', target: stream_link_target, rel: 'noopener' do
|
||||
.detailed-status__display-avatar
|
||||
- if current_account&.user&.setting_auto_play_gif || autoplay
|
||||
= image_tag status.account.avatar_original_url, width: 48, height: 48, alt: '', class: 'account__avatar u-photo'
|
||||
@ -24,23 +24,27 @@
|
||||
= Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay)
|
||||
- if status.preloadable_poll
|
||||
= react_component :poll, disabled: true, poll: ActiveModelSerializers::SerializableResource.new(status.preloadable_poll, serializer: REST::PollSerializer, scope: current_user, scope_name: :current_user).as_json do
|
||||
= render partial: 'stream_entries/poll', locals: { status: status, poll: status.preloadable_poll, autoplay: autoplay }
|
||||
= render partial: 'statuses/poll', locals: { status: status, poll: status.preloadable_poll, autoplay: autoplay }
|
||||
|
||||
- if !status.media_attachments.empty?
|
||||
- if status.media_attachments.first.audio_or_video?
|
||||
- if status.media_attachments.first.video?
|
||||
- video = status.media_attachments.first
|
||||
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, width: 670, height: 380, detailed: true, inline: true, alt: video.description do
|
||||
= render partial: 'stream_entries/attachment_list', locals: { attachments: status.media_attachments }
|
||||
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
|
||||
- elsif status.media_attachments.first.audio?
|
||||
- audio = status.media_attachments.first
|
||||
= react_component :audio, src: audio.file.url(:original), height: 130, alt: audio.description, preload: true, duration: audio.file.meta.dig(:original, :duration) do
|
||||
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
|
||||
- else
|
||||
= react_component :media_gallery, height: 380, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif || autoplay, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } do
|
||||
= render partial: 'stream_entries/attachment_list', locals: { attachments: status.media_attachments }
|
||||
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
|
||||
- elsif status.preview_card
|
||||
= react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json
|
||||
|
||||
.detailed-status__meta
|
||||
%data.dt-published{ value: status.created_at.to_time.iso8601 }
|
||||
|
||||
= link_to TagManager.instance.url_for(status), class: 'detailed-status__datetime u-url u-uid', target: stream_link_target, rel: 'noopener' do
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'detailed-status__datetime u-url u-uid', target: stream_link_target, rel: 'noopener' do
|
||||
%time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
|
||||
·
|
||||
- if status.application && @account.user&.setting_show_application
|
@ -1,15 +1,20 @@
|
||||
- show_results = (user_signed_in? && poll.voted?(current_account)) || poll.expired?
|
||||
- own_votes = user_signed_in? ? poll.own_votes(current_account) : []
|
||||
- total_votes_count = poll.voters_count || poll.votes_count
|
||||
|
||||
.poll
|
||||
%ul
|
||||
- poll.loaded_options.each do |option|
|
||||
- poll.loaded_options.each_with_index do |option, index|
|
||||
%li
|
||||
- if show_results
|
||||
- percent = poll.votes_count > 0 ? 100 * option.votes_count / poll.votes_count : 0
|
||||
- percent = total_votes_count > 0 ? 100 * option.votes_count / total_votes_count : 0
|
||||
%span.poll__chart{ style: "width: #{percent}%" }
|
||||
|
||||
%label.poll__text><
|
||||
%span.poll__number= percent.round
|
||||
%span.poll__number><
|
||||
- if own_votes.include?(index)
|
||||
%i.poll__vote__mark.fa.fa-check
|
||||
= percent.round
|
||||
= Formatter.instance.format_poll_option(status, option, autoplay: autoplay)
|
||||
- else
|
||||
%label.poll__text><
|
||||
@ -20,7 +25,10 @@
|
||||
%button.button.button-secondary{ disabled: true }
|
||||
= t('statuses.poll.vote')
|
||||
|
||||
%span= t('statuses.poll.total_votes', count: poll.votes_count)
|
||||
- if poll.voters_count.nil?
|
||||
%span= t('statuses.poll.total_votes', count: poll.votes_count)
|
||||
- else
|
||||
%span= t('statuses.poll.total_people', count: poll.voters_count)
|
||||
|
||||
- unless poll.expires_at.nil?
|
||||
·
|
@ -1,11 +1,11 @@
|
||||
.status
|
||||
.status__info
|
||||
= link_to TagManager.instance.url_for(status), class: 'status__relative-time u-url u-uid', target: stream_link_target, rel: 'noopener' do
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'status__relative-time u-url u-uid', target: stream_link_target, rel: 'noopener' do
|
||||
%time.time-ago{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
|
||||
%data.dt-published{ value: status.created_at.to_time.iso8601 }
|
||||
|
||||
.p-author.h-card
|
||||
= link_to TagManager.instance.url_for(status.account), class: 'status__display-name u-url', target: stream_link_target, rel: 'noopener' do
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status.account), class: 'status__display-name u-url', target: stream_link_target, rel: 'noopener' do
|
||||
.status__avatar
|
||||
%div
|
||||
- if current_account&.user&.setting_auto_play_gif || autoplay
|
||||
@ -28,16 +28,20 @@
|
||||
= Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay)
|
||||
- if status.preloadable_poll
|
||||
= react_component :poll, disabled: true, poll: ActiveModelSerializers::SerializableResource.new(status.preloadable_poll, serializer: REST::PollSerializer, scope: current_user, scope_name: :current_user).as_json do
|
||||
= render partial: 'stream_entries/poll', locals: { status: status, poll: status.preloadable_poll, autoplay: autoplay }
|
||||
= render partial: 'statuses/poll', locals: { status: status, poll: status.preloadable_poll, autoplay: autoplay }
|
||||
|
||||
- if !status.media_attachments.empty?
|
||||
- if status.media_attachments.first.audio_or_video?
|
||||
- if status.media_attachments.first.video?
|
||||
- video = status.media_attachments.first
|
||||
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, width: 610, height: 343, inline: true, alt: video.description do
|
||||
= render partial: 'stream_entries/attachment_list', locals: { attachments: status.media_attachments }
|
||||
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
|
||||
- elsif status.media_attachments.first.audio?
|
||||
- audio = status.media_attachments.first
|
||||
= react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, duration: audio.file.meta.dig(:original, :duration) do
|
||||
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
|
||||
- else
|
||||
= react_component :media_gallery, height: 343, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif || autoplay, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } do
|
||||
= render partial: 'stream_entries/attachment_list', locals: { attachments: status.media_attachments }
|
||||
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
|
||||
- elsif status.preview_card
|
||||
= react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json
|
||||
|
||||
@ -50,9 +54,9 @@
|
||||
= fa_icon 'reply-all fw'
|
||||
.status__action-bar__counter__label= obscured_counter status.replies_count
|
||||
= link_to remote_interaction_path(status, type: :reblog), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do
|
||||
- if status.public_visibility? || status.unlisted_visibility?
|
||||
- if status.distributable?
|
||||
= fa_icon 'retweet fw'
|
||||
- elsif status.private_visibility?
|
||||
- elsif status.private_visibility? || status.limited_visibility?
|
||||
= fa_icon 'lock fw'
|
||||
- else
|
||||
= fa_icon 'envelope fw'
|
@ -17,9 +17,9 @@
|
||||
- if status.reply? && include_threads
|
||||
- if @next_ancestor
|
||||
.entry{ class: entry_classes }
|
||||
= link_to_more TagManager.instance.url_for(@next_ancestor)
|
||||
= link_to_more ActivityPub::TagManager.instance.url_for(@next_ancestor)
|
||||
|
||||
= render partial: 'stream_entries/status', collection: @ancestors, as: :status, locals: { is_predecessor: true, direct_reply_id: status.in_reply_to_id }, autoplay: autoplay
|
||||
= render partial: 'statuses/status', collection: @ancestors, as: :status, locals: { is_predecessor: true, direct_reply_id: status.in_reply_to_id }, autoplay: autoplay
|
||||
|
||||
.entry{ class: entry_classes }
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
.status__prepend-icon-wrapper
|
||||
%i.status__prepend-icon.fa.fa-fw.fa-retweet
|
||||
%span
|
||||
= link_to TagManager.instance.url_for(status.account), class: 'status__display-name muted' do
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status.account), class: 'status__display-name muted' do
|
||||
%bdi
|
||||
%strong.emojify= display_name(status.account, custom_emojify: true)
|
||||
= t('stream_entries.reblogged')
|
||||
@ -39,18 +39,18 @@
|
||||
%span
|
||||
= t('stream_entries.pinned')
|
||||
|
||||
= render (centered ? 'stream_entries/detailed_status' : 'stream_entries/simple_status'), status: status.proper, autoplay: autoplay
|
||||
= render (centered ? 'statuses/detailed_status' : 'statuses/simple_status'), status: status.proper, autoplay: autoplay
|
||||
|
||||
- if include_threads
|
||||
- if @since_descendant_thread_id
|
||||
.entry{ class: entry_classes }
|
||||
= link_to_more short_account_status_url(status.account.username, status, max_descendant_thread_id: @since_descendant_thread_id + 1)
|
||||
- @descendant_threads.each do |thread|
|
||||
= render partial: 'stream_entries/status', collection: thread[:statuses], as: :status, locals: { is_successor: true, parent_id: status.id }, autoplay: autoplay
|
||||
= render partial: 'statuses/status', collection: thread[:statuses], as: :status, locals: { is_successor: true, parent_id: status.id }, autoplay: autoplay
|
||||
|
||||
- if thread[:next_status]
|
||||
.entry{ class: entry_classes }
|
||||
= link_to_more TagManager.instance.url_for(thread[:next_status])
|
||||
= link_to_more ActivityPub::TagManager.instance.url_for(thread[:next_status])
|
||||
- if @next_descendant_thread
|
||||
.entry{ class: entry_classes }
|
||||
= link_to_more short_account_status_url(status.account.username, status, since_descendant_thread_id: @max_descendant_thread_id - 1)
|
3
app/views/statuses/embed.html.haml
Normal file
3
app/views/statuses/embed.html.haml
Normal file
@ -0,0 +1,3 @@
|
||||
- cache @status do
|
||||
.activity-stream.activity-stream--headless
|
||||
= render 'status', status: @status, centered: true, autoplay: @autoplay
|
@ -1,3 +0,0 @@
|
||||
- cache @stream_entry.activity do
|
||||
.activity-stream.activity-stream--headless
|
||||
= render "stream_entries/#{@type}", @type.to_sym => @stream_entry.activity, centered: true, autoplay: @autoplay
|
@ -1,25 +0,0 @@
|
||||
- content_for :page_title do
|
||||
= t('statuses.title', name: display_name(@account), quote: truncate(@stream_entry.activity.spoiler_text.presence || @stream_entry.activity.text, length: 50, omission: '…', escape: false))
|
||||
|
||||
- content_for :header_tags do
|
||||
- if @account.user&.setting_noindex
|
||||
%meta{ name: 'robots', content: 'noindex, noarchive' }/
|
||||
|
||||
%link{ rel: 'alternate', type: 'application/atom+xml', href: account_stream_entry_url(@account, @stream_entry, format: 'atom') }/
|
||||
%link{ rel: 'alternate', type: 'application/json+oembed', href: api_oembed_url(url: account_stream_entry_url(@account, @stream_entry), format: 'json') }/
|
||||
%link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(@stream_entry.activity) }/
|
||||
|
||||
= opengraph 'og:site_name', site_title
|
||||
= opengraph 'og:type', 'article'
|
||||
= opengraph 'og:title', "#{display_name(@account)} (@#{@account.local_username_and_domain})"
|
||||
= opengraph 'og:url', short_account_status_url(@account, @stream_entry.activity)
|
||||
|
||||
= render 'stream_entries/og_description', activity: @stream_entry.activity
|
||||
= render 'stream_entries/og_image', activity: @stream_entry.activity, account: @account
|
||||
|
||||
.grid
|
||||
.column-0
|
||||
.activity-stream.h-entry
|
||||
= render partial: "stream_entries/#{@type}", locals: { @type.to_sym => @stream_entry.activity, include_threads: true }
|
||||
.column-1
|
||||
= render 'application/sidebar'
|
@ -5,7 +5,6 @@
|
||||
%meta{ name: 'robots', content: 'noindex' }/
|
||||
%link{ rel: 'alternate', type: 'application/rss+xml', href: tag_url(@tag, format: 'rss') }/
|
||||
|
||||
%script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
|
||||
= javascript_pack_tag 'about', integrity: true, crossorigin: 'anonymous'
|
||||
= render 'og'
|
||||
|
||||
|
43
app/views/user_mailer/two_factor_disabled.html.haml
Normal file
43
app/views/user_mailer/two_factor_disabled.html.haml
Normal file
@ -0,0 +1,43 @@
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.email-body
|
||||
.email-container
|
||||
%table.content-section{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.content-cell.hero
|
||||
.email-row
|
||||
.col-6
|
||||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.column-cell.text-center.padded
|
||||
%table.hero-icon.alert-icon{ align: 'center', cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td
|
||||
= image_tag full_pack_url('media/images/mailer/icon_lock_open.png'), alt: ''
|
||||
|
||||
%h1= t 'devise.mailer.two_factor_disabled.title'
|
||||
%p.lead= t 'devise.mailer.two_factor_disabled.explanation'
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.email-body
|
||||
.email-container
|
||||
%table.content-section{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.content-cell.content-start
|
||||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.column-cell.button-cell
|
||||
%table.button{ align: 'center', cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.button-primary
|
||||
= link_to edit_user_registration_url do
|
||||
%span= t('settings.account_settings')
|
7
app/views/user_mailer/two_factor_disabled.text.erb
Normal file
7
app/views/user_mailer/two_factor_disabled.text.erb
Normal file
@ -0,0 +1,7 @@
|
||||
<%= t 'devise.mailer.two_factor_disabled.title' %>
|
||||
|
||||
===
|
||||
|
||||
<%= t 'devise.mailer.two_factor_disabled.explanation' %>
|
||||
|
||||
=> <%= edit_user_registration_url %>
|
43
app/views/user_mailer/two_factor_enabled.html.haml
Normal file
43
app/views/user_mailer/two_factor_enabled.html.haml
Normal file
@ -0,0 +1,43 @@
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.email-body
|
||||
.email-container
|
||||
%table.content-section{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.content-cell.hero
|
||||
.email-row
|
||||
.col-6
|
||||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.column-cell.text-center.padded
|
||||
%table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td
|
||||
= image_tag full_pack_url('media/images/mailer/icon_lock_open.png'), alt: ''
|
||||
|
||||
%h1= t 'devise.mailer.two_factor_enabled.title'
|
||||
%p.lead= t 'devise.mailer.two_factor_enabled.explanation'
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.email-body
|
||||
.email-container
|
||||
%table.content-section{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.content-cell.content-start
|
||||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.column-cell.button-cell
|
||||
%table.button{ align: 'center', cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.button-primary
|
||||
= link_to edit_user_registration_url do
|
||||
%span= t('settings.account_settings')
|
7
app/views/user_mailer/two_factor_enabled.text.erb
Normal file
7
app/views/user_mailer/two_factor_enabled.text.erb
Normal file
@ -0,0 +1,7 @@
|
||||
<%= t 'devise.mailer.two_factor_enabled.title' %>
|
||||
|
||||
===
|
||||
|
||||
<%= t 'devise.mailer.two_factor_enabled.explanation' %>
|
||||
|
||||
=> <%= edit_user_registration_url %>
|
@ -0,0 +1,43 @@
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.email-body
|
||||
.email-container
|
||||
%table.content-section{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.content-cell.hero
|
||||
.email-row
|
||||
.col-6
|
||||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.column-cell.text-center.padded
|
||||
%table.hero-icon.alert-icon{ align: 'center', cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td
|
||||
= image_tag full_pack_url('media/images/mailer/icon_lock_open.png'), alt: ''
|
||||
|
||||
%h1= t 'devise.mailer.two_factor_recovery_codes_changed.title'
|
||||
%p.lead= t 'devise.mailer.two_factor_recovery_codes_changed.explanation'
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.email-body
|
||||
.email-container
|
||||
%table.content-section{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.content-cell.content-start
|
||||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.column-cell.button-cell
|
||||
%table.button{ align: 'center', cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.button-primary
|
||||
= link_to edit_user_registration_url do
|
||||
%span= t('settings.account_settings')
|
@ -0,0 +1,7 @@
|
||||
<%= t 'devise.mailer.two_factor_recovery_codes_changed.title' %>
|
||||
|
||||
===
|
||||
|
||||
<%= t 'devise.mailer.two_factor_recovery_codes_changed.explanation' %>
|
||||
|
||||
=> <%= edit_user_registration_url %>
|
@ -42,6 +42,14 @@
|
||||
- unless @warning.text.blank?
|
||||
= Formatter.instance.linkify(@warning.text)
|
||||
|
||||
- if !@statuses.nil? && !@statuses.empty?
|
||||
%p
|
||||
%strong= t('user_mailer.warning.statuses')
|
||||
|
||||
- if !@statuses.nil? && !@statuses.empty?
|
||||
- @statuses.each_with_index do |status, i|
|
||||
= render 'notification_mailer/status', status: status, i: i + 1, highlighted: true
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
@ -50,7 +58,7 @@
|
||||
%table.content-section{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.content-cell
|
||||
%td.content-cell{ class: @statuses.nil? || @statuses.empty? ? '' : 'content-start' }
|
||||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
@ -61,3 +69,20 @@
|
||||
%td.button-primary
|
||||
= link_to about_more_url do
|
||||
%span= t 'user_mailer.warning.review_server_policies'
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.email-body
|
||||
.email-container
|
||||
%table.content-section{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.content-cell
|
||||
.email-row
|
||||
.col-6
|
||||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.column-cell.text-center
|
||||
%p= t 'user_mailer.warning.get_in_touch', instance: @instance
|
||||
|
@ -7,3 +7,16 @@
|
||||
|
||||
<% end %>
|
||||
<%= @warning.text %>
|
||||
<% if !@statuses.nil? && !@statuses.empty? %>
|
||||
<%= t('user_mailer.warning.statuses') %>
|
||||
|
||||
<% @statuses.each do |status| %>
|
||||
|
||||
<%= render 'notification_mailer/status', status: status %>
|
||||
---
|
||||
<% end %>
|
||||
<% else %>
|
||||
---
|
||||
<% end %>
|
||||
|
||||
<%= t 'user_mailer.warning.get_in_touch', instance: @instance %>
|
||||
|
@ -1,44 +0,0 @@
|
||||
doc = Ox::Document.new(version: '1.0')
|
||||
|
||||
doc << Ox::Element.new('XRD').tap do |xrd|
|
||||
xrd['xmlns'] = 'http://docs.oasis-open.org/ns/xri/xrd-1.0'
|
||||
|
||||
xrd << (Ox::Element.new('Subject') << @account.to_webfinger_s)
|
||||
xrd << (Ox::Element.new('Alias') << short_account_url(@account))
|
||||
xrd << (Ox::Element.new('Alias') << account_url(@account))
|
||||
|
||||
xrd << Ox::Element.new('Link').tap do |link|
|
||||
link['rel'] = 'http://webfinger.net/rel/profile-page'
|
||||
link['type'] = 'text/html'
|
||||
link['href'] = short_account_url(@account)
|
||||
end
|
||||
|
||||
xrd << Ox::Element.new('Link').tap do |link|
|
||||
link['rel'] = 'http://schemas.google.com/g/2010#updates-from'
|
||||
link['type'] = 'application/atom+xml'
|
||||
link['href'] = account_url(@account, format: 'atom')
|
||||
end
|
||||
|
||||
xrd << Ox::Element.new('Link').tap do |link|
|
||||
link['rel'] = 'self'
|
||||
link['type'] = 'application/activity+json'
|
||||
link['href'] = account_url(@account)
|
||||
end
|
||||
|
||||
xrd << Ox::Element.new('Link').tap do |link|
|
||||
link['rel'] = 'salmon'
|
||||
link['href'] = api_salmon_url(@account.id)
|
||||
end
|
||||
|
||||
xrd << Ox::Element.new('Link').tap do |link|
|
||||
link['rel'] = 'magic-public-key'
|
||||
link['href'] = "data:application/magic-public-key,#{@account.magic_key}"
|
||||
end
|
||||
|
||||
xrd << Ox::Element.new('Link').tap do |link|
|
||||
link['rel'] = 'http://ostatus.org/schema/1.0/subscribe'
|
||||
link['template'] = "#{authorize_interaction_url}?acct={uri}"
|
||||
end
|
||||
end
|
||||
|
||||
('<?xml version="1.0" encoding="UTF-8"?>' + Ox.dump(doc, effort: :tolerant)).force_encoding('UTF-8')
|
Reference in New Issue
Block a user