mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +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() {
|
logout() {
|
||||||
|
localStorage.removeItem('register_protocol_offered');
|
||||||
Remote.request('Logout', () => rl.logoutReload(Settings.app('customLogoutLink')));
|
Remote.request('Logout', () => rl.logoutReload(Settings.app('customLogoutLink')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -247,18 +248,21 @@ export class AppUser extends AbstractApp {
|
||||||
}
|
}
|
||||||
}, 1);
|
}, 1);
|
||||||
|
|
||||||
setInterval(reloadTime(), 60000);
|
setInterval(reloadTime, 60000);
|
||||||
|
|
||||||
PgpUserStore.init();
|
PgpUserStore.init();
|
||||||
|
|
||||||
setTimeout(() => mailToHelper(SettingsGet('mailToEmail')), 500);
|
setTimeout(() => mailToHelper(SettingsGet('mailToEmail')), 500);
|
||||||
|
|
||||||
// When auto-login is active
|
if (!localStorage.getItem('register_protocol_offered')) {
|
||||||
navigator.registerProtocolHandler?.(
|
// When auto-login is active
|
||||||
'mailto',
|
navigator.registerProtocolHandler?.(
|
||||||
location.protocol + '//' + location.host + location.pathname + '?mailto&to=%s',
|
'mailto',
|
||||||
(SettingsGet('title') || 'SnappyMail')
|
location.protocol + '//' + location.host + location.pathname + '?mailto&to=%s',
|
||||||
);
|
(SettingsGet('title') || 'SnappyMail')
|
||||||
|
);
|
||||||
|
localStorage.setItem('register_protocol_offered', '1');
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.logout();
|
this.logout();
|
||||||
|
|
|
||||||
|
|
@ -680,7 +680,7 @@ class Actions
|
||||||
'contactsAllowed' => $this->AddressBookProvider($oAccount)->IsActive(),
|
'contactsAllowed' => $this->AddressBookProvider($oAccount)->IsActive(),
|
||||||
|
|
||||||
'ViewHTML' => (bool) $oConfig->Get('defaults', 'view_html', true),
|
'ViewHTML' => (bool) $oConfig->Get('defaults', 'view_html', true),
|
||||||
'ViewImages' => 'ask',
|
'ViewImages' => $oConfig->Get('defaults', 'view_images', 'ask'),
|
||||||
'ViewImagesWhitelist' => '',
|
'ViewImagesWhitelist' => '',
|
||||||
'RemoveColors' => (bool) $oConfig->Get('defaults', 'remove_colors', false),
|
'RemoveColors' => (bool) $oConfig->Get('defaults', 'remove_colors', false),
|
||||||
'AllowStyles' => false,
|
'AllowStyles' => false,
|
||||||
|
|
@ -691,14 +691,14 @@ class Actions
|
||||||
'listGrouped' => false,
|
'listGrouped' => false,
|
||||||
'MessagesPerPage' => (int) $oConfig->Get('webmail', 'messages_per_page', 25),
|
'MessagesPerPage' => (int) $oConfig->Get('webmail', 'messages_per_page', 25),
|
||||||
'MessageReadDelay' => (int) $oConfig->Get('webmail', 'message_read_delay', 5),
|
'MessageReadDelay' => (int) $oConfig->Get('webmail', 'message_read_delay', 5),
|
||||||
'MsgDefaultAction' => 1,
|
'MsgDefaultAction' => (int) $oConfig->Get('defaults', 'msg_default_action', 1),
|
||||||
'SoundNotification' => true,
|
'SoundNotification' => true,
|
||||||
'NotificationSound' => 'new-mail',
|
'NotificationSound' => 'new-mail',
|
||||||
'DesktopNotifications' => true,
|
'DesktopNotifications' => true,
|
||||||
'Layout' => (int) $oConfig->Get('defaults', 'view_layout', Enumerations\Layout::SIDE_PREVIEW),
|
'Layout' => (int) $oConfig->Get('defaults', 'view_layout', Enumerations\Layout::SIDE_PREVIEW),
|
||||||
'EditorDefaultType' => \str_replace('Forced', '', $oConfig->Get('defaults', 'view_editor_type', '')),
|
'EditorDefaultType' => \str_replace('Forced', '', $oConfig->Get('defaults', 'view_editor_type', '')),
|
||||||
'UseCheckboxesInList' => (bool) $oConfig->Get('defaults', 'view_use_checkboxes', true),
|
'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),
|
'AutoLogout' => (int) $oConfig->Get('defaults', 'autologout', 30),
|
||||||
'AllowDraftAutosave' => (bool) $oConfig->Get('defaults', 'allow_draft_autosave', true),
|
'AllowDraftAutosave' => (bool) $oConfig->Get('defaults', 'allow_draft_autosave', true),
|
||||||
'ContactsAutosave' => (bool) $oConfig->Get('defaults', 'contacts_autosave', true),
|
'ContactsAutosave' => (bool) $oConfig->Get('defaults', 'contacts_autosave', true),
|
||||||
|
|
@ -778,7 +778,7 @@ class Actions
|
||||||
|
|
||||||
$aResult['ViewHTML'] = (bool)$oSettings->GetConf('ViewHTML', $aResult['ViewHTML']);
|
$aResult['ViewHTML'] = (bool)$oSettings->GetConf('ViewHTML', $aResult['ViewHTML']);
|
||||||
$show_images = (bool) $oSettings->GetConf('ShowImages', false);
|
$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['ViewImagesWhitelist'] = $oSettings->GetConf('ViewImagesWhitelist', '');
|
||||||
$aResult['RemoveColors'] = (bool)$oSettings->GetConf('RemoveColors', $aResult['RemoveColors']);
|
$aResult['RemoveColors'] = (bool)$oSettings->GetConf('RemoveColors', $aResult['RemoveColors']);
|
||||||
$aResult['AllowStyles'] = (bool)$oSettings->GetConf('AllowStyles', $aResult['AllowStyles']);
|
$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_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_layout' => array(1, 'layout: 0 - no preview, 1 - side preview, 2 - bottom preview'),
|
||||||
'view_use_checkboxes' => array(true),
|
'view_use_checkboxes' => array(true),
|
||||||
|
'view_show_next_message' => array(true, 'Show next message when (re)move current message'),
|
||||||
'autologout' => array(30),
|
'autologout' => array(30),
|
||||||
'view_html' => array(true),
|
'view_html' => array(true),
|
||||||
'show_images' => array(false),
|
'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),
|
'contacts_autosave' => array(true),
|
||||||
'mail_use_threads' => array(false),
|
'mail_use_threads' => array(false),
|
||||||
'allow_draft_autosave' => array(true),
|
'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(
|
'logs' => array(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue