Implement quote posts in Moderator UI (#35964)

This commit is contained in:
Emelia Smith
2025-10-16 15:40:24 +02:00
committed by GitHub
parent 51d0bfcb38
commit 210b389643
11 changed files with 170 additions and 86 deletions

View File

@@ -113,6 +113,7 @@ module ApplicationHelper
end
def material_symbol(icon, attributes = {})
whitespace = attributes.delete(:whitespace) { true }
safe_join(
[
inline_svg_tag(
@@ -121,7 +122,7 @@ module ApplicationHelper
role: :img,
data: attributes[:data]
),
' ',
whitespace ? ' ' : '',
]
)
end

View File

@@ -46,6 +46,14 @@ module StatusesHelper
status.preloadable_poll.options.map { |o| "[ ] #{o}" }.join("\n")
end
def status_classnames(status, is_quote)
if is_quote
'status--is-quote'
elsif status.quote.present?
'status--has-quote'
end
end
def status_description(status)
components = [[media_summary(status), status_text_summary(status)].compact_blank.join(' · ')]