snappymail/dev/Screen/Admin/Settings.js

55 lines
1.7 KiB
JavaScript
Raw Normal View History

2019-07-05 03:19:24 +08:00
import { runSettingsViewModelHooks } from 'Common/Plugins';
2016-07-07 07:11:13 +08:00
2021-01-26 18:46:30 +08:00
import { AbstractSettingsScreen, settingsAddViewModel } from 'Screen/AbstractSettings';
2016-07-07 07:11:13 +08:00
2019-07-05 03:19:24 +08:00
import { GeneralAdminSettings } from 'Settings/Admin/General';
import { DomainsAdminSettings } from 'Settings/Admin/Domains';
import { LoginAdminSettings } from 'Settings/Admin/Login';
import { ContactsAdminSettings } from 'Settings/Admin/Contacts';
import { SecurityAdminSettings } from 'Settings/Admin/Security';
import { PackagesAdminSettings } from 'Settings/Admin/Packages';
import { AboutAdminSettings } from 'Settings/Admin/About';
2021-01-22 23:32:08 +08:00
import { BrandingAdminSettings } from 'Settings/Admin/Branding';
import { ConfigAdminSettings } from 'Settings/Admin/Config';
2016-07-16 03:54:37 +08:00
2019-07-05 03:19:24 +08:00
import { MenuSettingsAdminView } from 'View/Admin/Settings/Menu';
import { PaneSettingsAdminView } from 'View/Admin/Settings/Pane';
2021-01-22 23:32:08 +08:00
export class SettingsAdminScreen extends AbstractSettingsScreen {
2016-07-16 05:29:42 +08:00
constructor() {
2019-07-05 03:19:24 +08:00
super([MenuSettingsAdminView, PaneSettingsAdminView]);
2016-07-07 07:11:13 +08:00
settingsAddViewModel(
2019-07-05 03:19:24 +08:00
GeneralAdminSettings,
'AdminSettingsGeneral',
'TABS_LABELS/LABEL_GENERAL_NAME',
'general',
true
);
2016-07-07 07:11:13 +08:00
2021-01-22 23:32:08 +08:00
[
[DomainsAdminSettings, 'Domains'],
[LoginAdminSettings, 'Login'],
[BrandingAdminSettings, 'Branding'],
[ContactsAdminSettings, 'Contacts'],
[SecurityAdminSettings, 'Security'],
[PackagesAdminSettings, 'Packages'],
[ConfigAdminSettings, 'Config'],
2021-01-22 23:32:08 +08:00
[AboutAdminSettings, 'About'],
].forEach(item =>
settingsAddViewModel(
2021-01-22 23:32:08 +08:00
item[0],
'AdminSettings'+item[1],
'TABS_LABELS/LABEL_'+item[1].toUpperCase()+'_NAME',
item[1].toLowerCase()
)
);
2016-07-07 07:11:13 +08:00
runSettingsViewModelHooks(true);
}
onShow() {
rl.setWindowTitle();
2016-07-07 07:11:13 +08:00
}
}