@@ -26,7 +26,9 @@ export default function InviteActionMenu({ invitationId }: Props) {
|
||||
const handleCopyLink = async (invitationId: string) => {
|
||||
try {
|
||||
const link = await getInviteLink({ invitationId });
|
||||
clipboard.copy(link.inviteLink);
|
||||
const url = new URL(link.inviteLink);
|
||||
const inviteLink = `${window.location.origin}${url.pathname}${url.search}`;
|
||||
clipboard.copy(inviteLink);
|
||||
notifications.show({ message: t("Link copied") });
|
||||
} catch (err) {
|
||||
notifications.show({
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { workspaceAtom } from "@/features/user/atoms/current-user-atom.ts";
|
||||
import { useAtom } from "jotai";
|
||||
import * as z from "zod";
|
||||
import { z } from "zod/v4";
|
||||
import { useState } from "react";
|
||||
import { updateWorkspace } from "@/features/workspace/services/workspace-service.ts";
|
||||
import { IWorkspace } from "@/features/workspace/types/workspace.types.ts";
|
||||
import { TextInput, Button } from "@mantine/core";
|
||||
import { useForm } from "@mantine/form";
|
||||
import { zodResolver } from "mantine-form-zod-resolver";
|
||||
import { zod4Resolver } from "mantine-form-zod-resolver";
|
||||
import { notifications } from "@mantine/notifications";
|
||||
import useUserRole from "@/hooks/use-user-role.tsx";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -24,7 +24,7 @@ export default function WorkspaceNameForm() {
|
||||
const { isAdmin } = useUserRole();
|
||||
|
||||
const form = useForm<FormValues>({
|
||||
validate: zodResolver(formSchema),
|
||||
validate: zod4Resolver(formSchema),
|
||||
initialValues: {
|
||||
name: workspace?.name,
|
||||
},
|
||||
|
||||
@@ -25,6 +25,7 @@ export interface IWorkspace {
|
||||
aiSearch?: boolean;
|
||||
generativeAi?: boolean;
|
||||
disablePublicSharing?: boolean;
|
||||
mcpEnabled?: boolean;
|
||||
trashRetentionDays?: number;
|
||||
}
|
||||
|
||||
@@ -36,6 +37,7 @@ export interface IWorkspaceSettings {
|
||||
export interface IWorkspaceAiSettings {
|
||||
search?: boolean;
|
||||
generative?: boolean;
|
||||
mcp?: boolean;
|
||||
}
|
||||
|
||||
export interface IWorkspaceSharingSettings {
|
||||
|
||||
Reference in New Issue
Block a user