diff --git a/apps/client/public/locales/en-US/translation.json b/apps/client/public/locales/en-US/translation.json index f35ec179..98f8eefc 100644 --- a/apps/client/public/locales/en-US/translation.json +++ b/apps/client/public/locales/en-US/translation.json @@ -708,5 +708,20 @@ "Resend verification email": "Resend verification email", "Verification email sent. Please check your inbox.": "Verification email sent. Please check your inbox.", "Failed to resend verification email. Please try again.": "Failed to resend verification email. Please try again.", - "We've sent you an email with your associated workspaces.": "We've sent you an email with your associated workspaces." + "We've sent you an email with your associated workspaces.": "We've sent you an email with your associated workspaces.", + "Load more": "Load more", + "Log out of all devices": "Log out of all devices", + "Log out of all sessions except this device": "Log out of all sessions except this device", + "This Device": "This Device", + "Unknown device": "Unknown device", + "No active sessions": "No active sessions", + "Session revoked": "Session revoked", + "All other sessions revoked": "All other sessions revoked", + "Last used": "Last used", + "Created": "Created", + "Rename": "Rename", + "Publish": "Publish", + "Security": "Security", + "Enforce SSO": "Enforce SSO", + "Once enforced, members will not be able to login with email and password.": "Once enforced, members will not be able to login with email and password." } diff --git a/apps/client/src/ee/licence/components/activate-license-modal.tsx b/apps/client/src/ee/licence/components/activate-license-modal.tsx index 28b3d0d6..766d3f25 100644 --- a/apps/client/src/ee/licence/components/activate-license-modal.tsx +++ b/apps/client/src/ee/licence/components/activate-license-modal.tsx @@ -1,6 +1,6 @@ import { z } from "zod/v4"; -import React from "react"; -import { Button, Group, Modal, Textarea } from "@mantine/core"; +import React, { useRef } from "react"; +import { Button, Divider, Group, Modal, Stack, Textarea } from "@mantine/core"; import { useForm } from "@mantine/form"; import { zod4Resolver } from "mantine-form-zod-resolver"; import { useTranslation } from "react-i18next"; @@ -49,6 +49,7 @@ interface ActivateLicenseFormProps { export function ActivateLicenseForm({ onClose }: ActivateLicenseFormProps) { const { t } = useTranslation(); const activateLicenseMutation = useActivateMutation(); + const fileInputRef = useRef(null); const form = useForm({ validate: zod4Resolver(formSchema), @@ -63,29 +64,68 @@ export function ActivateLicenseForm({ onClose }: ActivateLicenseFormProps) { onClose?.(); } + function handleFileUpload(event: React.ChangeEvent) { + const file = event.target.files?.[0]; + if (!file) return; + + const reader = new FileReader(); + reader.onload = (e) => { + const content = (e.target?.result as string)?.trim(); + if (content) { + form.setFieldValue("licenseKey", content); + handleSubmit({ licenseKey: content }); + } + }; + reader.readAsText(file); + + if (fileInputRef.current) { + fileInputRef.current.value = ""; + } + } + return (
-