Skip to content

Commit

Permalink
use logo if exist
Browse files Browse the repository at this point in the history
  • Loading branch information
aynsix committed Dec 2, 2024
1 parent 717bf38 commit 934c7a4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions dashboard/client/config-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ window.config.muiTheme = ${stackConfig.theme.replace(/^export\s+const\s+themeOpt

return {
customHTML,
logo: stackConfig.logo,
locales: config.available_locales,
autoConnectIdP: env.AUTO_CONNECT_IDP,
baseUrl: env.DASHBOARD_CLIENT_URL,
Expand Down
6 changes: 5 additions & 1 deletion dashboard/client/src/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ export default function Dashboard({}: Props) {
},
}}
>
{STACK_NAME}
{
config.logo ? <img src={config.logo} alt={STACK_NAME} style={{ height:48 }}/>
: STACK_NAME
}

{user ? (
<Chip
icon={<SellIcon />}
Expand Down
1 change: 1 addition & 0 deletions databox/client/config-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ window.config.muiTheme = ${stackConfig.theme.replace(/^export\s+const\s+themeOpt

return {
customHTML,
logo: stackConfig.logo,
autoConnectIdP: env.AUTO_CONNECT_IDP,
baseUrl: env.DATABOX_API_URL,
uploaderApiBaseUrl: env.UPLOADER_API_URL,
Expand Down
6 changes: 5 additions & 1 deletion databox/client/src/components/Layout/MainAppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ export default function MainAppBar({onToggleLeftPanel}: Props) {
cursor: 'pointer',
}}
>
{t('common.databox', `Databox`)}
{
config.logo ? <img src={config.logo} alt={t('common.databox', `Databox`)} style={{ height:32 }}/>
: t('common.databox', `Databox`)
}

</Typography>

<Box
Expand Down
1 change: 1 addition & 0 deletions lib/js/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type WindowConfig = {
analytics?: AnalyticsConfig;
pusherHost?: Readonly<string>;
pusherKey?: Readonly<string>;
logo: Readonly<string>;
}

export type SentryConfig = Pick<WindowConfig,
Expand Down

0 comments on commit 934c7a4

Please sign in to comment.