fix: load png brand assets

This commit is contained in:
2026-06-13 09:02:14 +02:00
parent ffd094d631
commit 11d8b42198
5 changed files with 7 additions and 3 deletions

BIN
src/assets/logo-dark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
src/assets/logo-light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

@@ -205,7 +205,7 @@ async function createThumbnailObjectUrl(blob) {
}
function setBrandLogo(theme) {
panelLogo.src = theme === "dark" ? "/assets/logo-dark.svg" : "/assets/logo-light.svg";
panelLogo.src = theme === "dark" ? "/assets/logo-dark.png" : "/assets/logo-light.png";
}
function setTheme(theme, persist = true) {

View File

@@ -45,7 +45,7 @@ function isAllowedAssetPath(assetName: string, isVendorAsset: boolean, isAppAsse
}
if (isAppAsset) {
return /^[a-z0-9_.-]+\.svg$/i.test(assetName);
return /^[a-z0-9_.-]+\.(svg|png)$/i.test(assetName);
}
if (isVendorAsset) {
@@ -68,5 +68,9 @@ function getContentType(assetName: string): string {
return "image/svg+xml; charset=utf-8";
}
if (assetName.endsWith(".png")) {
return "image/png";
}
return "text/javascript; charset=utf-8";
}

View File

@@ -52,7 +52,7 @@ ${APP_STYLES}
<img
class="panel-logo"
id="panel-logo"
src="/assets/logo-light.svg"
src="/assets/logo-light.png"
alt="mapix"
width="156"
height="66"