mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,13 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
||||
import { i18n, trigger as translatorTrigger } from 'Common/Translator';
|
||||
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
import AppStore from 'Stores/Admin/App';
|
||||
|
||||
import { settingsGet } from 'Storage/Settings';
|
||||
|
||||
class BrandingAdminSettings {
|
||||
constructor() {
|
||||
this.capa = AppStore.prem;
|
||||
|
||||
this.title = ko.observable(settingsGet('Title')).idleTrigger();
|
||||
this.loadingDesc = ko.observable(settingsGet('LoadingDescription')).idleTrigger();
|
||||
this.faviconUrl = ko.observable(settingsGet('FaviconUrl')).idleTrigger();
|
||||
|
|
@ -24,18 +20,6 @@ class BrandingAdminSettings {
|
|||
this.loginDescription = ko.observable(settingsGet('LoginDescription')).idleTrigger();
|
||||
this.loginCss = ko.observable(settingsGet('LoginCss')).idleTrigger();
|
||||
this.userCss = ko.observable(settingsGet('UserCss')).idleTrigger();
|
||||
this.welcomePageUrl = ko.observable(settingsGet('WelcomePageUrl')).idleTrigger();
|
||||
this.welcomePageDisplay = ko.observable(settingsGet('WelcomePageDisplay')).idleTrigger();
|
||||
this.welcomePageDisplay.options = ko.computed(() => {
|
||||
translatorTrigger();
|
||||
return [
|
||||
{ optValue: 'none', optText: i18n('TAB_BRANDING/OPTION_WELCOME_PAGE_DISPLAY_NONE') },
|
||||
{ optValue: 'once', optText: i18n('TAB_BRANDING/OPTION_WELCOME_PAGE_DISPLAY_ONCE') },
|
||||
{ optValue: 'always', optText: i18n('TAB_BRANDING/OPTION_WELCOME_PAGE_DISPLAY_ALWAYS') }
|
||||
];
|
||||
});
|
||||
|
||||
this.community = RL_COMMUNITY || AppStore.community();
|
||||
}
|
||||
|
||||
onBuild() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import { getNotification } from 'Common/Translator';
|
|||
import { settingsGet } from 'Storage/Settings';
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import AppStore from 'Stores/Admin/App';
|
||||
import PluginStore from 'Stores/Admin/Plugin';
|
||||
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
|
|
@ -20,8 +19,6 @@ class PluginsAdminSettings {
|
|||
this.plugins = PluginStore.plugins;
|
||||
this.pluginsError = PluginStore.plugins.error;
|
||||
|
||||
this.community = RL_COMMUNITY || AppStore.community();
|
||||
|
||||
this.visibility = ko.computed(() => (PluginStore.plugins.loading() ? 'visible' : 'hidden'));
|
||||
|
||||
this.onPluginLoadRequest = this.onPluginLoadRequest.bind(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue