mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Added menu options for cloud mode. Async fixes.
This commit is contained in:
parent
4df6f06485
commit
f639bb07f4
12 changed files with 47 additions and 27 deletions
|
|
@ -17,7 +17,7 @@ export function PixelDeleteButton({
|
|||
const { mutateAsync, isPending, error } = useDeleteQuery(`/pixels/${pixelId}`);
|
||||
const { touch } = useModified();
|
||||
|
||||
const handleConfirm = (close: () => void) => {
|
||||
const handleConfirm = async (close: () => void) => {
|
||||
await mutateAsync(null, {
|
||||
onSuccess: () => {
|
||||
touch('pixels');
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export function PixelEditButton({ pixelId }: { pixelId: string }) {
|
|||
|
||||
return (
|
||||
<ActionButton title={formatMessage(labels.edit)} icon={<Edit />}>
|
||||
<Dialog title={formatMessage(labels.pixel)} style={{ width: 800, minHeight: 300 }}>
|
||||
<Dialog title={formatMessage(labels.pixel)} style={{ width: 600, minHeight: 300 }}>
|
||||
{({ close }) => {
|
||||
return <PixelEditForm pixelId={pixelId} onClose={close} />;
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -106,10 +106,7 @@ export function PixelEditForm({
|
|||
allowCopy
|
||||
style={{ width: '100%' }}
|
||||
/>
|
||||
<Button
|
||||
variant="quiet"
|
||||
onPress={() => setValue('slug', handleSlug(), { shouldDirty: true })}
|
||||
>
|
||||
<Button onPress={() => setValue('slug', handleSlug(), { shouldDirty: true })}>
|
||||
<Icon>
|
||||
<RefreshCw />
|
||||
</Icon>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { usePixel, useMessages, useSlug } from '@/components/hooks';
|
||||
import { PageHeader } from '@/components/common/PageHeader';
|
||||
import { Icon, Text } from '@umami/react-zen';
|
||||
import { ExternalLink, Pixel } from '@/components/icons';
|
||||
import { ExternalLink, Grid2x2 } from '@/components/icons';
|
||||
import { LinkButton } from '@/components/common/LinkButton';
|
||||
|
||||
export function PixelHeader() {
|
||||
|
|
@ -10,7 +10,7 @@ export function PixelHeader() {
|
|||
const pixel = usePixel();
|
||||
|
||||
return (
|
||||
<PageHeader title={pixel.name} description={pixel.url} icon={<Pixel />}>
|
||||
<PageHeader title={pixel.name} description={pixel.slug} icon={<Grid2x2 />}>
|
||||
<LinkButton href={getSlugUrl(pixel.slug)} target="_blank">
|
||||
<Icon>
|
||||
<ExternalLink />
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { PixelPage } from './PixelPage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default async function ({ params }: { params: Promise<{ pixelId: string }> }) {
|
||||
const { pixelId } = await params;
|
||||
export default function ({ params }: { params: { pixelId: string } }) {
|
||||
const { pixelId } = params;
|
||||
|
||||
return <PixelPage pixelId={pixelId} />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { Grid, Column } from '@umami/react-zen';
|
|||
import { useMessages, useNavigation } from '@/components/hooks';
|
||||
import { PageBody } from '@/components/common/PageBody';
|
||||
import { SideMenu } from '@/components/common/SideMenu';
|
||||
import { UserCircle, Users, Knobs } from '@/components/icons';
|
||||
import { UserCircle, Users, Settings2 } from '@/components/icons';
|
||||
|
||||
export function SettingsLayout({ children }: { children: ReactNode }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
@ -18,7 +18,7 @@ export function SettingsLayout({ children }: { children: ReactNode }) {
|
|||
id: 'preferences',
|
||||
label: formatMessage(labels.preferences),
|
||||
path: renderUrl('/settings/preferences'),
|
||||
icon: <Knobs />,
|
||||
icon: <Settings2 />,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {
|
|||
Search,
|
||||
Type,
|
||||
SquareSlash,
|
||||
SquareArrowRight,
|
||||
Share2,
|
||||
Megaphone,
|
||||
Earth,
|
||||
Globe,
|
||||
|
|
@ -20,7 +20,7 @@ import {
|
|||
Monitor,
|
||||
Cpu,
|
||||
LightningSvg,
|
||||
LucideCaseSensitive,
|
||||
Network,
|
||||
Tag,
|
||||
} from '@/components/icons';
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ export function WebsiteExpandedView({
|
|||
id: 'referrer',
|
||||
label: formatMessage(labels.referrer),
|
||||
path: updateParams({ view: 'referrer' }),
|
||||
icon: <SquareArrowRight />,
|
||||
icon: <Share2 />,
|
||||
},
|
||||
{
|
||||
id: 'channel',
|
||||
|
|
@ -167,7 +167,7 @@ export function WebsiteExpandedView({
|
|||
id: 'hostname',
|
||||
label: formatMessage(labels.hostname),
|
||||
path: updateParams({ view: 'hostname' }),
|
||||
icon: <LucideCaseSensitive />,
|
||||
icon: <Network />,
|
||||
},
|
||||
{
|
||||
id: 'tag',
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
MagnetSvg,
|
||||
Tag,
|
||||
MoneySvg,
|
||||
Network,
|
||||
NetworkSvg,
|
||||
ChartPie,
|
||||
UserPlus,
|
||||
CompareSvg,
|
||||
|
|
@ -137,7 +137,7 @@ export function WebsiteNav({ websiteId }: { websiteId: string }) {
|
|||
{
|
||||
id: 'attribution',
|
||||
label: formatMessage(labels.attribution),
|
||||
icon: <Network />,
|
||||
icon: <NetworkSvg />,
|
||||
path: renderPath('/attribution'),
|
||||
},
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue