Skip to content

Commit

Permalink
feat: update basic info of platform (kubesphere#3637)
Browse files Browse the repository at this point in the history
Signed-off-by: donniean <donniean1@gmail.com>
Co-authored-by: donniean <donniean1@gmail.com>
  • Loading branch information
ks-ci-bot and donniean authored May 16, 2024
1 parent 80127d2 commit 3df0b98
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 39 deletions.

This file was deleted.

48 changes: 19 additions & 29 deletions packages/console/src/pages/platform/containers/BaseInfo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import React from 'react';
import { Home, Image } from '@kubed/icons';
import { Banner, Card, Field } from '@kubed/components';
import { useUrl } from '@ks-console/shared';
import Embed from './Embed';
import { Header, Content, ImageWrapper, Details } from './styles';

function PlatformBaseInfo(): JSX.Element {
const { getDocsUrl } = useUrl({ module: 'custom_console' });
const kseLogo = globals.config.logo || globals.defaultTheme.logo;
const logo = globals.useDefaultTheme ? kseLogo : globals.theme.logo;

Expand All @@ -18,34 +15,27 @@ function PlatformBaseInfo(): JSX.Element {
title={t('PLATFORM_INFORMATION')}
description={t('PLATFORM_INFO_DESC')}
/>
{1 ? (
<Embed />
) : (
<Card sectionTitle={t('BASIC_INFORMATION')}>
<Header>
<Card sectionTitle={t('BASIC_INFORMATION')}>
<Header>
<Field
avatar={<Image size={40} />}
value={window.location.host}
label={t('PLATFORM_ADDRESS')}
/>
</Header>
<Content>
<ImageWrapper>
<img src={logo} alt="" />
</ImageWrapper>
<Details>
<Field value={globals.config.title} label={t('PLATFORM_TITLE')} />
<Field
avatar={<Image size={40} />}
value={window.location.host}
label={t('PLATFORM_ADDRESS')}
value={globals.config.description || t('KS_DESCRIPTION')}
label={t('PLATFORM_DESCRIPTION')}
/>
<a href={getDocsUrl()} target="_blank" rel="noreferrer noopener">
{t('HOW_TO_MODIFY_PLATFORM_INFO')}
</a>
</Header>
<Content>
<ImageWrapper>
<img src={logo} alt="" />
</ImageWrapper>
<Details>
<Field value={globals.config.title} label={t('PLATFORM_TITLE')} />
<Field
value={globals.config.description || t('KS_DESCRIPTION')}
label={t('PLATFORM_DESCRIPTION')}
/>
</Details>
</Content>
</Card>
)}
</Details>
</Content>
</Card>
</>
);
}
Expand Down
2 changes: 1 addition & 1 deletion server/configs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ server:
description: "KS_DESCRIPTION"

client:
title: KSE
title: KubeSphere
description: ""
encryptKey: kubesphere

Expand Down

0 comments on commit 3df0b98

Please sign in to comment.