1
0
Fork 0
forked from gitea/nas

Remove remnants of embed views (#32419)

This commit is contained in:
Matt Jankowski 2024-11-16 15:48:10 -05:00 committed by GitHub
parent 44d92fa4f6
commit a1ac2a73ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 4 additions and 70 deletions

View file

@ -1,9 +1,6 @@
# frozen_string_literal: true
module StatusesHelper
EMBEDDED_CONTROLLER = 'statuses'
EMBEDDED_ACTION = 'embed'
VISIBLITY_ICONS = {
public: 'globe',
unlisted: 'lock_open',
@ -60,18 +57,10 @@ module StatusesHelper
components.compact_blank.join("\n\n")
end
def stream_link_target
embedded_view? ? '_blank' : nil
end
def visibility_icon(status)
VISIBLITY_ICONS[status.visibility.to_sym]
end
def embedded_view?
params[:controller] == EMBEDDED_CONTROLLER && params[:action] == EMBEDDED_ACTION
end
def prefers_autoplay?
ActiveModel::Type::Boolean.new.cast(params[:autoplay]) || current_user&.setting_auto_play_gif
end

View file

@ -44,7 +44,7 @@
= t("statuses.visibilities.#{status.visibility}")
·
= link_to ActivityPub::TagManager.instance.url_for(status.proper), class: 'detailed-status__link', target: stream_link_target, rel: 'noopener noreferrer' do
= link_to ActivityPub::TagManager.instance.url_for(status.proper), class: 'detailed-status__link', rel: 'noopener noreferrer' do
= t('admin.statuses.view_publicly')
- if status.proper.sensitive?

View file

@ -23,7 +23,7 @@
= image_tag(status.account.avatar.url, width: 15, height: 15, alt: '', class: 'avatar')
.username= status.account.acct
·
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'detailed-status__datetime', target: stream_link_target, rel: 'noopener noreferrer' do
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'detailed-status__datetime', rel: 'noopener noreferrer' do
%time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
- if status.edited?
·