mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Fixed teams settings.
This commit is contained in:
parent
9104332623
commit
b0c9197f2d
21 changed files with 40 additions and 2 deletions
|
|
@ -167,6 +167,10 @@ const config = {
|
|||
source: '/telemetry.js',
|
||||
destination: '/api/scripts/telemetry',
|
||||
},
|
||||
{
|
||||
source: '/teams/:teamId/settings/:path*',
|
||||
destination: '/teams/:teamId/settings/:path*',
|
||||
},
|
||||
{
|
||||
source: '/teams/:teamId/:path*',
|
||||
destination: '/:path*',
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
import TeamProvider from './TeamProvider';
|
||||
import { Metadata } from 'next';
|
||||
import TeamSettingsLayout from './settings/TeamSettingsLayout';
|
||||
|
||||
export default function ({ children, params: { teamId } }) {
|
||||
return <TeamProvider teamId={teamId}>{children}</TeamProvider>;
|
||||
return (
|
||||
<TeamProvider teamId={teamId}>
|
||||
<TeamSettingsLayout>{children}</TeamSettingsLayout>
|
||||
</TeamProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export const metadata: Metadata = {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
'use client';
|
||||
import { ReactNode } from 'react';
|
||||
import { useMessages, useTeamUrl } from 'components/hooks';
|
||||
import MenuLayout from 'components/layout/MenuLayout';
|
||||
|
||||
export default function TeamSettingsLayout({ children }: { children: ReactNode }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { teamId } = useTeamUrl();
|
||||
|
||||
const items = [
|
||||
{
|
||||
key: 'team',
|
||||
label: formatMessage(labels.team),
|
||||
url: `/teams/${teamId}/settings/team`,
|
||||
},
|
||||
{
|
||||
key: 'websites',
|
||||
label: formatMessage(labels.websites),
|
||||
url: `/teams/${teamId}/settings/websites`,
|
||||
},
|
||||
{
|
||||
key: 'members',
|
||||
label: formatMessage(labels.members),
|
||||
url: `/teams/${teamId}/settings/members`,
|
||||
},
|
||||
].filter(n => n);
|
||||
|
||||
return <MenuLayout items={items}>{children}</MenuLayout>;
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@ import PageHeader from 'components/layout/PageHeader';
|
|||
import { ROLES } from 'lib/constants';
|
||||
import { useContext, useState } from 'react';
|
||||
import { Flexbox, Item, Tabs } from 'react-basics';
|
||||
import TeamLeaveButton from '../../TeamLeaveButton';
|
||||
import TeamLeaveButton from 'app/(main)/settings/teams/TeamLeaveButton';
|
||||
import TeamManage from './TeamManage';
|
||||
import TeamEditForm from './TeamEditForm';
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue