Merge remote-tracking branch 'origin/master' into redesign

This commit is contained in:
Luna D. 2024-06-23 18:48:16 +02:00
commit b9daccf9fe
No known key found for this signature in database
GPG key ID: 4B1C63448394F688
4 changed files with 6 additions and 9 deletions

View file

@ -29,15 +29,12 @@ function close(burger: HTMLElement, content: HTMLElement, body: HTMLElement, roo
}, 300); }, 300);
} }
function copyArtistLinksTo(burger: HTMLElement) { function copyUserLinksTo(burger: HTMLElement) {
const copy = (links: HTMLCollection) => { const copy = (links: HTMLCollection) => {
burger.appendChild(document.createElement('hr')); burger.appendChild(document.createElement('hr'));
for (let i = 0; i < links.length; i++) { for (const link of links) {
// If we're here, this should not be null.
const link = assertNotNull(links.item(i));
const burgerLink = link.cloneNode(true) as HTMLElement; const burgerLink = link.cloneNode(true) as HTMLElement;
burgerLink.className = ''; burgerLink.className = '';
burger.appendChild(burgerLink); burger.appendChild(burgerLink);
} }
@ -54,7 +51,7 @@ export function setupBurgerMenu() {
const body = document.body; const body = document.body;
const root = document.documentElement; const root = document.documentElement;
copyArtistLinksTo(burger); copyUserLinksTo(burger);
toggle.addEventListener('click', event => { toggle.addEventListener('click', event => {
event.stopPropagation(); event.stopPropagation();

View file

@ -1,4 +1,3 @@
version: '3'
volumes: volumes:
postgres_data: {} postgres_data: {}
opensearch_data: {} opensearch_data: {}

View file

@ -41,6 +41,8 @@ defmodule PhilomenaWeb.Api.Json.ImageController do
case Images.create_image(attributes, image_params) do case Images.create_image(attributes, image_params) do
{:ok, %{image: image}} -> {:ok, %{image: image}} ->
image = Repo.preload(image, tags: :aliases)
PhilomenaWeb.Endpoint.broadcast!( PhilomenaWeb.Endpoint.broadcast!(
"firehose", "firehose",
"image:create", "image:create",

View file

@ -34,8 +34,7 @@ defmodule PhilomenaWeb.ContentSecurityPolicyPlug do
{:form_action, ["'self'"]}, {:form_action, ["'self'"]},
{:manifest_src, ["'self'"]}, {:manifest_src, ["'self'"]},
{:img_src, ["'self'", "blob:", "data:", cdn_uri, camo_uri]}, {:img_src, ["'self'", "blob:", "data:", cdn_uri, camo_uri]},
{:media_src, ["'self'", "blob:", "data:", cdn_uri, camo_uri]}, {:media_src, ["'self'", "blob:", "data:", cdn_uri, camo_uri]}
{:block_all_mixed_content, []}
] ]
csp_value = csp_value =