mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Added auto logout option
This commit is contained in:
parent
76f319a07f
commit
bb551e4ec8
18 changed files with 171 additions and 33 deletions
|
|
@ -1269,7 +1269,7 @@ class Actions
|
|||
'AllowAdminPanel' => (bool) $oConfig->Get('security', 'allow_admin_panel', true),
|
||||
'AllowHtmlEditorSourceButton' => (bool) $oConfig->Get('labs', 'allow_html_editor_source_button', false),
|
||||
'AllowHtmlEditorBitiButtons' => (bool) $oConfig->Get('labs', 'allow_html_editor_biti_buttons', false),
|
||||
'AllowСtrlEnterOnCompose' => (bool) $oConfig->Get('labs', 'allow_ctrl_enter_on_compose', false),
|
||||
'AllowCtrlEnterOnCompose' => (bool) $oConfig->Get('labs', 'allow_ctrl_enter_on_compose', false),
|
||||
'UseRsaEncryption' => (bool) $oConfig->Get('security', 'use_rsa_encryption', false),
|
||||
'RsaPublicKey' => '',
|
||||
'HideDangerousActions' => $oConfig->Get('labs', 'hide_dangerous_actions', false),
|
||||
|
|
@ -1546,10 +1546,10 @@ class Actions
|
|||
$aResult['Layout'] = (int) $oConfig->Get('defaults', 'view_layout', \RainLoop\Enumerations\Layout::SIDE_PREVIEW);
|
||||
$aResult['EditorDefaultType'] = (string) $oConfig->Get('defaults', 'view_editor_type', '');
|
||||
$aResult['UseCheckboxesInList'] = (bool) $oConfig->Get('defaults', 'view_use_checkboxes', true);
|
||||
$aResult['AutoLogout'] = (int) $oConfig->Get('defaults', 'autologout', 30);
|
||||
$aResult['UseThreads'] = (bool) $oConfig->Get('defaults', 'mail_use_threads', false);
|
||||
$aResult['ReplySameFolder'] = (bool) $oConfig->Get('defaults', 'mail_reply_same_folder', false);
|
||||
$aResult['ContactsAutosave'] = (bool) $oConfig->Get('defaults', 'contacts_autosave', true);
|
||||
$aResult['Signature'] = '';
|
||||
$aResult['EnableTwoFactor'] = false;
|
||||
$aResult['ParentEmail'] = '';
|
||||
$aResult['InterfaceAnimation'] = true;
|
||||
|
|
@ -1583,13 +1583,12 @@ class Actions
|
|||
$aResult['SoundNotification'] = (bool) $oSettings->GetConf('SoundNotification', $aResult['SoundNotification']);
|
||||
$aResult['DesktopNotifications'] = (bool) $oSettings->GetConf('DesktopNotifications', $aResult['DesktopNotifications']);
|
||||
$aResult['UseCheckboxesInList'] = (bool) $oSettings->GetConf('UseCheckboxesInList', $aResult['UseCheckboxesInList']);
|
||||
$aResult['AutoLogout'] = (int) $oSettings->GetConf('AutoLogout', $aResult['AutoLogout']);
|
||||
$aResult['Layout'] = (int) $oSettings->GetConf('Layout', $aResult['Layout']);
|
||||
|
||||
$aResult['UseThreads'] = (bool) $oSettingsLocal->GetConf('UseThreads', $aResult['UseThreads']);
|
||||
$aResult['ReplySameFolder'] = (bool) $oSettingsLocal->GetConf('ReplySameFolder', $aResult['ReplySameFolder']);
|
||||
|
||||
$aResult['Signature'] = $oSettingsLocal->GetConf('Signature', $aResult['Signature']);
|
||||
|
||||
if ($this->GetCapa(false, \RainLoop\Enumerations\Capa::USER_BACKGROUND, $oAccount))
|
||||
{
|
||||
$aResult['UserBackgroundName'] = (string) $oSettings->GetConf('UserBackgroundName', $aResult['UserBackgroundName']);
|
||||
|
|
@ -4681,14 +4680,13 @@ class Actions
|
|||
$this->setSettingsFromParams($oSettings, 'DesktopNotifications', 'bool');
|
||||
$this->setSettingsFromParams($oSettings, 'SoundNotification', 'bool');
|
||||
$this->setSettingsFromParams($oSettings, 'UseCheckboxesInList', 'bool');
|
||||
$this->setSettingsFromParams($oSettings, 'AutoLogout', 'int');
|
||||
|
||||
$this->setSettingsFromParams($oSettings, 'EnableTwoFactor', 'bool');
|
||||
|
||||
$this->setSettingsFromParams($oSettingsLocal, 'UseThreads', 'bool');
|
||||
$this->setSettingsFromParams($oSettingsLocal, 'ReplySameFolder', 'bool');
|
||||
|
||||
$this->setSettingsFromParams($oSettingsLocal, 'Signature', 'string');
|
||||
|
||||
return $this->DefaultResponse(__FUNCTION__,
|
||||
$this->SettingsProvider()->Save($oAccount, $oSettings) &&
|
||||
$this->SettingsProvider(true)->Save($oAccount, $oSettingsLocal));
|
||||
|
|
|
|||
|
|
@ -164,6 +164,7 @@ Values:
|
|||
'view_editor_type' => array('Html', 'Editor mode used by default (Plain, Html, HtmlForced or PlainForced)'),
|
||||
'view_layout' => array(1, 'layout: 0 - no preview, 1 - side preview, 3 - bottom preview'),
|
||||
'view_use_checkboxes' => array(true),
|
||||
'autologout' => array(30),
|
||||
'show_images' => array(false),
|
||||
'contacts_autosave' => array(true),
|
||||
'mail_use_threads' => array(false),
|
||||
|
|
|
|||
|
|
@ -1225,6 +1225,29 @@ class ServiceActions
|
|||
return $bJsOutput ? 'window.rainloopTEMPLATES='.\MailSo\Base\Utils::Php2js(array($sHtml), $this->Logger()).';' : $sHtml;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sLanguage
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function convertLanguageNameToMomentLanguageName($sLanguage)
|
||||
{
|
||||
switch ($sLanguage)
|
||||
{
|
||||
case 'pt-pt':
|
||||
$sLanguage = 'pt';
|
||||
break;
|
||||
case 'ja-jp':
|
||||
$sLanguage = 'ja';
|
||||
break;
|
||||
case 'ko-kr':
|
||||
$sLanguage = 'ko';
|
||||
break;
|
||||
}
|
||||
|
||||
return $sLanguage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sLanguage
|
||||
* @param bool $bWrapByScriptTag = true
|
||||
|
|
@ -1236,7 +1259,9 @@ class ServiceActions
|
|||
$aResultLang = array();
|
||||
|
||||
$sMoment = 'window.moment && window.moment.lang && window.moment.lang(\'en\');';
|
||||
$sMomentFileName = APP_VERSION_ROOT_PATH.'app/i18n/moment/'.$sLanguage.'.js';
|
||||
$sMomentFileName = APP_VERSION_ROOT_PATH.'app/i18n/moment/'.
|
||||
$this->convertLanguageNameToMomentLanguageName($sLanguage).'.js';
|
||||
|
||||
if (\file_exists($sMomentFileName))
|
||||
{
|
||||
$sMoment = \file_get_contents($sMomentFileName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue