update all

This commit is contained in:
Lokowitz
2025-05-25 19:01:20 +00:00
parent ea24759bb3
commit f07e8d08c3
63 changed files with 380 additions and 381 deletions

View File

@@ -8,7 +8,7 @@ import { LicenseKeyCache } from "@server/license/license";
import { ArrowUpDown } from "lucide-react";
import moment from "moment";
import CopyToClipboard from "@app/components/CopyToClipboard";
import { useTranslations } from 'next-intl';
import { useTranslations } from "next-intl";
type LicenseKeysDataTableProps = {
licenseKeys: LicenseKeyCache[];

View File

@@ -11,7 +11,7 @@ import {
CredenzaHeader,
CredenzaTitle
} from "@app/components/Credenza";
import { useTranslations } from 'next-intl';
import { useTranslations } from "next-intl";
type SitePriceCalculatorProps = {
isOpen: boolean;

View File

@@ -54,17 +54,7 @@ import Link from "next/link";
import { Checkbox } from "@app/components/ui/checkbox";
import { Alert, AlertDescription, AlertTitle } from "@app/components/ui/alert";
import { useSupporterStatusContext } from "@app/hooks/useSupporterStatusContext";
import { useTranslations } from 'next-intl';
const formSchema = z.object({
licenseKey: z
.string()
.nonempty({ message: "License key is required" })
.max(255),
agreeToTerms: z.boolean().refine((val) => val === true, {
message: "You must agree to the license terms"
})
});
import { useTranslations } from "next-intl";
function obfuscateLicenseKey(key: string): string {
if (key.length <= 8) return key;
@@ -95,6 +85,18 @@ export default function LicensePage() {
const [isRecheckingLicense, setIsRecheckingLicense] = useState(false);
const { supporterStatus } = useSupporterStatusContext();
const t = useTranslations();
const formSchema = z.object({
licenseKey: z
.string()
.nonempty({ message: t('licenseKeyRequired') })
.max(255),
agreeToTerms: z.boolean().refine((val) => val === true, {
message: t('licenseTermsAgree')
})
});
const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
defaultValues: {
@@ -103,8 +105,6 @@ export default function LicensePage() {
}
});
const t = useTranslations();
useEffect(() => {
async function load() {
setIsInitialLoading(true);