mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Moved some config admin settings
This commit is contained in:
parent
8e6f35bfad
commit
27f5ba9337
6 changed files with 32 additions and 19 deletions
|
|
@ -2,6 +2,9 @@ import ko from 'ko';
|
|||
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
import { forEachObjectEntry } from 'Common/Utils';
|
||||
import { SettingsAdmin } from 'Common/Globals';
|
||||
import { LanguageStore } from 'Stores/Language';
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
|
||||
export class AdminSettingsConfig /*extends AbstractViewSettings*/ {
|
||||
|
||||
|
|
@ -53,6 +56,11 @@ export class AdminSettingsConfig /*extends AbstractViewSettings*/ {
|
|||
items: []
|
||||
};
|
||||
forEachObjectEntry(items, (skey, item) => {
|
||||
if ('language' === skey) {
|
||||
item[2] = ('webmail' === key) ? LanguageStore.languages : SettingsAdmin('languages');
|
||||
} else if ('theme' === skey) {
|
||||
item[2] = ThemeStore.themes;
|
||||
}
|
||||
'admin_password' === skey ||
|
||||
section.items.push({
|
||||
key: `config[${key}][${skey}]`,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import {
|
||||
isArray
|
||||
} from 'Common/Utils';
|
||||
|
||||
import { addObservablesTo, addSubscribablesTo, addComputablesTo } from 'External/ko';
|
||||
|
||||
import { SaveSettingStatus } from 'Common/Enums';
|
||||
|
|
@ -111,10 +107,9 @@ export class AdminSettingsGeneral extends AbstractViewSettings {
|
|||
}
|
||||
|
||||
selectLanguageAdmin() {
|
||||
const aLanguagesAdmin = SettingsAdmin('languages');
|
||||
showScreenPopup(LanguagesPopupView, [
|
||||
this.languageAdmin,
|
||||
isArray(aLanguagesAdmin) ? aLanguagesAdmin : [],
|
||||
SettingsAdmin('languages'),
|
||||
SettingsAdmin('clientLanguage')
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue