mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-29 15:26:09 +00:00
Capability improvements
Additional branding options
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
FolderStore = require('Stores/User/Folder'),
|
||||
MessageStore = require('Stores/User/Message'),
|
||||
|
||||
Settings = require('Storage/Settings'),
|
||||
|
||||
AbstractScreen = require('Knoin/AbstractScreen')
|
||||
;
|
||||
|
||||
@@ -64,6 +66,16 @@
|
||||
|
||||
AppStore.focusedState(Enums.Focused.None);
|
||||
AppStore.focusedState(Enums.Focused.MessageList);
|
||||
|
||||
if (!Settings.capa(Enums.Capa.Folders))
|
||||
{
|
||||
Globals.leftPanelType(
|
||||
Settings.capa(Enums.Capa.Composer) || Settings.capa(Enums.Capa.Contacts) ? 'short' : 'none');
|
||||
}
|
||||
else
|
||||
{
|
||||
Globals.leftPanelType('');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,6 +47,16 @@
|
||||
*/
|
||||
SettingsUserScreen.prototype.setupSettings = function (fCallback)
|
||||
{
|
||||
if (!Settings.capa(Enums.Capa.Settings))
|
||||
{
|
||||
if (fCallback)
|
||||
{
|
||||
fCallback();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
kn.addSettingsViewModel(require('Settings/User/General'),
|
||||
'SettingsGeneral', 'SETTINGS_LABELS/LABEL_GENERAL_NAME', 'general', true);
|
||||
|
||||
@@ -96,8 +106,11 @@
|
||||
'SettingsTemplates', 'SETTINGS_LABELS/LABEL_TEMPLATES_NAME', 'templates');
|
||||
}
|
||||
|
||||
kn.addSettingsViewModel(require('Settings/User/Folders'),
|
||||
'SettingsFolders', 'SETTINGS_LABELS/LABEL_FOLDERS_NAME', 'folders');
|
||||
if (Settings.capa(Enums.Capa.Folders))
|
||||
{
|
||||
kn.addSettingsViewModel(require('Settings/User/Folders'),
|
||||
'SettingsFolders', 'SETTINGS_LABELS/LABEL_FOLDERS_NAME', 'folders');
|
||||
}
|
||||
|
||||
if (Settings.capa(Enums.Capa.Themes))
|
||||
{
|
||||
@@ -117,12 +130,15 @@
|
||||
{
|
||||
fCallback();
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
SettingsUserScreen.prototype.onShow = function ()
|
||||
{
|
||||
this.setSettingsTitle();
|
||||
Globals.keyScope(Enums.KeyState.Settings);
|
||||
Globals.leftPanelType('');
|
||||
};
|
||||
|
||||
SettingsUserScreen.prototype.setSettingsTitle = function ()
|
||||
|
||||
Reference in New Issue
Block a user