some work on the license manager
This commit is contained in:
Vendored
+9
-6
@@ -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()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user