fix: keep mobile header logo condensed
This commit is contained in:
1 parent
63e1bc7f6c
commit
322d4a7fc4
4 files changed
+2
-19
No files matched your search
@@ -13,7 +13,7 @@ import { ModalProvider } from "@homarr/modals";
|
||||
|
||||
import { MainHeader } from "~/components/layout/header";
|
||||
import { appShellLogoHeight } from "~/components/layout/constants";
|
||||
import { BoardLogo, BoardLogoWithName, BoardLogoWithTitle } from "~/components/layout/logo/board-logo";
|
||||
import { BoardLogo, BoardLogoWithTitle } from "~/components/layout/logo/board-logo";
|
||||
import { ClientShell } from "~/components/layout/shell";
|
||||
import { BoardTourGate } from "~/components/onboarding/board-tour-gate";
|
||||
import { env } from "~/env";
|
||||
@@ -112,7 +112,6 @@ export const createBoardLayout = <TParams extends Params>({
|
||||
<MainHeader
|
||||
logo={<BoardLogo size={appShellLogoHeight} />}
|
||||
logoWithTitle={<BoardLogoWithTitle size="md" />}
|
||||
mobileLogoWithTitle={<BoardLogoWithName size="md" />}
|
||||
actions={headerActions}
|
||||
boardEditAction={headerBoardEditAction}
|
||||
boardSettingsAction={headerBoardSettingsAction}
|
||||
|
||||
@@ -10,7 +10,6 @@ import { HomarrLogo, HomarrLogoWithTitle } from "./logo/homarr-logo";
|
||||
interface Props {
|
||||
logo?: ReactNode;
|
||||
logoWithTitle?: ReactNode;
|
||||
mobileLogoWithTitle?: ReactNode;
|
||||
actions?: ReactNode;
|
||||
boardEditAction?: ReactNode;
|
||||
boardSettingsAction?: ReactNode;
|
||||
@@ -20,7 +19,6 @@ interface Props {
|
||||
export const MainHeader = async ({
|
||||
logo,
|
||||
logoWithTitle,
|
||||
mobileLogoWithTitle,
|
||||
actions,
|
||||
boardEditAction,
|
||||
boardSettingsAction,
|
||||
@@ -35,7 +33,6 @@ export const MainHeader = async ({
|
||||
<ConfigurableHeader
|
||||
logo={logo ?? <HomarrLogo size={appShellLogoHeight} />}
|
||||
logoWithTitle={resolvedLogoWithTitle}
|
||||
mobileLogoWithTitle={mobileLogoWithTitle ?? resolvedLogoWithTitle}
|
||||
actions={actions}
|
||||
boardEditAction={boardEditAction}
|
||||
boardSettingsAction={boardSettingsAction}
|
||||
|
||||
@@ -38,7 +38,6 @@ import classes from "./configurable-header.module.css";
|
||||
interface ConfigurableHeaderProps {
|
||||
logo: ReactNode;
|
||||
logoWithTitle: ReactNode;
|
||||
mobileLogoWithTitle: ReactNode;
|
||||
actions?: ReactNode;
|
||||
boardEditAction?: ReactNode;
|
||||
boardSettingsAction?: ReactNode;
|
||||
@@ -57,7 +56,6 @@ const floatingControlsDismissDelayMs = 900;
|
||||
export const ConfigurableHeader = ({
|
||||
logo,
|
||||
logoWithTitle,
|
||||
mobileLogoWithTitle,
|
||||
actions,
|
||||
boardEditAction,
|
||||
boardSettingsAction,
|
||||
@@ -136,12 +134,7 @@ export const ConfigurableHeader = ({
|
||||
<div className={classes.mobileContent}>
|
||||
<Group className={classes.mobileIdentity} gap="xs" wrap="nowrap">
|
||||
{hasNavigation ? <ClientBurger /> : null}
|
||||
<HeaderLogo
|
||||
display="logoAndText"
|
||||
logo={logo}
|
||||
logoWithTitle={mobileLogoWithTitle}
|
||||
label={t("items.logo")}
|
||||
/>
|
||||
<HeaderLogo display="logo" logo={logo} logoWithTitle={logoWithTitle} label={t("items.logo")} />
|
||||
</Group>
|
||||
<Group className={classes.mobileActions} gap="xs" wrap="nowrap">
|
||||
{actions}
|
||||
|
||||
@@ -44,9 +44,3 @@ export const BoardLogoWithTitle = ({ size, hideTitleOnMobile }: CommonLogoWithTi
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const BoardLogoWithName = ({ size }: Pick<CommonLogoWithTitleProps, "size">) => {
|
||||
const board = useRequiredBoard();
|
||||
const imageOptions = useImageOptions();
|
||||
return <LogoWithTitle size={size} title={board.name} image={imageOptions} />;
|
||||
};
|
||||
Reference in new issue
Block a user