From eda7b288360591f40fdf0d21490134de2e8bd218 Mon Sep 17 00:00:00 2001 From: diced Date: Sat, 1 Jun 2024 17:26:04 -0700 Subject: [PATCH] feat: logo next to title (titleLogo) --- src/components/Layout.tsx | 4 ++++ src/lib/config/read.ts | 3 +++ src/lib/config/validate.ts | 1 + 3 files changed, 8 insertions(+) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 1a8d53968..9cb7a3a63 100755 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -227,6 +227,10 @@ export default function Layout({ children, config }: { children: React.ReactNode hiddenFrom='sm' /> + {config.website.titleLogo && ( + + )} + Zipline
diff --git a/src/lib/config/read.ts b/src/lib/config/read.ts index 2f3e31312..248f8b962 100755 --- a/src/lib/config/read.ts +++ b/src/lib/config/read.ts @@ -69,6 +69,7 @@ export const rawConfig: any = { }, website: { title: undefined, + titleLogo: undefined, externalLinks: undefined, loginBackground: undefined, defaultAvatar: undefined, @@ -179,6 +180,7 @@ export const PROP_TO_ENV = { 'invites.length': 'INVITES_LENGTH', 'website.title': 'WEBSITE_TITLE', + 'website.titleLogo': 'WEBSITE_TITLE_LOGO', 'website.externalLinks': 'WEBSITE_EXTERNAL_LINKS', 'website.loginBackground': 'WEBSITE_LOGIN_BACKGROUND', 'website.defaultAvatar': 'WEBSITE_DEFAULT_AVATAR', @@ -298,6 +300,7 @@ export function readEnv() { env('invites.length', 'number'), env('website.title', 'string'), + env('website.titleLogo', 'string'), env('website.externalLinks', 'json[]'), env('website.loginBackground', 'string'), env('website.defaultAvatar', 'string'), diff --git a/src/lib/config/validate.ts b/src/lib/config/validate.ts index f1a065226..c2776a82d 100755 --- a/src/lib/config/validate.ts +++ b/src/lib/config/validate.ts @@ -163,6 +163,7 @@ export const schema = z.object({ }), website: z.object({ title: z.string().default('Zipline'), + titleLogo: z.string().url().nullable().default(null), externalLinks: z .array( z.object({