feat: add skin logo support

This commit is contained in:
Austin Pickett 2026-04-07 23:59:11 -04:00
parent af077b2c0d
commit ebd2d83ef2
6 changed files with 108 additions and 13 deletions

View file

@ -30,6 +30,8 @@ export interface ThemeBrand {
export interface Theme {
color: ThemeColors
brand: ThemeBrand
bannerLogo: string
bannerHero: string
}
export const DEFAULT_THEME: Theme = {
@ -60,10 +62,18 @@ export const DEFAULT_THEME: Theme = {
welcome: 'Type your message or /help for commands.',
goodbye: 'Goodbye! ⚕',
tool: '┊'
}
},
bannerLogo: '',
bannerHero: ''
}
export function fromSkin(colors: Record<string, string>, branding: Record<string, string>): Theme {
export function fromSkin(
colors: Record<string, string>,
branding: Record<string, string>,
bannerLogo = '',
bannerHero = ''
): Theme {
const d = DEFAULT_THEME
const c = (k: string) => colors[k]
@ -95,6 +105,9 @@ export function fromSkin(colors: Record<string, string>, branding: Record<string
welcome: branding.welcome ?? d.brand.welcome,
goodbye: branding.goodbye ?? d.brand.goodbye,
tool: d.brand.tool
}
},
bannerLogo,
bannerHero
}
}