mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
Removed more non-community (aka Prem/Premium/License) code
This commit is contained in:
parent
d5665463fe
commit
e3e5929b21
35 changed files with 140 additions and 792 deletions
|
|
@ -1,73 +1,11 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { i18n, trigger as translatorTrigger } from 'Common/Translator';
|
||||
import { appSettingsGet, settingsGet } from 'Storage/Settings';
|
||||
|
||||
import AppStore from 'Stores/Admin/App';
|
||||
import CoreStore from 'Stores/Admin/Core';
|
||||
|
||||
import { getApp } from 'Helper/Apps/Admin';
|
||||
import { appSettingsGet } from 'Storage/Settings';
|
||||
|
||||
class AboutAdminSettings {
|
||||
constructor() {
|
||||
this.version = ko.observable(appSettingsGet('version'));
|
||||
this.access = ko.observable(!!settingsGet('CoreAccess'));
|
||||
this.errorDesc = ko.observable('');
|
||||
|
||||
this.coreReal = CoreStore.coreReal;
|
||||
this.coreChannel = CoreStore.coreChannel;
|
||||
this.coreType = CoreStore.coreType;
|
||||
this.coreUpdatable = CoreStore.coreUpdatable;
|
||||
this.coreAccess = CoreStore.coreAccess;
|
||||
this.coreChecking = CoreStore.coreChecking;
|
||||
this.coreUpdating = CoreStore.coreUpdating;
|
||||
this.coreWarning = CoreStore.coreWarning;
|
||||
this.coreVersion = CoreStore.coreVersion;
|
||||
this.coreRemoteVersion = CoreStore.coreRemoteVersion;
|
||||
this.coreRemoteRelease = CoreStore.coreRemoteRelease;
|
||||
this.coreVersionCompare = CoreStore.coreVersionCompare;
|
||||
|
||||
this.community = RL_COMMUNITY || AppStore.community();
|
||||
|
||||
this.coreRemoteVersionHtmlDesc = ko.computed(() => {
|
||||
translatorTrigger();
|
||||
return i18n('TAB_ABOUT/HTML_NEW_VERSION', { 'VERSION': this.coreRemoteVersion() });
|
||||
});
|
||||
|
||||
this.statusType = ko.computed(() => {
|
||||
let type = '';
|
||||
const versionToCompare = this.coreVersionCompare(),
|
||||
isChecking = this.coreChecking(),
|
||||
isUpdating = this.coreUpdating(),
|
||||
isReal = this.coreReal();
|
||||
|
||||
if (isChecking) {
|
||||
type = 'checking';
|
||||
} else if (isUpdating) {
|
||||
type = 'updating';
|
||||
} else if (isReal && 0 === versionToCompare) {
|
||||
type = 'up-to-date';
|
||||
} else if (isReal && -1 === versionToCompare) {
|
||||
type = 'available';
|
||||
} else if (!isReal) {
|
||||
type = 'error';
|
||||
this.errorDesc('Cannot access the repository at the moment.');
|
||||
}
|
||||
|
||||
return type;
|
||||
});
|
||||
}
|
||||
|
||||
onBuild() {
|
||||
if (this.access() && !this.community) {
|
||||
getApp().reloadCoreData();
|
||||
}
|
||||
}
|
||||
|
||||
updateCoreData() {
|
||||
if (!this.coreUpdating() && !this.community) {
|
||||
getApp().updateCoreData();
|
||||
}
|
||||
this.coreType = ko.observable('djmaze');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue