mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
Merge remote-tracking branch 'origin/master' into redesign
This commit is contained in:
commit
b9daccf9fe
4 changed files with 6 additions and 9 deletions
|
@ -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();
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
version: '3'
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data: {}
|
postgres_data: {}
|
||||||
opensearch_data: {}
|
opensearch_data: {}
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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 =
|
||||||
|
|
Loading…
Reference in a new issue