diff --git a/src/hooks.client.ts b/src/hooks.client.ts index 962e18c..fca8b9b 100644 --- a/src/hooks.client.ts +++ b/src/hooks.client.ts @@ -1,3 +1,3 @@ -import { initServices } from '$lib/services/services'; +import { initComponents } from '$lib/services/services'; -await initServices(); +await initComponents(); diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 22e5bba..4fc24bf 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -1,9 +1,10 @@ import { dev } from '$app/environment'; import { watchDymamicConfig } from '$lib/server/config'; -import { initServices } from '$lib/services/services'; +import { initComponents, initServices } from '$lib/services/services'; if (!dev) { watchDymamicConfig(); } await initServices(); +await initComponents(); diff --git a/src/lib/components/Brand.svelte b/src/lib/components/Brand.svelte index 4e2fad0..0590485 100644 --- a/src/lib/components/Brand.svelte +++ b/src/lib/components/Brand.svelte @@ -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; + } -