mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 09:57:00 +01:00
Remove team access code functionality from cloud mode
This commit is contained in:
parent
d62dd3be44
commit
6b381e7157
@ -8,11 +8,12 @@ import TeamsAddButton from './TeamsAddButton';
|
||||
export function TeamsHeader({ allowCreate = true }: { allowCreate?: boolean }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { user } = useLogin();
|
||||
const cloudMode = process.env.CLOUD_MODE;
|
||||
|
||||
return (
|
||||
<PageHeader title={formatMessage(labels.teams)}>
|
||||
<Flexbox gap={10}>
|
||||
<TeamsJoinButton />
|
||||
{!cloudMode && <TeamsJoinButton />}
|
||||
{allowCreate && user.role !== ROLES.viewOnly && <TeamsAddButton />}
|
||||
</Flexbox>
|
||||
</PageHeader>
|
||||
|
@ -26,6 +26,7 @@ export function TeamEditForm({ teamId, allowEdit }: { teamId: string; allowEdit?
|
||||
const ref = useRef(null);
|
||||
const [accessCode, setAccessCode] = useState(team.accessCode);
|
||||
const { showToast } = useToasts();
|
||||
const cloudMode = process.env.CLOUD_MODE;
|
||||
|
||||
const handleSubmit = async (data: any) => {
|
||||
mutate(data, {
|
||||
@ -58,7 +59,7 @@ export function TeamEditForm({ teamId, allowEdit }: { teamId: string; allowEdit?
|
||||
)}
|
||||
{!allowEdit && team.name}
|
||||
</FormRow>
|
||||
{allowEdit && (
|
||||
{!cloudMode && allowEdit && (
|
||||
<FormRow label={formatMessage(labels.accessCode)}>
|
||||
<Flexbox gap={10}>
|
||||
<TextField value={accessCode} readOnly allowCopy />
|
||||
|
Loading…
Reference in New Issue
Block a user