24 lines
909 B
JavaScript
24 lines
909 B
JavaScript
// Generated, do not edit. sha256:a807f05aaf3a8f8a3367166282f6e35755004e775d3ad2970e654848cde4b032
|
|||
|
|
import { CONFIG } from '../../shared/config.js';
|
||
|
|
import { licenseState, appVersion, readLicense, coversVersion } from '../license.mjs';
|
||
|
|
|
||
|
|
export function licenseStatus() {
|
||
|
|
const state = licenseState();
|
||
|
|
const gratis = state.level !== 'full';
|
||
|
|
|
||
|
|
const bestand = readLicense();
|
||
|
|
const installed = bestand.state === 'valid' ? bestand.license : null;
|
||
|
|
|
||
|
|
return {
|
||
|
|
level: state.level,
|
||
|
|
why: state.why,
|
||
|
|
enforced: state.enforced,
|
||
|
|
version: appVersion(),
|
||
|
|
installed,
|
||
|
|
installedCovers: installed ? coversVersion(installed, appVersion()) : false,
|
||
|
|
buyer: state.license?.buyer ?? installed?.buyer ?? null,
|
||
|
|
issued: state.license?.issued ?? installed?.issued ?? null,
|
||
|
|
max: gratis ? { ...CONFIG.LICENSE.FREE.MAX } : null,
|
||
|
|
features: gratis ? { ...CONFIG.LICENSE.FREE.HAS } : null,
|
||
|
|
};
|
||
|
|
}
|