some work on the license manager

This commit is contained in:
2026-07-10 16:55:48 +02:00
parent af80c7d582
commit 4a15f1e351
9 changed files with 736 additions and 624 deletions
+9 -6
View File
@@ -1,6 +1,6 @@
import { InertiaLinkProps } from '@inertiajs/vue3';
import type { LucideIcon } from 'lucide-vue-next';
import { calcDueDate } from '@/lib/utils';
import { calcDueDate, addYears } from '@/lib/utils';
export interface Auth {
user: User;
@@ -313,8 +313,13 @@ export interface License {
isPerpetual: boolean;
expirationDate: string | null;
signature: string;
createdAt: string;
updatedAt: string;
validationInfo?: LicenseValidationInfo;
}
export interface LicenseValidationInfo {
isValid: boolean;
isSignatureValid: boolean;
isExpired: boolean;
}
export function newLicense(): License {
@@ -325,10 +330,8 @@ export function newLicense(): License {
product: '',
version: '',
isPerpetual: false,
expirationDate: null,
expirationDate: addYears(new Date(), 2),
signature: '',
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString()
};
}