diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc1199ff8..6c035c862 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -364,45 +364,6 @@ importers: specifier: ^5.9.2 version: 5.9.2 - dist: - dependencies: - chart.js: - specifier: ^4.5.0 - version: 4.5.0 - chartjs-adapter-date-fns: - specifier: ^3.0.0 - version: 3.0.0(chart.js@4.5.0)(date-fns@2.30.0) - colord: - specifier: ^2.9.2 - version: 2.9.3 - jsonwebtoken: - specifier: ^9.0.2 - version: 9.0.2 - lucide-react: - specifier: ^0.542.0 - version: 0.542.0(react@19.1.1) - pure-rand: - specifier: ^7.0.1 - version: 7.0.1 - react-simple-maps: - specifier: ^2.3.0 - version: 2.3.0(prop-types@15.8.1)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react-use-measure: - specifier: ^2.0.4 - version: 2.1.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react-window: - specifier: ^1.8.6 - version: 1.8.11(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - serialize-error: - specifier: ^12.0.0 - version: 12.0.0 - thenby: - specifier: ^1.3.4 - version: 1.3.4 - uuid: - specifier: ^11.1.0 - version: 11.1.0 - packages: '@ampproject/remapping@2.3.0': @@ -5274,11 +5235,6 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 - lucide-react@0.542.0: - resolution: {integrity: sha512-w3hD8/SQB7+lzU2r4VdFyzzOzKnUjTZIF/MQJGSSvni7Llewni4vuViRppfRAa2guOsY5k4jZyxw/i9DQHv+dw==} - peerDependencies: - react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 - lucide-react@0.543.0: resolution: {integrity: sha512-fpVfuOQO0V3HBaOA1stIiP/A2fPCXHIleRZL16Mx3HmjTYwNSbimhnFBygs2CAfU1geexMX5ItUcWBGUaqw5CA==} peerDependencies: @@ -13394,10 +13350,6 @@ snapshots: dependencies: react: 19.1.1 - lucide-react@0.542.0(react@19.1.1): - dependencies: - react: 19.1.1 - lucide-react@0.543.0(react@19.1.1): dependencies: react: 19.1.1 diff --git a/src/app/(main)/settings/SettingsLayout.tsx b/src/app/(main)/settings/SettingsLayout.tsx index ec70f2a71..e7a7a2f97 100644 --- a/src/app/(main)/settings/SettingsLayout.tsx +++ b/src/app/(main)/settings/SettingsLayout.tsx @@ -43,7 +43,7 @@ export function SettingsLayout({ children }: { children: ReactNode }) { const selectedKey = items .flatMap(e => e.items) - .find(({ path }) => path && pathname.includes(path.split('?')[0]))?.id; + .find(({ path }) => path && pathname.endsWith(path.split('?')[0]))?.id; return ( diff --git a/src/app/(main)/settings/teams/TeamsSettingsPage.tsx b/src/app/(main)/settings/teams/TeamsSettingsPage.tsx index 9d5c8acd2..b7cbe37ef 100644 --- a/src/app/(main)/settings/teams/TeamsSettingsPage.tsx +++ b/src/app/(main)/settings/teams/TeamsSettingsPage.tsx @@ -9,7 +9,7 @@ export function TeamsSettingsPage() { - + ); diff --git a/src/app/(main)/settings/websites/[websiteId]/WebsiteSettingsPage.tsx b/src/app/(main)/settings/websites/[websiteId]/WebsiteSettingsPage.tsx index 18f2a625c..9f52e0e1f 100644 --- a/src/app/(main)/settings/websites/[websiteId]/WebsiteSettingsPage.tsx +++ b/src/app/(main)/settings/websites/[websiteId]/WebsiteSettingsPage.tsx @@ -3,13 +3,16 @@ import { Column } from '@umami/react-zen'; import { WebsiteProvider } from '@/app/(main)/websites/WebsiteProvider'; import { WebsiteSettings } from '@/app/(main)/websites/[websiteId]/settings/WebsiteSettings'; import { WebsiteSettingsHeader } from '@/app/(main)/websites/[websiteId]/settings/WebsiteSettingsHeader'; +import { Panel } from '@/components/common/Panel'; export function WebsiteSettingsPage({ websiteId }: { websiteId: string }) { return ( - + + + ); diff --git a/src/app/(main)/teams/TeamJoinForm.tsx b/src/app/(main)/teams/TeamJoinForm.tsx index f69099ed4..965d82d1f 100644 --- a/src/app/(main)/teams/TeamJoinForm.tsx +++ b/src/app/(main)/teams/TeamJoinForm.tsx @@ -6,11 +6,12 @@ import { Button, FormSubmitButton, } from '@umami/react-zen'; -import { useMessages, useUpdateQuery } from '@/components/hooks'; +import { useMessages, useModified, useUpdateQuery } from '@/components/hooks'; export function TeamJoinForm({ onSave, onClose }: { onSave: () => void; onClose: () => void }) { const { formatMessage, labels, getErrorMessage } = useMessages(); - const { mutate, error, isPending, touch } = useUpdateQuery('/teams/join'); + const { mutate, error } = useUpdateQuery('/teams/join'); + const { touch } = useModified(); const handleSubmit = async (data: any) => { mutate(data, { @@ -33,9 +34,7 @@ export function TeamJoinForm({ onSave, onClose }: { onSave: () => void; onClose: - - {formatMessage(labels.join)} - + {formatMessage(labels.join)} ); diff --git a/src/app/(main)/teams/TeamsTable.tsx b/src/app/(main)/teams/TeamsTable.tsx index 2108de130..aaf27f524 100644 --- a/src/app/(main)/teams/TeamsTable.tsx +++ b/src/app/(main)/teams/TeamsTable.tsx @@ -1,13 +1,17 @@ -import { DataColumn, DataTable } from '@umami/react-zen'; +import { DataColumn, DataTable, Icon, MenuItem, Text, Row } from '@umami/react-zen'; import { useMessages } from '@/components/hooks'; +import { Eye, Edit } from '@/components/icons'; import { ROLES } from '@/lib/constants'; +import { MenuButton } from '@/components/input/MenuButton'; import { ReactNode } from 'react'; export function TeamsTable({ data = [], + showActions = false, renderLink, }: { data: any[]; + showActions?: boolean; renderLink?: (row: any) => ReactNode; }) { const { formatMessage, labels } = useMessages(); @@ -26,6 +30,34 @@ export function TeamsTable({ {(row: any) => row?._count?.members} + {showActions ? ( + + {(row: any) => { + const { id } = row; + + return ( + + + + + + + {formatMessage(labels.view)} + + + + + + + + {formatMessage(labels.edit)} + + + + ); + }} + + ) : null} ); } diff --git a/src/app/(main)/teams/[teamId]/TeamEditForm.tsx b/src/app/(main)/teams/[teamId]/TeamEditForm.tsx index 2b6690ff2..98c2fbf34 100644 --- a/src/app/(main)/teams/[teamId]/TeamEditForm.tsx +++ b/src/app/(main)/teams/[teamId]/TeamEditForm.tsx @@ -14,12 +14,10 @@ const generateId = () => `team_${getRandomChars(16)}`; export function TeamEditForm({ teamId, allowEdit, - showAccessCode, onSave, }: { teamId: string; allowEdit?: boolean; - showAccessCode?: boolean; onSave?: () => void; }) { const team = useTeam(); @@ -53,11 +51,9 @@ export function TeamEditForm({ > - {showAccessCode && ( - - - - )} + + + {allowEdit && (