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 { MainHeader } from "~/components/layout/header";
|
||||||
import { appShellLogoHeight } from "~/components/layout/constants";
|
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 { ClientShell } from "~/components/layout/shell";
|
||||||
import { BoardTourGate } from "~/components/onboarding/board-tour-gate";
|
import { BoardTourGate } from "~/components/onboarding/board-tour-gate";
|
||||||
import { env } from "~/env";
|
import { env } from "~/env";
|
||||||
@@ -112,7 +112,6 @@ export const createBoardLayout = <TParams extends Params>({
|
|||||||
<MainHeader
|
<MainHeader
|
||||||
logo={<BoardLogo size={appShellLogoHeight} />}
|
logo={<BoardLogo size={appShellLogoHeight} />}
|
||||||
logoWithTitle={<BoardLogoWithTitle size="md" />}
|
logoWithTitle={<BoardLogoWithTitle size="md" />}
|
||||||
mobileLogoWithTitle={<BoardLogoWithName size="md" />}
|
|
||||||
actions={headerActions}
|
actions={headerActions}
|
||||||
boardEditAction={headerBoardEditAction}
|
boardEditAction={headerBoardEditAction}
|
||||||
boardSettingsAction={headerBoardSettingsAction}
|
boardSettingsAction={headerBoardSettingsAction}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { HomarrLogo, HomarrLogoWithTitle } from "./logo/homarr-logo";
|
|||||||
interface Props {
|
interface Props {
|
||||||
logo?: ReactNode;
|
logo?: ReactNode;
|
||||||
logoWithTitle?: ReactNode;
|
logoWithTitle?: ReactNode;
|
||||||
mobileLogoWithTitle?: ReactNode;
|
|
||||||
actions?: ReactNode;
|
actions?: ReactNode;
|
||||||
boardEditAction?: ReactNode;
|
boardEditAction?: ReactNode;
|
||||||
boardSettingsAction?: ReactNode;
|
boardSettingsAction?: ReactNode;
|
||||||
@@ -20,7 +19,6 @@ interface Props {
|
|||||||
export const MainHeader = async ({
|
export const MainHeader = async ({
|
||||||
logo,
|
logo,
|
||||||
logoWithTitle,
|
logoWithTitle,
|
||||||
mobileLogoWithTitle,
|
|
||||||
actions,
|
actions,
|
||||||
boardEditAction,
|
boardEditAction,
|
||||||
boardSettingsAction,
|
boardSettingsAction,
|
||||||
@@ -35,7 +33,6 @@ export const MainHeader = async ({
|
|||||||
<ConfigurableHeader
|
<ConfigurableHeader
|
||||||
logo={logo ?? <HomarrLogo size={appShellLogoHeight} />}
|
logo={logo ?? <HomarrLogo size={appShellLogoHeight} />}
|
||||||
logoWithTitle={resolvedLogoWithTitle}
|
logoWithTitle={resolvedLogoWithTitle}
|
||||||
mobileLogoWithTitle={mobileLogoWithTitle ?? resolvedLogoWithTitle}
|
|
||||||
actions={actions}
|
actions={actions}
|
||||||
boardEditAction={boardEditAction}
|
boardEditAction={boardEditAction}
|
||||||
boardSettingsAction={boardSettingsAction}
|
boardSettingsAction={boardSettingsAction}
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ import classes from "./configurable-header.module.css";
|
|||||||
interface ConfigurableHeaderProps {
|
interface ConfigurableHeaderProps {
|
||||||
logo: ReactNode;
|
logo: ReactNode;
|
||||||
logoWithTitle: ReactNode;
|
logoWithTitle: ReactNode;
|
||||||
mobileLogoWithTitle: ReactNode;
|
|
||||||
actions?: ReactNode;
|
actions?: ReactNode;
|
||||||
boardEditAction?: ReactNode;
|
boardEditAction?: ReactNode;
|
||||||
boardSettingsAction?: ReactNode;
|
boardSettingsAction?: ReactNode;
|
||||||
@@ -57,7 +56,6 @@ const floatingControlsDismissDelayMs = 900;
|
|||||||
export const ConfigurableHeader = ({
|
export const ConfigurableHeader = ({
|
||||||
logo,
|
logo,
|
||||||
logoWithTitle,
|
logoWithTitle,
|
||||||
mobileLogoWithTitle,
|
|
||||||
actions,
|
actions,
|
||||||
boardEditAction,
|
boardEditAction,
|
||||||
boardSettingsAction,
|
boardSettingsAction,
|
||||||
@@ -136,12 +134,7 @@ export const ConfigurableHeader = ({
|
|||||||
<div className={classes.mobileContent}>
|
<div className={classes.mobileContent}>
|
||||||
<Group className={classes.mobileIdentity} gap="xs" wrap="nowrap">
|
<Group className={classes.mobileIdentity} gap="xs" wrap="nowrap">
|
||||||
{hasNavigation ? <ClientBurger /> : null}
|
{hasNavigation ? <ClientBurger /> : null}
|
||||||
<HeaderLogo
|
<HeaderLogo display="logo" logo={logo} logoWithTitle={logoWithTitle} label={t("items.logo")} />
|
||||||
display="logoAndText"
|
|
||||||
logo={logo}
|
|
||||||
logoWithTitle={mobileLogoWithTitle}
|
|
||||||
label={t("items.logo")}
|
|
||||||
/>
|
|
||||||
</Group>
|
</Group>
|
||||||
<Group className={classes.mobileActions} gap="xs" wrap="nowrap">
|
<Group className={classes.mobileActions} gap="xs" wrap="nowrap">
|
||||||
{actions}
|
{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