2016-07-07 07:11:13 +08:00
|
|
|
|
|
|
|
/* global RL_COMMUNITY */
|
|
|
|
|
2016-07-08 07:22:58 +08:00
|
|
|
import {addSettingsViewModel} from 'Knoin/Knoin';
|
2016-07-07 07:11:13 +08:00
|
|
|
import {runSettingsViewModelHooks} from 'Common/Plugins';
|
|
|
|
|
|
|
|
import {AbstractSettingsScreen} from 'Screen/AbstractSettings';
|
|
|
|
import App from 'App/Admin';
|
|
|
|
|
|
|
|
class SettingsAdminScreen extends AbstractSettingsScreen
|
|
|
|
{
|
|
|
|
constructor()
|
|
|
|
{
|
|
|
|
super([
|
|
|
|
require('View/Admin/Settings/Menu'),
|
|
|
|
require('View/Admin/Settings/Pane')
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {Function=} fCallback = null
|
|
|
|
*/
|
|
|
|
setupSettings(fCallback = null) {
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/General'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsGeneral', 'TABS_LABELS/LABEL_GENERAL_NAME', 'general', true);
|
|
|
|
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/Login'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsLogin', 'TABS_LABELS/LABEL_LOGIN_NAME', 'login');
|
|
|
|
|
|
|
|
if (RL_COMMUNITY)
|
|
|
|
{
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/Branding'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsBranding', 'TABS_LABELS/LABEL_BRANDING_NAME', 'branding');
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/Prem/Branding'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsBranding', 'TABS_LABELS/LABEL_BRANDING_NAME', 'branding');
|
|
|
|
}
|
|
|
|
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/Contacts'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsContacts', 'TABS_LABELS/LABEL_CONTACTS_NAME', 'contacts');
|
|
|
|
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/Domains'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsDomains', 'TABS_LABELS/LABEL_DOMAINS_NAME', 'domains');
|
|
|
|
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/Security'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsSecurity', 'TABS_LABELS/LABEL_SECURITY_NAME', 'security');
|
|
|
|
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/Social'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsSocial', 'TABS_LABELS/LABEL_INTEGRATION_NAME', 'integrations');
|
|
|
|
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/Plugins'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsPlugins', 'TABS_LABELS/LABEL_PLUGINS_NAME', 'plugins');
|
|
|
|
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/Packages'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsPackages', 'TABS_LABELS/LABEL_PACKAGES_NAME', 'packages');
|
|
|
|
|
|
|
|
if (!RL_COMMUNITY)
|
|
|
|
{
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/Prem/Licensing'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsLicensing', 'TABS_LABELS/LABEL_LICENSING_NAME', 'licensing');
|
|
|
|
}
|
|
|
|
|
2016-07-08 07:22:58 +08:00
|
|
|
addSettingsViewModel(require('Settings/Admin/About'),
|
2016-07-07 07:11:13 +08:00
|
|
|
'AdminSettingsAbout', 'TABS_LABELS/LABEL_ABOUT_NAME', 'about');
|
|
|
|
|
|
|
|
runSettingsViewModelHooks(true);
|
|
|
|
|
|
|
|
if (fCallback)
|
|
|
|
{
|
|
|
|
fCallback();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
onShow() {
|
|
|
|
App.setWindowTitle('');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export {SettingsAdminScreen, SettingsAdminScreen as default};
|