Merge remote-tracking branch 'parent/main' into upstream-20241006

This commit is contained in:
KMY 2024-10-05 09:10:58 +09:00
commit 66bed31dbe
226 changed files with 2688 additions and 1846 deletions

View file

@ -18,7 +18,7 @@
.field-group
.input.with_block_label
%label= t('activerecord.attributes.doorkeeper/application.scopes')
= form.label t('activerecord.attributes.doorkeeper/application.scopes'), required: true
%span.hint= t('simple_form.hints.defaults.scopes')
- Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each_value do |value|
@ -29,7 +29,7 @@
hint: false,
include_blank: false,
item_wrapper_tag: 'li',
label_method: ->(scope) { safe_join([content_tag(:samp, scope, class: class_for_scope(scope)), content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) },
label_method: ->(scope) { label_for_scope(scope) },
label: false,
required: false,
selected: form.object.scopes.all,

View file

@ -18,7 +18,9 @@
- @applications.each do |application|
%tr
%td= link_to application.name, settings_application_path(application)
%th= application.scopes
%th
- application.scopes.to_s.split.each do |scope|
= tag.samp(scope, class: 'information-badge', title: t("doorkeeper.scopes.#{scope}"))
%td
= table_link_to 'close', t('doorkeeper.applications.index.delete'), settings_application_path(application), method: :delete, data: { confirm: t('doorkeeper.applications.confirmations.destroy') }

View file

@ -15,15 +15,16 @@
%td
%code= @application.secret
%tr
%th{ rowspan: 2 }= t('applications.your_token')
%th= t('applications.your_token')
%td
%code= current_user.token_for_app(@application).token
%tr
%th
%td= table_link_to 'refresh', t('applications.regenerate_token'), regenerate_settings_application_path(@application), method: :post
%hr/
= simple_form_for @application, url: settings_application_path(@application), method: :put do |form|
= simple_form_for @application, url: settings_application_path(@application) do |form|
= render form
.actions

View file

@ -6,39 +6,39 @@
%tbody
%tr
%th= t('exports.storage')
%td= number_to_human_size @export.total_storage
%td= number_to_human_size @export_summary.total_storage
%td
%tr
%th= t('accounts.posts_tab_heading')
%td= number_with_delimiter @export.total_statuses
%td= number_with_delimiter @export_summary.total_statuses
%td
%tr
%th= t('admin.accounts.follows')
%td= number_with_delimiter @export.total_follows
%td= number_with_delimiter @export_summary.total_follows
%td= table_link_to 'download', t('exports.csv'), settings_exports_follows_path(format: :csv)
%tr
%th= t('exports.lists')
%td= number_with_delimiter @export.total_lists
%td= number_with_delimiter @export_summary.total_lists
%td= table_link_to 'download', t('exports.csv'), settings_exports_lists_path(format: :csv)
%tr
%th= t('admin.accounts.followers')
%td= number_with_delimiter @export.total_followers
%td= number_with_delimiter @export_summary.total_followers
%td
%tr
%th= t('exports.mutes')
%td= number_with_delimiter @export.total_mutes
%td= number_with_delimiter @export_summary.total_mutes
%td= table_link_to 'download', t('exports.csv'), settings_exports_mutes_path(format: :csv)
%tr
%th= t('exports.blocks')
%td= number_with_delimiter @export.total_blocks
%td= number_with_delimiter @export_summary.total_blocks
%td= table_link_to 'download', t('exports.csv'), settings_exports_blocks_path(format: :csv)
%tr
%th= t('exports.domain_blocks')
%td= number_with_delimiter @export.total_domain_blocks
%td= number_with_delimiter @export_summary.total_domain_blocks
%td= table_link_to 'download', t('exports.csv'), settings_exports_domain_blocks_path(format: :csv)
%tr
%th= t('exports.bookmarks')
%td= number_with_delimiter @export.total_bookmarks
%td= number_with_delimiter @export_summary.total_bookmarks
%td= table_link_to 'download', t('exports.csv'), settings_exports_bookmarks_path(format: :csv)
%hr.spacer/
@ -61,7 +61,8 @@
%tbody
- @backups.each do |backup|
%tr
%td= l backup.created_at
%td
%time.formatted{ datetime: backup.created_at.iso8601, title: l(backup.created_at) }= l backup.created_at
- if backup.processed?
%td= number_to_human_size backup.dump_file_size
%td= table_link_to 'download', t('exports.archive_takeout.download'), download_backup_url(backup)

View file

@ -55,7 +55,10 @@
= t("imports.states.#{import.state}")
%td
#{import.imported_items} / #{import.total_items}
%td= l(import.created_at)
%td
%time.formatted{ datetime: import.created_at.iso8601, title: l(import.created_at) }
= l(import.created_at)
%td
- num_failed = import.processed_items - import.imported_items
- if num_failed.positive?

View file

@ -5,9 +5,9 @@
.flash-message.warning= t('imports.mismatched_types_warning')
- if @bulk_import.overwrite?
%p.hint= t("imports.overwrite_preambles.#{@bulk_import.type}_html", filename: @bulk_import.original_filename, total_items: @bulk_import.total_items)
%p.hint= t("imports.overwrite_preambles.#{@bulk_import.type}_html", filename: @bulk_import.original_filename, count: @bulk_import.total_items)
- else
%p.hint= t("imports.preambles.#{@bulk_import.type}_html", filename: @bulk_import.original_filename, total_items: @bulk_import.total_items)
%p.hint= t("imports.preambles.#{@bulk_import.type}_html", filename: @bulk_import.original_filename, count: @bulk_import.total_items)
.simple_form
.actions

View file

@ -4,7 +4,7 @@
- content_for :heading_actions do
= button_tag t('generic.save_changes'), class: 'button', form: 'edit_user'
= simple_form_for current_user, url: settings_preferences_appearance_path, html: { method: :put, id: 'edit_user' } do |f|
= simple_form_for current_user, url: settings_preferences_appearance_path, html: { id: :edit_user } do |f|
.fields-row
.fields-group.fields-row__column.fields-row__column-6
= f.input :locale,

View file

@ -4,7 +4,7 @@
- content_for :heading_actions do
= button_tag t('generic.save_changes'), class: 'button', form: 'edit_notification'
= simple_form_for current_user, url: settings_preferences_notifications_path, html: { method: :put, id: 'edit_notification' } do |f|
= simple_form_for current_user, url: settings_preferences_notifications_path, html: { id: :edit_notification } do |f|
= render 'shared/error_messages', object: current_user
%h4= t 'notifications.email_events'

View file

@ -4,7 +4,7 @@
- content_for :heading_actions do
= button_tag t('generic.save_changes'), class: 'button', form: 'edit_preferences'
= simple_form_for current_user, url: settings_preferences_other_path, html: { method: :put, id: 'edit_preferences' } do |f|
= simple_form_for current_user, url: settings_preferences_other_path, html: { id: :edit_preferences } do |f|
= render 'shared/error_messages', object: current_user
= f.simple_fields_for :settings, current_user.settings do |ff|

View file

@ -5,7 +5,7 @@
%h2= t('settings.profile')
= render partial: 'settings/shared/profile_navigation'
= simple_form_for @account, url: settings_privacy_path, html: { method: :put } do |f|
= simple_form_for @account, url: settings_privacy_path do |f|
= render 'shared/error_messages', object: @account
%p.lead= t('privacy.hint_html')

View file

@ -5,7 +5,7 @@
%h2= t('settings.profile')
= render partial: 'settings/shared/profile_navigation'
= simple_form_for @account, url: settings_profile_path, html: { method: :put, id: 'edit_profile' } do |f|
= simple_form_for @account, url: settings_profile_path, html: { id: :edit_profile } do |f|
= render 'shared/error_messages', object: @account
%p.lead= t('edit_profile.hint_html')
@ -41,7 +41,7 @@
.fields-row__column.fields-row__column-6
.fields-group
= f.input :avatar,
hint: t('simple_form.hints.defaults.avatar', dimensions: '400x400', size: number_to_human_size(Account::Avatar::LIMIT)),
hint: t('simple_form.hints.defaults.avatar', dimensions: Account::Avatar::AVATAR_GEOMETRY, size: number_to_human_size(Account::Avatar::LIMIT)),
input_html: { accept: Account::Avatar::IMAGE_MIME_TYPES.join(',') },
wrapper: :with_block_label
@ -57,7 +57,7 @@
.fields-row__column.fields-row__column-6
.fields-group
= f.input :header,
hint: t('simple_form.hints.defaults.header', dimensions: '1500x500', size: number_to_human_size(Account::Header::LIMIT)),
hint: t('simple_form.hints.defaults.header', dimensions: Account::Header::HEADER_GEOMETRY, size: number_to_human_size(Account::Header::LIMIT)),
input_html: { accept: Account::Header::IMAGE_MIME_TYPES.join(',') },
wrapper: :with_block_label

View file

@ -1,8 +1,8 @@
.content__heading__tabs
= render_navigation renderer: :links do |primary|
:ruby
primary.item :profile, safe_join([material_symbol('person'), t('settings.edit_profile')]), settings_profile_path
primary.item :privacy, safe_join([material_symbol('lock'), t('privacy.title')]), settings_privacy_path
primary.item :edit_profile, safe_join([material_symbol('person'), t('settings.edit_profile')]), settings_profile_path
primary.item :privacy_reach, safe_join([material_symbol('lock'), t('privacy.title')]), settings_privacy_path
primary.item :privacy_extra, safe_join([material_symbol('lock'), t('privacy_extra.title')]), settings_privacy_extra_path
primary.item :verification, safe_join([material_symbol('check'), t('verification.verification')]), settings_verification_path
primary.item :featured_tags, safe_join([material_symbol('tag'), t('settings.featured_tags')]), settings_featured_tags_path

View file

@ -5,7 +5,7 @@
%p.hint= t('otp_authentication.instructions_html')
.qr-wrapper
.qr-code!= @qrcode.as_svg(padding: 0, module_size: 4)
.qr-code!= @qrcode.as_svg(padding: 0, module_size: 4, use_path: true)
.qr-alternative
%p.hint= t('otp_authentication.manual_instructions')

View file

@ -16,7 +16,7 @@
.input-copy.lead
.input-copy__wrapper
%input{ type: :text, maxlength: '999', spellcheck: 'false', readonly: 'true', value: link_to('Mastodon', ActivityPub::TagManager.instance.url_for(@account), rel: 'me').to_str }
= copyable_input value: link_to('Mastodon', ActivityPub::TagManager.instance.url_for(@account), rel: :me)
%button{ type: :button }= t('generic.copy')
%p.lead= t('verification.extra_instructions_html')
@ -31,7 +31,7 @@
= material_symbol 'check', class: 'verified-badge__mark'
%span= field.value
= simple_form_for @account, url: settings_verification_path, html: { method: :put, class: 'form-section' } do |f|
= simple_form_for @account, url: settings_verification_path, html: { class: 'form-section' } do |f|
= render 'shared/error_messages', object: @account
%h3= t('author_attribution.title')
@ -50,13 +50,13 @@
= image_tag frontend_asset_url('images/preview.png'), alt: '', class: 'status-card__image-image'
.status-card__content
%span.status-card__host
%span= t('author_attribution.s_blog', name: @account.username)
%span= t('author_attribution.s_blog', name: display_name(@account))
·
%time.time-ago{ datetime: 1.year.ago.to_date.iso8601 }
%strong.status-card__title= t('author_attribution.example_title')
.more-from-author
= logo_as_symbol(:icon)
= t('author_attribution.more_from_html', name: link_to(root_url, class: 'story__details__shared__author-link') { image_tag(@account.avatar.url, class: 'account__avatar', width: 16, height: 16, alt: '') + content_tag(:bdi, display_name(@account)) })
= t('author_attribution.more_from_html', name: link_to(root_url, class: 'story__details__shared__author-link') { image_tag(@account.avatar.url, class: 'account__avatar', width: 16, height: 16, alt: '') + tag.bdi(display_name(@account)) })
.actions
= f.button :button, t('generic.save_changes'), type: :submit