fix: white-labeled custom logo
This commit is contained in:
parent
b0af54587b
commit
625e71ab08
4 changed files with 27 additions and 5 deletions
6
src/app.d.ts
vendored
6
src/app.d.ts
vendored
|
|
@ -6,7 +6,11 @@ declare namespace App {
|
||||||
cookies: Record<string, string>;
|
cookies: Record<string, string>;
|
||||||
}
|
}
|
||||||
interface Platform {}
|
interface Platform {}
|
||||||
interface Session extends SessionData {}
|
interface Session extends SessionData {
|
||||||
|
whiteLabelDetails: {
|
||||||
|
icon: string | null;
|
||||||
|
};
|
||||||
|
}
|
||||||
interface Stuff {
|
interface Stuff {
|
||||||
service: any;
|
service: any;
|
||||||
application: any;
|
application: any;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@ import cookie from 'cookie';
|
||||||
import { dev } from '$app/env';
|
import { dev } from '$app/env';
|
||||||
|
|
||||||
const whiteLabeled = process.env['COOLIFY_WHITE_LABELED'] === 'true';
|
const whiteLabeled = process.env['COOLIFY_WHITE_LABELED'] === 'true';
|
||||||
|
const whiteLabelDetails = {
|
||||||
|
icon: (whiteLabeled && process.env['COOLIFY_WHITE_LABELED_ICON']) || null
|
||||||
|
};
|
||||||
|
|
||||||
export const handle = handleSession(
|
export const handle = handleSession(
|
||||||
{
|
{
|
||||||
|
|
@ -74,6 +77,7 @@ export const getSession: GetSession = function ({ locals }) {
|
||||||
return {
|
return {
|
||||||
version,
|
version,
|
||||||
whiteLabeled,
|
whiteLabeled,
|
||||||
|
whiteLabelDetails,
|
||||||
...locals.session.data
|
...locals.session.data
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,15 @@
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex justify-center px-4">
|
<div class="flex justify-center px-4">
|
||||||
<form on:submit|preventDefault={handleSubmit} class="flex flex-col py-4 space-y-2">
|
<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>
|
{#if $session.whiteLabelDetails.icon}
|
||||||
<div class="text-xs text-center font-bold pb-10">v{$session.version}</div>
|
<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
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
name="email"
|
name="email"
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,15 @@
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex justify-center px-4">
|
<div class="flex justify-center px-4">
|
||||||
<form on:submit|preventDefault={handleSubmit} class="flex flex-col py-4 space-y-2">
|
<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>
|
{#if $session.whiteLabelDetails.icon}
|
||||||
<div class="text-xs text-center font-bold pb-10">v{$session.version}</div>
|
<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
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
name="email"
|
name="email"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue