Polish board and dashboard design actions
This commit is contained in:
1 parent
ad7b64653f
commit
d9766e3952
7 files changed
+30
-22
No files matched your search
@@ -25,8 +25,8 @@ export function BoardsTable(props: DataTableProps) {
|
||||
{({ id, name }: any) => {
|
||||
return (
|
||||
<Row>
|
||||
<BoardEditButton boardId={id} />
|
||||
<BoardDesignButton boardId={id} />
|
||||
<BoardEditButton boardId={id} />
|
||||
<BoardDeleteButton boardId={id} name={name} />
|
||||
</Row>
|
||||
);
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
TextField,
|
||||
} from '@umami/react-zen';
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { Panel } from '@/components/common/Panel';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { LinkSelect } from '@/components/input/LinkSelect';
|
||||
import { PixelSelect } from '@/components/input/PixelSelect';
|
||||
@@ -199,8 +198,8 @@ export function BoardComponentSelect({
|
||||
|
||||
return (
|
||||
<Column gap="4">
|
||||
<Row gap="4" style={{ height: 600 }}>
|
||||
<Column gap="3" style={{ width: 320, flexShrink: 0, overflowY: 'auto' }}>
|
||||
<Row gap="6" style={{ height: 600 }}>
|
||||
<Column gap="3" style={{ width: 280, flexShrink: 0, overflowY: 'auto' }}>
|
||||
<Text weight="bold">{t(labels.properties)}</Text>
|
||||
|
||||
{needsWebsite && isOpenType && (
|
||||
@@ -313,10 +312,11 @@ export function BoardComponentSelect({
|
||||
)}
|
||||
</Column>
|
||||
|
||||
<Column gap="3" style={{ width: 280, flexShrink: 0, minWidth: 0 }}>
|
||||
<Panel maxHeight="100%">
|
||||
<Column gap="3" height="100%" style={{ width: 280, flexShrink: 0, minWidth: 0 }}>
|
||||
<Text weight="bold">Components</Text>
|
||||
<Column border="left" paddingLeft="4" height="100%" style={{ minHeight: 0 }}>
|
||||
{hasSelectedEntity ? (
|
||||
<Column gap="1" height="100%" style={{ overflowY: 'auto' }}>
|
||||
<Column gap="1" height="100%" style={{ overflowY: 'auto', minHeight: 0 }}>
|
||||
{availableDefinitions.map(def => {
|
||||
const Icon = def.icon;
|
||||
|
||||
@@ -324,7 +324,7 @@ export function BoardComponentSelect({
|
||||
<Focusable key={def.type}>
|
||||
<Row
|
||||
gap="3"
|
||||
alignItems="center"
|
||||
alignItems="flex-start"
|
||||
paddingX="3"
|
||||
paddingY="2"
|
||||
borderRadius
|
||||
@@ -357,11 +357,12 @@ export function BoardComponentSelect({
|
||||
<Text color="muted">{t(messages.selectBoardEntityFirst)}</Text>
|
||||
</Column>
|
||||
)}
|
||||
</Panel>
|
||||
</Column>
|
||||
</Column>
|
||||
|
||||
<Column gap="3" flexGrow={1} style={{ minWidth: 0 }}>
|
||||
<Panel maxHeight="100%">
|
||||
<Column gap="3" flexGrow={1} height="100%" style={{ minWidth: 0 }}>
|
||||
<Text weight="bold">Preview</Text>
|
||||
<Column border="left" paddingLeft="4" height="100%" style={{ minWidth: 0 }}>
|
||||
{hasSelectedEntity && previewConfig && (!needsWebsite || resolvedEntityId) ? (
|
||||
<BoardComponentRenderer config={previewConfig} websiteId={resolvedEntityId} />
|
||||
) : (
|
||||
@@ -375,7 +376,7 @@ export function BoardComponentSelect({
|
||||
</Text>
|
||||
</Column>
|
||||
)}
|
||||
</Panel>
|
||||
</Column>
|
||||
</Column>
|
||||
</Row>
|
||||
|
||||
|
||||
@@ -80,7 +80,13 @@ export function BoardEditColumn({
|
||||
onMouseLeave={() => setShowActions(false)}
|
||||
>
|
||||
{canEdit && canRemoveAction && showActions && (
|
||||
<Box position="absolute" top="12px" right="12px" zIndex={100}>
|
||||
<Box
|
||||
position="absolute"
|
||||
top="50%"
|
||||
left="50%"
|
||||
zIndex={100}
|
||||
style={{ transform: 'translate(-50%, -50%)' }}
|
||||
>
|
||||
<Row gap="1" padding="2" borderRadius backgroundColor="surface-sunken">
|
||||
{hasComponent && (
|
||||
<TooltipTrigger delay={0}>
|
||||
|
||||
@@ -27,12 +27,12 @@ export function BoardViewHeader({
|
||||
{showEntityBadge && entityBadge && <BoardEntityBadge {...entityBadge} />}
|
||||
{showActions && board?.id && (
|
||||
<>
|
||||
<LinkButton href={renderUrl(`/boards/${board.id}/edit`, false)}>
|
||||
<IconLabel icon={<Edit />}>{t(labels.edit)}</IconLabel>
|
||||
</LinkButton>
|
||||
<LinkButton href={renderUrl(`/boards/${board.id}/design`, false)}>
|
||||
<IconLabel icon={<LayoutDashboard />}>Design</IconLabel>
|
||||
</LinkButton>
|
||||
<LinkButton href={renderUrl(`/boards/${board.id}/edit`, false)}>
|
||||
<IconLabel icon={<Edit />}>{t(labels.edit)}</IconLabel>
|
||||
</LinkButton>
|
||||
</>
|
||||
)}
|
||||
</Row>
|
||||
|
||||
@@ -26,7 +26,7 @@ export function BoardEditPage({ boardId }: { boardId: string }) {
|
||||
<>
|
||||
<Column marginTop="6">
|
||||
<Link href={renderUrl(`/boards/${boardId}`)}>
|
||||
<IconLabel icon={<ArrowLeft />} label={t(labels.boards)} />
|
||||
<IconLabel icon={<ArrowLeft />} label="Board" />
|
||||
</Link>
|
||||
</Column>
|
||||
<PageHeader
|
||||
|
||||
@@ -3,11 +3,12 @@ import { TextBlock } from '@/app/(main)/boards/TextBlock';
|
||||
import { WebsiteChart } from '@/app/(main)/websites/[websiteId]/WebsiteChart';
|
||||
import { WebsiteMetricsBar } from '@/app/(main)/websites/[websiteId]/WebsiteMetricsBar';
|
||||
import {
|
||||
Activity,
|
||||
Calendar,
|
||||
ChartColumnBig,
|
||||
ChartPie,
|
||||
FileText,
|
||||
Globe,
|
||||
PanelTop,
|
||||
Sheet,
|
||||
} from '@/components/icons';
|
||||
import { EventsChart } from '@/components/metrics/EventsChart';
|
||||
@@ -75,7 +76,7 @@ const componentDefinitions: ComponentDefinition[] = [
|
||||
name: 'Metrics bar',
|
||||
description: 'Key metrics: views, visitors, bounces, time on site',
|
||||
category: 'overview',
|
||||
icon: ChartPie,
|
||||
icon: PanelTop,
|
||||
component: WebsiteMetricsBar,
|
||||
},
|
||||
{
|
||||
@@ -83,7 +84,7 @@ const componentDefinitions: ComponentDefinition[] = [
|
||||
name: 'Website chart',
|
||||
description: 'Page views and visitors over time',
|
||||
category: 'overview',
|
||||
icon: Activity,
|
||||
icon: ChartColumnBig,
|
||||
component: WebsiteChart,
|
||||
},
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { IconLabel } from '@/components/common/IconLabel';
|
||||
import { LinkButton } from '@/components/common/LinkButton';
|
||||
import { PageHeader } from '@/components/common/PageHeader';
|
||||
import { useMessages, useNavigation } from '@/components/hooks';
|
||||
import { Edit } from '@/components/icons';
|
||||
import { LayoutDashboard } from '@/components/icons';
|
||||
|
||||
export function DashboardViewHeader() {
|
||||
const { t, labels } = useMessages();
|
||||
@@ -11,7 +11,7 @@ export function DashboardViewHeader() {
|
||||
return (
|
||||
<PageHeader title={t(labels.dashboard)}>
|
||||
<LinkButton href={renderUrl('/dashboard/edit', false)}>
|
||||
<IconLabel icon={<Edit />}>{t(labels.edit)}</IconLabel>
|
||||
<IconLabel icon={<LayoutDashboard />}>Design</IconLabel>
|
||||
</LinkButton>
|
||||
</PageHeader>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user