Merge commit 'a13756148d353c7479f68e65a210f6d88d26c785' into glitch-soc/merge-upstream
Conflicts: - `app/views/layouts/embedded.html.haml`: Upstream made a change to javascript tags next to lines changed in glitch-soc because of the theming system. Added the javascript entrypoint upstream added. - `app/views/layouts/error.html.haml`: Upstream made a change to javascript tags next to lines changed in glitch-soc because of the theming system. Added the javascript entrypoint upstream added.
This commit is contained in:
commit
706c8bf1a0
108 files changed
+1297
-355
No files matched your search
@@ -31,6 +31,7 @@ class Sanitize
|
||||
next true if /^(h|p|u|dt|e)-/.match?(e) # microformats classes
|
||||
next true if /^(mention|hashtag)$/.match?(e) # semantic classes
|
||||
next true if /^(ellipsis|invisible)$/.match?(e) # link formatting classes
|
||||
next true if e == 'quote-inline'
|
||||
end
|
||||
|
||||
node['class'] = class_list.join(' ')
|
||||
@@ -122,6 +123,7 @@ class Sanitize
|
||||
'blockquote' => %w(cite),
|
||||
'ol' => %w(start reversed),
|
||||
'li' => %w(value),
|
||||
'p' => %w(class),
|
||||
},
|
||||
|
||||
add_attributes: {
|
||||
|
||||
@@ -351,5 +351,42 @@ namespace :dev do
|
||||
display_name: 'Mastodon test/showcase account',
|
||||
note: 'Test account to showcase many Mastodon features. Most of its posts are public, but some are private!'
|
||||
)
|
||||
|
||||
remote_quote = Status.create_with(
|
||||
text: <<~HTML,
|
||||
<p>This is a self-quote of a remote formatted post</p>
|
||||
<p class="quote-inline">RE: <a href="https://example.org/foo/bar/baz">https://example.org/foo/bar/baz</a></p>
|
||||
HTML
|
||||
account: remote_account,
|
||||
uri: 'https://example.org/foo/bar/quote',
|
||||
url: 'https://example.org/foo/bar/quote'
|
||||
).find_or_create_by!(id: 10_000_023)
|
||||
Quote.create_with(
|
||||
status: remote_quote,
|
||||
quoted_status: remote_formatted_post,
|
||||
state: :accepted
|
||||
).find_or_create_by!(id: 10_000_010)
|
||||
Status.create_with(
|
||||
account: showcase_account,
|
||||
reblog: remote_quote
|
||||
).find_or_create_by!(id: 10_000_024)
|
||||
|
||||
media_attachment = MediaAttachment.create_with(
|
||||
account: showcase_account,
|
||||
file: File.open('spec/fixtures/files/attachment.jpg')
|
||||
).find_or_create_by!(id: 10_000_010)
|
||||
quote_post_with_media = Status.create_with(
|
||||
text: "This is a status with a picture and tags which also quotes a status with a picture.\n\n#Mastodon #Test",
|
||||
ordered_media_attachment_ids: [media_attachment.id],
|
||||
account: showcase_account,
|
||||
visibility: :public
|
||||
).find_or_create_by!(id: 10_000_025)
|
||||
media_attachment.update(status_id: quote_post_with_media.id)
|
||||
ProcessHashtagsService.new.call(quote_post_with_media)
|
||||
Quote.create_with(
|
||||
status: quote_post_with_media,
|
||||
quoted_status: status_with_media,
|
||||
state: :accepted
|
||||
).find_or_create_by!(id: 10_000_011)
|
||||
end
|
||||
end
|
||||
@@ -119,6 +119,14 @@ module ViteRails::TagHelpers::IntegrityExtension
|
||||
rescue ViteRuby::MissingEntrypointError
|
||||
# Ignore this error, it is not critical if the file is not preloaded
|
||||
end
|
||||
|
||||
def vite_polyfills_tag(crossorigin: 'anonymous', **)
|
||||
return if ViteRuby.instance.dev_server_running?
|
||||
|
||||
entry = vite_manifest.path_and_integrity_for('polyfills', type: :virtual)
|
||||
|
||||
javascript_include_tag(entry[:path], type: 'module', integrity: entry[:integrity], crossorigin: crossorigin, **)
|
||||
end
|
||||
end
|
||||
|
||||
ViteRails::TagHelpers.prepend ViteRails::TagHelpers::IntegrityExtension
|
||||
Reference in new issue
Block a user