Skip to content

feat: home icon #283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions client/packages/lowcoder/src/assets/images/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches
import { ReactComponent as LogoIcon } from "./logo.svg";
import { ReactComponent as LogoWithNameIcon } from "./logo-with-name.svg";
import { ReactComponent as LogoHomeIcon } from "./logo-with-name.svg";

export { default as favicon } from "./favicon.ico";

Expand All @@ -10,3 +11,6 @@ export const Logo = (props: { branding?: boolean }) => {
export const LogoWithName = (props: { branding?: boolean }) => {
return <LogoWithNameIcon />;
};
export const LogoHome = (props: { branding?: boolean }) => {
return <LogoHomeIcon />;
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions client/packages/lowcoder/src/components/PageSkeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Layout, Skeleton } from "antd";
import MainContent from "components/layout/MainContent";
import SideBar from "components/layout/SideBar";
import Header from "./layout/Header";
import { Logo, LogoWithName } from "@lowcoder-ee/assets/images";
import { Logo, LogoWithName, LogoHome } from "@lowcoder-ee/assets/images";
import styled from "styled-components";
import { useSelector } from "react-redux";
import { getBrandingConfig, getSystemConfigFetching } from "../redux/selectors/configSelectors";
Expand All @@ -22,6 +22,11 @@ const StyledLogo = styled(Logo)`
width: 24px;
`;

const StyledLogoHome = styled(LogoHome)`
height: 24px;
width: 24px;
`;

const StyledLogoWithName = styled(LogoWithName)`
height: 28px;
/* width: 28px; */
Expand Down Expand Up @@ -78,7 +83,7 @@ export default function PageSkeleton(props: IProps) {
{!hideHeader && isHeaderReady && (
<Header
headerStart={
logoWithName ? <StyledLogoWithName branding={true} /> : <StyledLogo branding={true} />
<StyledLogoHome branding={true} />
}
style={{ backgroundColor: brandingConfig?.headerColor, ...props.headStyle }}
/>
Expand Down