diff --git a/src/app/(main)/settings/SettingsLayout.tsx b/src/app/(main)/settings/SettingsLayout.tsx index 5af26fa5..787d6c64 100644 --- a/src/app/(main)/settings/SettingsLayout.tsx +++ b/src/app/(main)/settings/SettingsLayout.tsx @@ -1,10 +1,10 @@ 'use client'; -import { ReactNode } from 'react'; -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, Settings2 } from '@/components/icons'; +import { useMessages, useNavigation } from '@/components/hooks'; +import { Settings2, UserCircle, Users } from '@/components/icons'; +import { Column, Grid } from '@umami/react-zen'; +import { ReactNode } from 'react'; export function SettingsLayout({ children }: { children: ReactNode }) { const { formatMessage, labels } = useMessages(); @@ -46,8 +46,15 @@ export function SettingsLayout({ children }: { children: ReactNode }) { .find(({ path }) => path && pathname.includes(path.split('?')[0]))?.id; return ( - - + + }) { const { auth, error } = await parseRequest(request); @@ -41,7 +41,7 @@ export async function POST( return notFound(); } - if (!(await canUpdateReport(auth, report))) { + if (!(await canUpdateWebsite(auth, websiteId))) { return unauthorized(); } @@ -70,7 +70,7 @@ export async function DELETE( const { reportId } = await params; const report = await getReport(reportId); - if (!(await canDeleteReport(auth, report))) { + if (!(await canDeleteWebsite(auth, report.websiteId))) { return unauthorized(); } diff --git a/src/components/hooks/useLocale.ts b/src/components/hooks/useLocale.ts index 8d96fdde..9dd164e5 100644 --- a/src/components/hooks/useLocale.ts +++ b/src/components/hooks/useLocale.ts @@ -26,7 +26,7 @@ export function useLocale() { } async function saveLocale(value: string) { - if (!messages[value]) { + if (!messages[value] && !process.env.cloudMode) { await loadMessages(value); } diff --git a/src/components/input/NavButton.tsx b/src/components/input/NavButton.tsx index e1f7129d..b57c2ecd 100644 --- a/src/components/input/NavButton.tsx +++ b/src/components/input/NavButton.tsx @@ -69,7 +69,7 @@ export function NavButton({ showText = true }: TeamsButtonProps) { shadow="1" maxHeight="40px" role="button" - style={{ cursor: 'pointer', textWrap: 'nowrap', outline: 'none' }} + style={{ cursor: 'pointer', textWrap: 'nowrap', overflow: 'hidden', outline: 'none' }} > {teamId ? : }