fix: load png brand assets
This commit is contained in:
BIN
src/assets/logo-dark.png
Normal file
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
BIN
src/assets/logo-light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
@@ -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) {
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user