mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 19:19:21 +03:00
Drop License code (not used by comunity)
This commit is contained in:
parent
97a73c6639
commit
1d4224d733
6 changed files with 9 additions and 79 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue