Drop License code (not used by comunity)

This commit is contained in:
djmaze 2020-08-18 20:45:43 +02:00
parent 97a73c6639
commit 1d4224d733
6 changed files with 9 additions and 79 deletions

View file

@ -79,23 +79,23 @@ Things might work in Edge 18, Firefox 50-62 and Chrome 54-68 due to one polyfill
|js/* |1.14.0 |native |
|----------- |--------: |--------: |
|admin.js |2.130.942 |1.082.985 |
|app.js |4.184.455 |2.751.154 |
|admin.js |2.130.942 |1.070.325 |
|app.js |4.184.455 |2.748.672 |
|boot.js | 671.522 | 43.995 |
|libs.js | 647.614 | 316.876 |
|polyfills.js | 325.834 | 0 |
|TOTAL |7.960.367 |4.195.010 |
|TOTAL |7.960.367 |4.179.868 |
|js/min/* |1.14.0 |native |gzip 1.14 |gzip |
|--------------- |--------: |--------: |--------: |--------: |
|admin.min.js | 252.147 | 147.526 | 73.657 | 42.213 |
|app.min.js | 511.202 | 369.396 |140.462 | 97.130 |
|admin.min.js | 252.147 | 146.008 | 73.657 | 41.877 |
|app.min.js | 511.202 | 369.021 |140.462 | 97.026 |
|boot.min.js | 66.007 | 5.579 | 22.567 | 2.328 |
|libs.min.js | 572.545 | 300.520 |176.720 | 92.825 |
|polyfills.min.js | 32.452 | 0 | 11.312 | 0 |
|TOTAL |1.434.353 | 823.015 |424.718 |234.496 |
|TOTAL |1.434.353 | 821.128 |424.718 |234.056 |
611.338 bytes (190.222 gzip) is not much, but it feels faster.
613.225 bytes (190.662 gzip) is not much, but it feels faster.
|css/* |1.14.0 |native |

View file

@ -1,9 +1,7 @@
import ko from 'ko';
import { root } from 'Common/Links';
import { getNotification } from 'Common/Translator';
import { StorageResultType, Notification } from 'Common/Enums';
import { pInt } from 'Common/Utils';
import { StorageResultType } from 'Common/Enums';
import * as Settings from 'Storage/Settings';
@ -11,7 +9,6 @@ import AppStore from 'Stores/Admin/App';
import CapaStore from 'Stores/Admin/Capa';
import DomainStore from 'Stores/Admin/Domain';
import PluginStore from 'Stores/Admin/Plugin';
import LicenseStore from 'Stores/Admin/License';
import PackageStore from 'Stores/Admin/Package';
import CoreStore from 'Stores/Admin/Core';
import Remote from 'Remote/Admin/Ajax';
@ -131,7 +128,7 @@ class AdminApp extends AbstractApp {
CoreStore.coreVersion(data.Result.Version || '');
CoreStore.coreRemoteVersion(data.Result.RemoteVersion || '');
CoreStore.coreRemoteRelease(data.Result.RemoteRelease || '');
CoreStore.coreVersionCompare(pInt(data.Result.VersionCompare));
CoreStore.coreVersionCompare(parseInt(data.Result.VersionCompare, 10) || 0);
} else {
CoreStore.coreReal(false);
CoreStore.coreChannel('stable');
@ -145,40 +142,6 @@ class AdminApp extends AbstractApp {
});
}
/**
* @param {boolean=} force = false
*/
reloadLicensing(force = false) {
LicenseStore.licensingProcess(true);
LicenseStore.licenseError('');
Remote.licensing((result, data) => {
LicenseStore.licensingProcess(false);
if (StorageResultType.Success === result && data && data.Result && null != data.Result.Expired) {
LicenseStore.licenseValid(true);
LicenseStore.licenseExpired(pInt(data.Result.Expired));
LicenseStore.licenseError('');
LicenseStore.licensing(true);
AppStore.prem(true);
} else {
if (
data &&
data.ErrorCode &&
[Notification.LicensingServerIsUnavailable, Notification.LicensingExpired].includes(pInt(data.ErrorCode))
) {
LicenseStore.licenseError(getNotification(pInt(data.ErrorCode)));
LicenseStore.licensing(true);
} else {
if (StorageResultType.Abort === result) {
LicenseStore.licenseError(getNotification(Notification.LicensingServerIsUnavailable));
LicenseStore.licensing(true);
} else {
LicenseStore.licensing(false);
}
}
}
}, force);
}
bootend(bootendCallback = null) {
if (window.progressJs) {
progressJs.end();

View file

@ -523,10 +523,6 @@ export const Notification = {
InvalidPluginPackage: 703,
UnsupportedPluginPackage: 704,
LicensingServerIsUnavailable: 710,
LicensingExpired: 711,
LicensingBanned: 712,
DemoSendMessageError: 750,
DemoAccountError: 751,

View file

@ -348,9 +348,6 @@ export function admin(screenName) {
case 'AdminSecurity':
result += 'security';
break;
case 'AdminLicensing':
result += 'licensing';
break;
// no default
}

View file

@ -62,10 +62,6 @@ const I18N_NOTIFICATION_MAP = [
[Notification.InvalidPluginPackage, 'NOTIFICATIONS/INVALID_PLUGIN_PACKAGE'],
[Notification.UnsupportedPluginPackage, 'NOTIFICATIONS/UNSUPPORTED_PLUGIN_PACKAGE'],
[Notification.LicensingServerIsUnavailable, 'NOTIFICATIONS/LICENSING_SERVER_IS_UNAVAILABLE'],
[Notification.LicensingExpired, 'NOTIFICATIONS/LICENSING_EXPIRED'],
[Notification.LicensingBanned, 'NOTIFICATIONS/LICENSING_BANNED'],
[Notification.DemoSendMessageError, 'NOTIFICATIONS/DEMO_SEND_MESSAGE_ERROR'],
[Notification.DemoAccountError, 'NOTIFICATIONS/DEMO_ACCOUNT_ERROR'],

View file

@ -162,28 +162,6 @@ class RemoteAdminAjax extends AbstractAjaxRemote {
return this.defaultRequest(fCallback, 'AdminPluginSettingsUpdate', oConfig);
}
/**
* @param {?Function} fCallback
* @param {boolean} bForce
*/
licensing(fCallback, bForce) {
return this.defaultRequest(fCallback, 'AdminLicensing', {
Force: bForce ? 1 : 0
});
}
/**
* @param {?Function} fCallback
* @param {string} sDomain
* @param {string} sKey
*/
licensingActivate(fCallback, sDomain, sKey) {
return this.defaultRequest(fCallback, 'AdminLicensingActivate', {
Domain: sDomain,
Key: sKey
});
}
/**
* @param {?Function} fCallback
* @param {string} sName