Merge commit '42698b4c5c
' into kb_migration
This commit is contained in:
commit
152b8eb4e6
215 changed files with 1302 additions and 914 deletions
|
@ -47,7 +47,7 @@
|
|||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
- if @accounts.any? { |account| account.user_pending? }
|
||||
- if @accounts.any?(&:user_pending?)
|
||||
= 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') }
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
.fields-group
|
||||
= text_area_tag :text, nil, placeholder: t('admin.reports.summary.warning_placeholder')
|
||||
|
||||
- if !@report.other?
|
||||
- unless @report.other?
|
||||
%p
|
||||
%strong= t('user_mailer.warning.reason')
|
||||
= t("user_mailer.warning.categories.#{@report.category}")
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
%button.button= t('admin.accounts.search')
|
||||
= link_to t('admin.accounts.reset'), admin_reports_path, class: 'button negative'
|
||||
|
||||
- @reports.group_by(&:target_account_id).each do |target_account_id, reports|
|
||||
- @reports.group_by(&:target_account_id).each do |_target_account_id, reports|
|
||||
- target_account = reports.first.target_account
|
||||
.report-card
|
||||
.report-card__profile
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
= t('simple_form.yes')
|
||||
- else
|
||||
= t('simple_form.no')
|
||||
- if !@report.action_taken_by_account.nil?
|
||||
- if @report.action_taken_by_account.present?
|
||||
.report-header__details__item
|
||||
.report-header__details__item__header
|
||||
%strong= t('admin.reports.action_taken_by')
|
||||
|
|
16
app/views/auth/registrations/_session.html.haml
Normal file
16
app/views/auth/registrations/_session.html.haml
Normal file
|
@ -0,0 +1,16 @@
|
|||
%tr
|
||||
%td
|
||||
%span{ title: session.user_agent }<
|
||||
= fa_icon "#{session_device_icon(session)} fw", 'aria-label': session_device_icon(session)
|
||||
= ' '
|
||||
= t 'sessions.description', browser: t("sessions.browsers.#{session.browser}", default: session.browser.to_s), platform: t("sessions.platforms.#{session.platform}", default: session.platform.to_s)
|
||||
%td
|
||||
%samp= session.ip
|
||||
%td
|
||||
- if current_session.session_id == session.session_id
|
||||
= t 'sessions.current_session'
|
||||
- else
|
||||
%time.time-ago{ datetime: session.updated_at.iso8601, title: l(session.updated_at) }= l(session.updated_at)
|
||||
%td
|
||||
- if current_session.session_id != session.session_id && !current_account.suspended?
|
||||
= table_link_to 'times', t('sessions.revoke'), settings_session_path(session), method: :delete
|
|
@ -14,21 +14,4 @@
|
|||
%th= t 'sessions.activity'
|
||||
%th
|
||||
%tbody
|
||||
- @sessions.each do |session|
|
||||
%tr
|
||||
%td
|
||||
%span{ title: session.user_agent }<
|
||||
= fa_icon "#{session_device_icon(session)} fw", 'aria-label': session_device_icon(session)
|
||||
= ' '
|
||||
= t 'sessions.description', browser: t("sessions.browsers.#{session.browser}", default: session.browser.to_s), platform: t("sessions.platforms.#{session.platform}", default: session.platform.to_s)
|
||||
%td
|
||||
%samp= session.ip
|
||||
%td
|
||||
- if current_session.session_id == session.session_id
|
||||
= t 'sessions.current_session'
|
||||
- else
|
||||
%time.time-ago{ datetime: session.updated_at.iso8601, title: l(session.updated_at) }= l(session.updated_at)
|
||||
%td
|
||||
- if current_session.session_id != session.session_id && !current_account.suspended?
|
||||
= table_link_to 'times', t('sessions.revoke'), settings_session_path(session), method: :delete
|
||||
|
||||
= render partial: 'session', collection: sessions
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
%hr.spacer/
|
||||
|
||||
= render 'sessions'
|
||||
= render partial: 'sessions', object: @sessions
|
||||
|
||||
- unless current_account.suspended?
|
||||
%hr.spacer/
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
= stylesheet_pack_tag 'common', media: 'all', crossorigin: 'anonymous'
|
||||
= stylesheet_pack_tag current_theme, media: 'all', crossorigin: 'anonymous'
|
||||
= javascript_pack_tag 'common', crossorigin: 'anonymous'
|
||||
= preload_pack_asset "locale/#{I18n.locale}-json.js", crossorigin: 'anonymous'
|
||||
= preload_pack_asset "locale/#{I18n.locale}-json.js"
|
||||
= csrf_meta_tags unless skip_csrf_meta_tags?
|
||||
%meta{ name: 'style-nonce', content: request.content_security_policy_nonce }
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
= stylesheet_pack_tag 'common', media: 'all', crossorigin: 'anonymous'
|
||||
= stylesheet_pack_tag Setting.default_settings['theme'], media: 'all', crossorigin: 'anonymous'
|
||||
= javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous'
|
||||
= preload_pack_asset "locale/#{I18n.locale}-json.js", crossorigin: 'anonymous'
|
||||
= preload_pack_asset "locale/#{I18n.locale}-json.js"
|
||||
= render_initial_state
|
||||
= javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
|
||||
%body.embed
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
.auto-dir
|
||||
= status_content_format(status)
|
||||
|
||||
- if status.ordered_media_attachments.size > 0
|
||||
- if status.ordered_media_attachments.size.positive?
|
||||
%p
|
||||
- status.ordered_media_attachments.each do |a|
|
||||
- if status.local?
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
%label= t('activerecord.attributes.doorkeeper/application.scopes')
|
||||
%span.hint= t('simple_form.hints.defaults.scopes')
|
||||
|
||||
- Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each do |k, v|
|
||||
= f.input :scopes, label: false, hint: false, collection: v.sort, wrapper: :with_block_label, include_blank: false, label_method: ->(scope) { safe_join([content_tag(:samp, scope, class: class_for_scope(scope)), content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) }, selected: f.object.scopes.all, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
- Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each do |_key, value|
|
||||
= f.input :scopes, label: false, hint: false, collection: value.sort, wrapper: :with_block_label, include_blank: false, label_method: ->(scope) { safe_join([content_tag(:samp, scope, class: class_for_scope(scope)), content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) }, selected: f.object.scopes.all, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
%h4= t 'appearance.sensitive_content'
|
||||
|
||||
.fields-group
|
||||
= ff.input :'web.display_media', collection: ['default', 'show_all', 'hide_all'], label_method: ->(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, label: I18n.t('simple_form.labels.defaults.setting_display_media')
|
||||
= ff.input :'web.display_media', collection: %w(default show_all hide_all), label_method: ->(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, label: I18n.t('simple_form.labels.defaults.setting_display_media')
|
||||
|
||||
.fields-group
|
||||
= ff.input :'web.display_media_expand', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_display_media_expand'), hint: I18n.t('simple_form.hints.defaults.setting_display_media_expand')
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
- content_for :header_tags do
|
||||
- if user_signed_in?
|
||||
= preload_pack_asset 'features/compose.js', crossorigin: 'anonymous'
|
||||
= preload_pack_asset 'features/home_timeline.js', crossorigin: 'anonymous'
|
||||
= preload_pack_asset 'features/notifications.js', crossorigin: 'anonymous'
|
||||
= preload_pack_asset 'features/compose.js'
|
||||
= preload_pack_asset 'features/home_timeline.js'
|
||||
= preload_pack_asset 'features/notifications.js'
|
||||
%meta{ name: 'initialPath', content: request.path }
|
||||
|
||||
%meta{ name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key }
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- poll.loaded_options.each_with_index do |option, index|
|
||||
%li
|
||||
- if show_results
|
||||
- percent = total_votes_count > 0 ? 100 * option.votes_count / total_votes_count : 0
|
||||
- percent = total_votes_count.positive? ? 100 * option.votes_count / total_votes_count : 0
|
||||
%label.poll__option><
|
||||
%span.poll__number><
|
||||
= "#{percent.round}%"
|
||||
|
|
|
@ -1,61 +1,2 @@
|
|||
:ruby
|
||||
pinned ||= false
|
||||
include_threads ||= false
|
||||
is_predecessor ||= false
|
||||
is_successor ||= false
|
||||
direct_reply_id ||= false
|
||||
parent_id ||= false
|
||||
is_direct_parent = direct_reply_id == status.id
|
||||
is_direct_child = parent_id == status.in_reply_to_id
|
||||
centered ||= include_threads && !is_predecessor && !is_successor
|
||||
h_class = microformats_h_class(status, is_predecessor, is_successor, include_threads)
|
||||
style_classes = style_classes(status, is_predecessor, is_successor, include_threads)
|
||||
mf_classes = microformats_classes(status, is_direct_parent, is_direct_child)
|
||||
entry_classes = "#{h_class} #{mf_classes} #{style_classes}"
|
||||
|
||||
- if status.reply? && include_threads
|
||||
- if @next_ancestor
|
||||
.entry{ class: entry_classes }
|
||||
= link_to_older ActivityPub::TagManager.instance.url_for(@next_ancestor)
|
||||
|
||||
= render partial: 'statuses/status', collection: @ancestors, as: :status, locals: { is_predecessor: true, direct_reply_id: status.in_reply_to_id }
|
||||
|
||||
.entry{ class: entry_classes }
|
||||
|
||||
- if status.reblog?
|
||||
.status__prepend
|
||||
.status__prepend-icon-wrapper
|
||||
%i.status__prepend-icon.fa.fa-fw.fa-retweet
|
||||
%span
|
||||
= 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')
|
||||
- elsif pinned
|
||||
.status__prepend
|
||||
.status__prepend-icon-wrapper
|
||||
%i.status__prepend-icon.fa.fa-fw.fa-thumb-tack
|
||||
%span
|
||||
= t('stream_entries.pinned')
|
||||
|
||||
= render (centered ? 'statuses/detailed_status' : 'statuses/simple_status'), status: status.proper, hide_show_thread: is_predecessor || is_successor
|
||||
|
||||
- if include_threads
|
||||
- if @since_descendant_thread_id
|
||||
.entry{ class: entry_classes }
|
||||
= link_to_newer short_account_status_url(status.account.username, status, max_descendant_thread_id: @since_descendant_thread_id + 1)
|
||||
- @descendant_threads.each do |thread|
|
||||
= render partial: 'statuses/status', collection: thread[:statuses], as: :status, locals: { is_successor: true, parent_id: status.id }
|
||||
|
||||
- if thread[:next_status]
|
||||
.entry{ class: entry_classes }
|
||||
= link_to_newer ActivityPub::TagManager.instance.url_for(thread[:next_status])
|
||||
- if @next_descendant_thread
|
||||
.entry{ class: entry_classes }
|
||||
= link_to_newer short_account_status_url(status.account.username, status, since_descendant_thread_id: @max_descendant_thread_id - 1)
|
||||
|
||||
- if include_threads && !embedded_view? && !user_signed_in?
|
||||
.entry{ class: entry_classes }
|
||||
= link_to_login class: 'load-more load-gap' do
|
||||
= fa_icon 'comments'
|
||||
= t('statuses.sign_in_to_participate')
|
||||
.entry
|
||||
= render (centered ? 'statuses/detailed_status' : 'statuses/simple_status'), status: status.proper, hide_show_thread: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue