mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Merge pull request #1204 from SergeyMosin/more-default-configs
More default configs
This commit is contained in:
commit
024efd3be7
3 changed files with 22 additions and 12 deletions
|
|
@ -177,6 +177,7 @@ export class AppUser extends AbstractApp {
|
|||
}
|
||||
|
||||
logout() {
|
||||
localStorage.removeItem('register_protocol_offered');
|
||||
Remote.request('Logout', () => rl.logoutReload(Settings.app('customLogoutLink')));
|
||||
}
|
||||
|
||||
|
|
@ -247,18 +248,21 @@ export class AppUser extends AbstractApp {
|
|||
}
|
||||
}, 1);
|
||||
|
||||
setInterval(reloadTime(), 60000);
|
||||
setInterval(reloadTime, 60000);
|
||||
|
||||
PgpUserStore.init();
|
||||
|
||||
setTimeout(() => mailToHelper(SettingsGet('mailToEmail')), 500);
|
||||
|
||||
// When auto-login is active
|
||||
navigator.registerProtocolHandler?.(
|
||||
'mailto',
|
||||
location.protocol + '//' + location.host + location.pathname + '?mailto&to=%s',
|
||||
(SettingsGet('title') || 'SnappyMail')
|
||||
);
|
||||
if (!localStorage.getItem('register_protocol_offered')) {
|
||||
// When auto-login is active
|
||||
navigator.registerProtocolHandler?.(
|
||||
'mailto',
|
||||
location.protocol + '//' + location.host + location.pathname + '?mailto&to=%s',
|
||||
(SettingsGet('title') || 'SnappyMail')
|
||||
);
|
||||
localStorage.setItem('register_protocol_offered', '1');
|
||||
}
|
||||
|
||||
} else {
|
||||
this.logout();
|
||||
|
|
|
|||
|
|
@ -680,7 +680,7 @@ class Actions
|
|||
'contactsAllowed' => $this->AddressBookProvider($oAccount)->IsActive(),
|
||||
|
||||
'ViewHTML' => (bool) $oConfig->Get('defaults', 'view_html', true),
|
||||
'ViewImages' => 'ask',
|
||||
'ViewImages' => $oConfig->Get('defaults', 'view_images', 'ask'),
|
||||
'ViewImagesWhitelist' => '',
|
||||
'RemoveColors' => (bool) $oConfig->Get('defaults', 'remove_colors', false),
|
||||
'AllowStyles' => false,
|
||||
|
|
@ -691,14 +691,14 @@ class Actions
|
|||
'listGrouped' => false,
|
||||
'MessagesPerPage' => (int) $oConfig->Get('webmail', 'messages_per_page', 25),
|
||||
'MessageReadDelay' => (int) $oConfig->Get('webmail', 'message_read_delay', 5),
|
||||
'MsgDefaultAction' => 1,
|
||||
'MsgDefaultAction' => (int) $oConfig->Get('defaults', 'msg_default_action', 1),
|
||||
'SoundNotification' => true,
|
||||
'NotificationSound' => 'new-mail',
|
||||
'DesktopNotifications' => true,
|
||||
'Layout' => (int) $oConfig->Get('defaults', 'view_layout', Enumerations\Layout::SIDE_PREVIEW),
|
||||
'EditorDefaultType' => \str_replace('Forced', '', $oConfig->Get('defaults', 'view_editor_type', '')),
|
||||
'UseCheckboxesInList' => (bool) $oConfig->Get('defaults', 'view_use_checkboxes', true),
|
||||
'showNextMessage' => false,
|
||||
'showNextMessage' => (bool) $oConfig->Get('defaults', 'view_show_next_message', false),
|
||||
'AutoLogout' => (int) $oConfig->Get('defaults', 'autologout', 30),
|
||||
'AllowDraftAutosave' => (bool) $oConfig->Get('defaults', 'allow_draft_autosave', true),
|
||||
'ContactsAutosave' => (bool) $oConfig->Get('defaults', 'contacts_autosave', true),
|
||||
|
|
@ -778,7 +778,7 @@ class Actions
|
|||
|
||||
$aResult['ViewHTML'] = (bool)$oSettings->GetConf('ViewHTML', $aResult['ViewHTML']);
|
||||
$show_images = (bool) $oSettings->GetConf('ShowImages', false);
|
||||
$aResult['ViewImages'] = $oSettings->GetConf('ViewImages', $show_images ? 'always' : 'ask');
|
||||
$aResult['ViewImages'] = $oSettings->GetConf('ViewImages', $show_images ? 'always' : $aResult['ViewImages']);
|
||||
$aResult['ViewImagesWhitelist'] = $oSettings->GetConf('ViewImagesWhitelist', '');
|
||||
$aResult['RemoveColors'] = (bool)$oSettings->GetConf('RemoveColors', $aResult['RemoveColors']);
|
||||
$aResult['AllowStyles'] = (bool)$oSettings->GetConf('AllowStyles', $aResult['AllowStyles']);
|
||||
|
|
|
|||
|
|
@ -292,13 +292,19 @@ Values:
|
|||
'view_editor_type' => array('Html', 'Editor mode used by default (Plain, Html)'),
|
||||
'view_layout' => array(1, 'layout: 0 - no preview, 1 - side preview, 2 - bottom preview'),
|
||||
'view_use_checkboxes' => array(true),
|
||||
'view_show_next_message' => array(true, 'Show next message when (re)move current message'),
|
||||
'autologout' => array(30),
|
||||
'view_html' => array(true),
|
||||
'show_images' => array(false),
|
||||
'view_images' => array('ask', 'View external images:
|
||||
"ask" - always ask
|
||||
"match" - whitelist or ask
|
||||
"always" - show always'),
|
||||
'contacts_autosave' => array(true),
|
||||
'mail_use_threads' => array(false),
|
||||
'allow_draft_autosave' => array(true),
|
||||
'mail_reply_same_folder' => array(false)
|
||||
'mail_reply_same_folder' => array(false),
|
||||
'msg_default_action' => array(1, '1 - reply, 2 - reply all'),
|
||||
),
|
||||
|
||||
'logs' => array(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue