Fixes production build with custom services
This commit is contained in:
@@ -7,12 +7,23 @@
|
||||
function masked() {
|
||||
return brand.logo != undefined && brand.asmask == true;
|
||||
}
|
||||
|
||||
function logoURL(): string {
|
||||
console.log(brand.logo);
|
||||
if (brand.logo == undefined) {
|
||||
return '';
|
||||
}
|
||||
if (brand.logo.startsWith('https://') || brand.logo.startsWith('http://')) {
|
||||
return brand.logo;
|
||||
}
|
||||
return '/' + brand.logo;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div style="--mask: url(/{brand.logo || ''}); --mask-color: {color}" class:masked={masked()}>
|
||||
<div style="--mask: url({logoURL()}); --mask-color: {color}" class:masked={masked()}>
|
||||
{#if brand.logo}
|
||||
{#if brand.asmask != true}
|
||||
<img src={'/' + brand.logo} alt="logo" />
|
||||
<img src={logoURL()} alt="logo" />
|
||||
{/if}
|
||||
{:else if brand.icon}
|
||||
<i class={brand.icon} />
|
||||
|
||||
Reference in New Issue
Block a user