mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Fixed maximize button on Panel.
This commit is contained in:
parent
795a1caadf
commit
fed8d4c71a
3 changed files with 14 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -32,6 +32,7 @@ pm2.yml
|
||||||
.vscode
|
.vscode
|
||||||
.tool-versions
|
.tool-versions
|
||||||
.claude
|
.claude
|
||||||
|
.agents
|
||||||
tmpclaude*
|
tmpclaude*
|
||||||
nul
|
nul
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,7 @@ export function Journey({ websiteId, steps, startStep, endStep, view }: JourneyP
|
||||||
<div>{formatLongNumber(nodeCount)}</div>
|
<div>{formatLongNumber(nodeCount)}</div>
|
||||||
</Focusable>
|
</Focusable>
|
||||||
<Tooltip placement="top" offset={20} showArrow>
|
<Tooltip placement="top" offset={20} showArrow>
|
||||||
<Text transform="lowercase" color="red-700">
|
<Text transform="lowercase" color="red">
|
||||||
{`${dropped}% ${formatMessage(labels.dropoff)}`}
|
{`${dropped}% ${formatMessage(labels.dropoff)}`}
|
||||||
</Text>
|
</Text>
|
||||||
<Column>
|
<Column>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import {
|
||||||
Heading,
|
Heading,
|
||||||
Icon,
|
Icon,
|
||||||
Row,
|
Row,
|
||||||
Text,
|
|
||||||
Tooltip,
|
Tooltip,
|
||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
} from '@umami/react-zen';
|
} from '@umami/react-zen';
|
||||||
|
|
@ -20,15 +19,23 @@ export interface PanelProps extends ColumnProps {
|
||||||
|
|
||||||
const fullscreenStyles = {
|
const fullscreenStyles = {
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
width: '100%',
|
width: '100vw',
|
||||||
height: '100%',
|
height: '100vh',
|
||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
border: 'none',
|
border: 'none',
|
||||||
zIndex: 9999,
|
zIndex: 9999,
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
export function Panel({ title, allowFullscreen, style, children, ...props }: PanelProps) {
|
export function Panel({
|
||||||
|
title,
|
||||||
|
allowFullscreen,
|
||||||
|
style,
|
||||||
|
children,
|
||||||
|
height,
|
||||||
|
width,
|
||||||
|
...props
|
||||||
|
}: PanelProps) {
|
||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
const [isFullscreen, setIsFullscreen] = useState(false);
|
const [isFullscreen, setIsFullscreen] = useState(false);
|
||||||
|
|
||||||
|
|
@ -46,7 +53,7 @@ export function Panel({ title, allowFullscreen, style, children, ...props }: Pan
|
||||||
position="relative"
|
position="relative"
|
||||||
gap
|
gap
|
||||||
{...props}
|
{...props}
|
||||||
style={{ ...style, ...(isFullscreen ? fullscreenStyles : {}) }}
|
style={{ ...style, ...(isFullscreen ? fullscreenStyles : { height, width }) }}
|
||||||
>
|
>
|
||||||
{title && <Heading>{title}</Heading>}
|
{title && <Heading>{title}</Heading>}
|
||||||
{allowFullscreen && (
|
{allowFullscreen && (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue