fix: white-labeled custom logo
This commit is contained in:
parent
b0af54587b
commit
625e71ab08
6
src/app.d.ts
vendored
6
src/app.d.ts
vendored
@ -6,7 +6,11 @@ declare namespace App {
|
||||
cookies: Record<string, string>;
|
||||
}
|
||||
interface Platform {}
|
||||
interface Session extends SessionData {}
|
||||
interface Session extends SessionData {
|
||||
whiteLabelDetails: {
|
||||
icon: string | null;
|
||||
};
|
||||
}
|
||||
interface Stuff {
|
||||
service: any;
|
||||
application: any;
|
||||
|
@ -8,6 +8,9 @@ import cookie from 'cookie';
|
||||
import { dev } from '$app/env';
|
||||
|
||||
const whiteLabeled = process.env['COOLIFY_WHITE_LABELED'] === 'true';
|
||||
const whiteLabelDetails = {
|
||||
icon: (whiteLabeled && process.env['COOLIFY_WHITE_LABELED_ICON']) || null
|
||||
};
|
||||
|
||||
export const handle = handleSession(
|
||||
{
|
||||
@ -74,6 +77,7 @@ export const getSession: GetSession = function ({ locals }) {
|
||||
return {
|
||||
version,
|
||||
whiteLabeled,
|
||||
whiteLabelDetails,
|
||||
...locals.session.data
|
||||
};
|
||||
};
|
||||
|
@ -43,8 +43,15 @@
|
||||
{:else}
|
||||
<div class="flex justify-center px-4">
|
||||
<form on:submit|preventDefault={handleSubmit} class="flex flex-col py-4 space-y-2">
|
||||
<div class="text-6xl font-bold border-gradient w-48 mx-auto border-b-4">Coolify</div>
|
||||
<div class="text-xs text-center font-bold pb-10">v{$session.version}</div>
|
||||
{#if $session.whiteLabelDetails.icon}
|
||||
<img
|
||||
class="w-32 mx-auto pb-8"
|
||||
src={$session.whiteLabelDetails.icon}
|
||||
alt="Icon for white labeled version of Coolify"
|
||||
/>
|
||||
{:else}
|
||||
<div class="text-6xl font-bold border-gradient w-48 mx-auto border-b-4 mb-8">Coolify</div>
|
||||
{/if}
|
||||
<input
|
||||
type="email"
|
||||
name="email"
|
||||
|
@ -64,8 +64,15 @@
|
||||
{:else}
|
||||
<div class="flex justify-center px-4">
|
||||
<form on:submit|preventDefault={handleSubmit} class="flex flex-col py-4 space-y-2">
|
||||
<div class="text-6xl font-bold border-gradient w-48 mx-auto border-b-4">Coolify</div>
|
||||
<div class="text-xs text-center font-bold pb-10">v{$session.version}</div>
|
||||
{#if $session.whiteLabelDetails.icon}
|
||||
<img
|
||||
class="w-32 mx-auto pb-8"
|
||||
src={$session.whiteLabelDetails.icon}
|
||||
alt="Icon for white labeled version of Coolify"
|
||||
/>
|
||||
{:else}
|
||||
<div class="text-6xl font-bold border-gradient w-48 mx-auto border-b-4 mb-8">Coolify</div>
|
||||
{/if}
|
||||
<input
|
||||
type="email"
|
||||
name="email"
|
||||
|
Loading…
x
Reference in New Issue
Block a user