mirror of
https://github.com/FxPouya/FxMathQuantWebApp.git
synced 2026-08-07 23:27:44 +00:00
Add files via upload
This commit is contained in:
@@ -34,6 +34,10 @@
|
|||||||
<h1>FxMathQuant</h1>
|
<h1>FxMathQuant</h1>
|
||||||
<span class="subtitle">AI Strategy Generator</span>
|
<span class="subtitle">AI Strategy Generator</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="license-info"
|
||||||
|
style="flex: 1; text-align: center; color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 500;">
|
||||||
|
<!-- License info populated by license-check.js -->
|
||||||
|
</div>
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<button id="theme-toggle" class="btn-icon" title="Toggle Theme">
|
<button id="theme-toggle" class="btn-icon" title="Toggle Theme">
|
||||||
<span class="icon">🌙</span>
|
<span class="icon">🌙</span>
|
||||||
|
|||||||
+32
-8
@@ -6,8 +6,12 @@
|
|||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Check license immediately when script loads
|
// Wait for DOM to be ready, then check license
|
||||||
checkLicense();
|
if (document.readyState === 'loading') {
|
||||||
|
document.addEventListener('DOMContentLoaded', checkLicense);
|
||||||
|
} else {
|
||||||
|
checkLicense();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main license check function
|
* Main license check function
|
||||||
@@ -134,18 +138,38 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display license info in console (for debugging)
|
* Display license info in header
|
||||||
*/
|
*/
|
||||||
function displayLicenseInfo(license) {
|
function displayLicenseInfo(license) {
|
||||||
console.log('%c License Information ', 'background: #667eea; color: white; font-weight: bold; padding: 5px 10px;');
|
console.log('%c License Information ', 'background: #667eea; color: white; font-weight: bold; padding: 5px 10px;');
|
||||||
console.log('Type:', license.type);
|
console.log('Type:', license.type);
|
||||||
console.log('Status:', license.status);
|
console.log('Status:', license.status);
|
||||||
|
|
||||||
if (license.type === 'limited') {
|
const licenseInfoDiv = document.getElementById('license-info');
|
||||||
console.log('Expiry Date:', license.expiry_date);
|
|
||||||
console.log('Days Remaining:', license.days_remaining);
|
if (licenseInfoDiv) {
|
||||||
} else {
|
let infoHTML = '';
|
||||||
console.log('Expiry:', 'Never (Lifetime)');
|
|
||||||
|
if (license.type === 'lifetime') {
|
||||||
|
infoHTML = '🔓 <strong>Lifetime License</strong> | Valid Forever';
|
||||||
|
console.log('Expiry:', 'Never (Lifetime)');
|
||||||
|
} else if (license.type === 'limited') {
|
||||||
|
const expiryDate = new Date(license.expiry_date);
|
||||||
|
const now = new Date();
|
||||||
|
const daysRemaining = Math.ceil((expiryDate - now) / (1000 * 60 * 60 * 24));
|
||||||
|
const expiryStr = expiryDate.toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' });
|
||||||
|
|
||||||
|
if (daysRemaining <= 7) {
|
||||||
|
infoHTML = `⚠️ <strong>Time-Limited License</strong> | Expires: ${expiryStr} (<span style="color: #ffeb3b;">${daysRemaining} days left</span>)`;
|
||||||
|
} else {
|
||||||
|
infoHTML = `🔓 <strong>Time-Limited License</strong> | Expires: ${expiryStr} (${daysRemaining} days left)`;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('Expiry Date:', license.expiry_date);
|
||||||
|
console.log('Days Remaining:', daysRemaining);
|
||||||
|
}
|
||||||
|
|
||||||
|
licenseInfoDiv.innerHTML = infoHTML;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user