Merge remote-tracking branch 'parent/main' into upstream-20240913
This commit is contained in:
commit
fc9d27ff91
392 changed files with 3757 additions and 3233 deletions
|
@ -33,7 +33,7 @@
|
|||
= material_symbol('repeat_active')
|
||||
= t('statuses.boosted_from_html', acct_link: admin_account_inline_link_to(status.proper.account))
|
||||
- else
|
||||
= fa_visibility_icon(status)
|
||||
= material_symbol visibility_icon(status)
|
||||
= t("statuses.visibilities.#{status.visibility}")
|
||||
- if status.proper.sensitive?
|
||||
·
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
·
|
||||
= t('statuses.edited_at_html', date: content_tag(:time, l(status.edited_at), datetime: status.edited_at.iso8601, title: l(status.edited_at), class: 'formatted'))
|
||||
·
|
||||
= fa_visibility_icon(status)
|
||||
= material_symbol visibility_icon(status)
|
||||
= t("statuses.visibilities.#{status.visibility}")
|
||||
- if status.sensitive?
|
||||
·
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
%link{ rel: 'mask-icon', href: frontend_asset_path('images/logo-symbol-icon.svg'), color: '#6364FF' }/
|
||||
%link{ rel: 'manifest', href: manifest_path(format: :json) }/
|
||||
= theme_color_tags current_theme
|
||||
%meta{ name: 'apple-mobile-web-app-capable', content: 'yes' }/
|
||||
%meta{ name: 'mobile-web-app-capable', content: 'yes' }/
|
||||
|
||||
%title= html_title
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
- if storage_host?
|
||||
%link{ rel: 'dns-prefetch', href: storage_host }/
|
||||
|
||||
= theme_style_tags Setting.theme # Use the admin-configured theme here, even if logged in
|
||||
= theme_style_tags 'mastodon-light'
|
||||
= javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous'
|
||||
= preload_pack_asset "locale/#{I18n.locale}-json.js"
|
||||
= render_initial_state
|
||||
= javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
|
||||
= javascript_pack_tag 'embed', integrity: true, crossorigin: 'anonymous'
|
||||
%body.embed
|
||||
= yield
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
%meta{ name: 'robots', content: 'noindex, noarchive' }/
|
||||
%link{ rel: 'canonical', href: @redirect_path }
|
||||
|
||||
- content_for :body_classes, 'app-body'
|
||||
|
||||
.redirect
|
||||
.redirect__logo
|
||||
= link_to render_logo, root_path
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
%h2= t('settings.profile')
|
||||
= render partial: 'settings/shared/profile_navigation'
|
||||
|
||||
.simple_form
|
||||
.simple_form.form-section
|
||||
%h3= t('verification.website_verification')
|
||||
|
||||
%p.lead= t('verification.hint_html')
|
||||
|
||||
%h4= t('verification.here_is_how')
|
||||
|
@ -28,3 +30,33 @@
|
|||
%span.verified-badge
|
||||
= 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|
|
||||
= render 'shared/error_messages', object: @account
|
||||
|
||||
%h3= t('author_attribution.title')
|
||||
|
||||
%p.lead= t('author_attribution.hint_html')
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6
|
||||
.fields-group
|
||||
= f.input :attribution_domains_as_text, as: :text, wrapper: :with_block_label, input_html: { placeholder: "example1.com\nexample2.com\nexample3.com", rows: 4 }
|
||||
.fields-row__column.fields-row__column-6
|
||||
.fields-group.fade-out-top
|
||||
%div
|
||||
.status-card.expanded.bottomless
|
||||
.status-card__image
|
||||
= 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)
|
||||
·
|
||||
%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)) })
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
:ruby
|
||||
grouped_emoji_reactions ||= Oj.load(status.status_stat&.emoji_reactions || '', mode: :strict) || []
|
||||
|
||||
.detailed-status.detailed-status--flex{ class: "detailed-status-#{status.visibility}" }
|
||||
.p-author.h-card
|
||||
= 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 prefers_autoplay?
|
||||
= image_tag status.account.avatar_original_url, alt: '', class: 'account__avatar u-photo'
|
||||
- else
|
||||
= image_tag status.account.avatar_static_url, alt: '', class: 'account__avatar u-photo'
|
||||
%span.display-name
|
||||
%bdi
|
||||
%strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: prefers_autoplay?)
|
||||
%span.display-name__account
|
||||
= acct(status.account)
|
||||
= material_symbol('lock') if status.account.locked?
|
||||
|
||||
= account_action_button(status.account)
|
||||
|
||||
.status__content.emojify{ data: ({ spoiler: current_account&.user&.setting_expand_spoilers ? 'expanded' : 'folded' } if status.spoiler_text?) }<
|
||||
- if status.spoiler_text?
|
||||
%p<
|
||||
%span.p-summary> #{prerender_custom_emojis(h(status.spoiler_text), status.emojis)}
|
||||
%button.status__content__spoiler-link= t('statuses.show_more')
|
||||
.e-content{ lang: status.language }
|
||||
= prerender_custom_emojis(status_content_format(status), status.emojis)
|
||||
|
||||
- if status.preloadable_poll
|
||||
= render_poll_component(status)
|
||||
|
||||
- if !status.ordered_media_attachments.empty?
|
||||
- if status.ordered_media_attachments.first.video?
|
||||
= render_video_component(status, width: 670, height: 380, detailed: true)
|
||||
- elsif status.ordered_media_attachments.first.audio?
|
||||
= render_audio_component(status, width: 670, height: 380)
|
||||
- else
|
||||
= render_media_gallery_component(status, height: 380, standalone: true)
|
||||
- elsif status.preview_card
|
||||
= render_card_component(status)
|
||||
|
||||
- if grouped_emoji_reactions.size.positive?
|
||||
.status__emoji-reactions-bar
|
||||
- grouped_emoji_reactions.each do |reaction|
|
||||
%button.emoji-reactions-bar__button
|
||||
%span.emojify= prerender_custom_emojis_from_hash(emoji_name_format(reaction, status), reaction)
|
||||
%span.count= reaction['count']
|
||||
|
||||
.detailed-status__meta
|
||||
%data.dt-published{ value: status.created_at.to_time.iso8601 }
|
||||
- if status.edited?
|
||||
%data.dt-updated{ value: status.edited_at.to_time.iso8601 }
|
||||
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'detailed-status__datetime u-url u-uid', target: stream_link_target, rel: 'noopener noreferrer' do
|
||||
%time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
|
||||
·
|
||||
- if status.edited?
|
||||
= t('statuses.edited_at_html', date: content_tag(:time, l(status.edited_at), datetime: status.edited_at.iso8601, title: l(status.edited_at), class: 'formatted'))
|
||||
·
|
||||
%span.detailed-status__visibility-icon
|
||||
= visibility_icon status
|
||||
·
|
||||
- if status.application && status.account.user&.setting_show_application
|
||||
- if status.application.website.blank?
|
||||
%strong.detailed-status__application= status.application.name
|
||||
- else
|
||||
= link_to status.application.name, status.application.website, class: 'detailed-status__application', target: '_blank', rel: 'noopener noreferrer'
|
||||
·
|
||||
%span.detailed-status__link
|
||||
- if status.in_reply_to_id.nil?
|
||||
= material_symbol('reply')
|
||||
- else
|
||||
= material_symbol('reply_all')
|
||||
%span.detailed-status__reblogs>= friendly_number_to_human status.replies_count
|
||||
|
||||
·
|
||||
- if status.public_visibility? || status.unlisted_visibility?
|
||||
%span.detailed-status__link
|
||||
= material_symbol('repeat')
|
||||
%span.detailed-status__reblogs>= friendly_number_to_human status.reblogs_count
|
||||
|
||||
·
|
||||
%span.detailed-status__link
|
||||
= material_symbol('star')
|
||||
%span.detailed-status__favorites>= friendly_number_to_human status.favourites_count
|
||||
|
||||
|
||||
- if user_signed_in?
|
||||
·
|
||||
= link_to t('statuses.open_in_web'), web_url("@#{status.account.pretty_acct}/#{status.id}"), class: 'detailed-status__application', target: '_blank', rel: 'noopener noreferrer'
|
|
@ -1,36 +0,0 @@
|
|||
:ruby
|
||||
show_results = (user_signed_in? && poll.voted?(current_account)) || poll.expired?
|
||||
total_votes_count = poll.voters_count || poll.votes_count
|
||||
|
||||
.poll
|
||||
%ul
|
||||
- poll.loaded_options.each do |option|
|
||||
%li
|
||||
- if show_results
|
||||
- percent = total_votes_count.positive? ? 100 * option.votes_count / total_votes_count : 0
|
||||
%label.poll__option><
|
||||
%span.poll__number><
|
||||
#{percent.round}%
|
||||
%span.poll__option__text
|
||||
= prerender_custom_emojis(h(option.title), status.emojis)
|
||||
|
||||
%progress{ max: 100, value: [percent, 1].max, 'aria-hidden': 'true' }
|
||||
%span.poll__chart
|
||||
- else
|
||||
%label.poll__option><
|
||||
%span.poll__input{ class: poll.multiple? ? 'checkbox' : nil }><
|
||||
%span.poll__option__text
|
||||
= prerender_custom_emojis(h(option.title), status.emojis)
|
||||
.poll__footer
|
||||
- unless show_results
|
||||
%button.button.button-secondary{ disabled: true }
|
||||
= t('statuses.poll.vote')
|
||||
|
||||
- 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?
|
||||
·
|
||||
%span= l poll.expires_at
|
|
@ -1,78 +0,0 @@
|
|||
:ruby
|
||||
hide_show_thread ||= false
|
||||
grouped_emoji_reactions ||= Oj.load(status.status_stat&.emoji_reactions || '', mode: :strict) || []
|
||||
|
||||
.status{ class: "status-#{status.visibility}" }
|
||||
.status__info
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'status__relative-time u-url u-uid', target: stream_link_target, rel: 'noopener noreferrer' do
|
||||
%span.status__visibility-icon><
|
||||
= visibility_icon status
|
||||
%time.time-ago{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
|
||||
- if status.edited?
|
||||
%abbr{ title: t('statuses.edited_at_html', date: l(status.edited_at.to_date)) }
|
||||
*
|
||||
%data.dt-published{ value: status.created_at.to_time.iso8601 }
|
||||
|
||||
.p-author.h-card
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status.account), class: 'status__display-name u-url', target: stream_link_target, rel: 'noopener noreferrer' do
|
||||
.status__avatar
|
||||
%div
|
||||
- if prefers_autoplay?
|
||||
= image_tag status.account.avatar_original_url, alt: '', class: 'u-photo account__avatar'
|
||||
- else
|
||||
= image_tag status.account.avatar_static_url, alt: '', class: 'u-photo account__avatar'
|
||||
%span.display-name
|
||||
%bdi
|
||||
%strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: prefers_autoplay?)
|
||||
|
||||
%span.display-name__account
|
||||
= acct(status.account)
|
||||
= material_symbol('lock') if status.account.locked?
|
||||
.status__content.emojify{ data: ({ spoiler: current_account&.user&.setting_expand_spoilers ? 'expanded' : 'folded' } if status.spoiler_text?) }<
|
||||
- if status.spoiler_text?
|
||||
%p<
|
||||
%span.p-summary> #{prerender_custom_emojis(h(status.spoiler_text), status.emojis)}
|
||||
%button.status__content__spoiler-link= t('statuses.show_more')
|
||||
.e-content{ lang: status.language }
|
||||
= prerender_custom_emojis(status_content_format(status), status.emojis)
|
||||
|
||||
- if status.preloadable_poll
|
||||
= render_poll_component(status)
|
||||
|
||||
- if !status.ordered_media_attachments.empty?
|
||||
- if status.ordered_media_attachments.first.video?
|
||||
= render_video_component(status, width: 610, height: 343)
|
||||
- elsif status.ordered_media_attachments.first.audio?
|
||||
= render_audio_component(status, width: 610, height: 343)
|
||||
- else
|
||||
= render_media_gallery_component(status, height: 343)
|
||||
- elsif status.preview_card
|
||||
= render_card_component(status)
|
||||
|
||||
- if !status.in_reply_to_id.nil? && status.in_reply_to_account_id == status.account.id && !hide_show_thread
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'status__content__read-more-button', target: stream_link_target, rel: 'noopener noreferrer' do
|
||||
= t 'statuses.show_thread'
|
||||
|
||||
- if grouped_emoji_reactions.size.positive?
|
||||
.status__emoji-reactions-bar
|
||||
- grouped_emoji_reactions.each do |reaction|
|
||||
%button.emoji-reactions-bar__button
|
||||
%span.emojify= prerender_custom_emojis_from_hash(emoji_name_format(reaction, status), reaction)
|
||||
%span.count= reaction['count']
|
||||
|
||||
.status__action-bar
|
||||
%span.status__action-bar-button.icon-button.icon-button--with-counter
|
||||
- if status.in_reply_to_id.nil?
|
||||
= material_symbol 'reply'
|
||||
- else
|
||||
= material_symbol 'reply_all'
|
||||
%span.icon-button__counter= obscured_counter status.replies_count
|
||||
%span.status__action-bar-button.icon-button
|
||||
- if status.distributable?
|
||||
= material_symbol 'repeat'
|
||||
- elsif status.private_visibility? || status.limited_visibility?
|
||||
= material_symbol 'lock'
|
||||
- else
|
||||
= material_symbol 'alternate_email'
|
||||
%span.status__action-bar-button.icon-button
|
||||
= material_symbol 'star'
|
|
@ -1,2 +0,0 @@
|
|||
.entry
|
||||
= render (centered ? 'statuses/detailed_status' : 'statuses/simple_status'), status: status.proper, hide_show_thread: false
|
|
@ -1,2 +1 @@
|
|||
.activity-stream.activity-stream--headless
|
||||
= render 'status', status: @status, centered: true
|
||||
#mastodon-status{ data: { props: Oj.dump(default_props.merge(id: @status.id.to_s)) } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue