mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-31 03:52:01 +08:00
Drop custom_login_link and custom_logout_link
This commit is contained in:
parent
31bb7267ec
commit
89395d5ae4
4 changed files with 7 additions and 27 deletions
|
@ -7,8 +7,6 @@ import {
|
|||
bMobileDevice
|
||||
} from 'Common/Globals';
|
||||
|
||||
import { pString } from 'Common/Utils';
|
||||
|
||||
import { KeyState } from 'Common/Enums';
|
||||
import { root, rootAdmin, rootUser, populateAuthSuffix } from 'Common/Links';
|
||||
import { initOnStartOrLangChange, initNotificationLanguage } from 'Common/Translator';
|
||||
|
@ -85,7 +83,7 @@ class AbstractApp extends AbstractBoot {
|
|||
* @param {string} title
|
||||
*/
|
||||
setWindowTitle(title) {
|
||||
title = pString(title);
|
||||
title = null == title ? '' : '' + title;
|
||||
if (Settings.settingsGet('Title')) {
|
||||
title += (title ? ' - ' : '') + Settings.settingsGet('Title');
|
||||
}
|
||||
|
@ -123,8 +121,8 @@ class AbstractApp extends AbstractBoot {
|
|||
* @param {boolean=} close = false
|
||||
*/
|
||||
loginAndLogoutReload(admin = false, logout = false, close = false) {
|
||||
const inIframe = !!Settings.appSettingsGet('inIframe');
|
||||
let customLogoutLink = pString(Settings.appSettingsGet('customLogoutLink'));
|
||||
const inIframe = !!Settings.appSettingsGet('inIframe'),
|
||||
logoutLink = admin ? rootAdmin() : rootUser();
|
||||
|
||||
if (logout) {
|
||||
this.clearClientSideToken();
|
||||
|
@ -134,14 +132,12 @@ class AbstractApp extends AbstractBoot {
|
|||
window.close();
|
||||
}
|
||||
|
||||
customLogoutLink = customLogoutLink || (admin ? rootAdmin() : rootUser());
|
||||
|
||||
if (logout && location.href !== customLogoutLink) {
|
||||
if (logout && location.href !== logoutLink) {
|
||||
setTimeout(() => {
|
||||
if (inIframe && parent) {
|
||||
parent.location.href = customLogoutLink;
|
||||
parent.location.href = logoutLink;
|
||||
} else {
|
||||
location.href = customLogoutLink;
|
||||
location.href = logoutLink;
|
||||
}
|
||||
}, 100);
|
||||
} else {
|
||||
|
|
|
@ -919,19 +919,7 @@ class AppUser extends AbstractApp {
|
|||
bootstartLoginScreen() {
|
||||
$htmlCL.remove('rl-user-auth');
|
||||
$htmlCL.add('rl-user-no-auth');
|
||||
|
||||
const customLoginLink = pString(Settings.appSettingsGet('customLoginLink'));
|
||||
if (!customLoginLink) {
|
||||
startScreens([LoginUserScreen]);
|
||||
} else {
|
||||
routeOff();
|
||||
setHash(root(), true);
|
||||
routeOff();
|
||||
|
||||
setTimeout(() =>
|
||||
location.href = customLoginLink
|
||||
, 1);
|
||||
}
|
||||
startScreens([LoginUserScreen]);
|
||||
}
|
||||
|
||||
bootend() {
|
||||
|
|
|
@ -1189,8 +1189,6 @@ class Actions
|
|||
'allowHtmlEditorSourceButton' => (bool) $oConfig->Get('labs', 'allow_html_editor_source_button', false),
|
||||
'allowHtmlEditorBitiButtons' => (bool) $oConfig->Get('labs', 'allow_html_editor_biti_buttons', false),
|
||||
'allowCtrlEnterOnCompose' => (bool) $oConfig->Get('labs', 'allow_ctrl_enter_on_compose', false),
|
||||
'customLoginLink' => $oConfig->Get('labs', 'custom_login_link', ''),
|
||||
'customLogoutLink' => $oConfig->Get('labs', 'custom_logout_link', ''),
|
||||
'forgotPasswordLinkUrl' => \trim($oConfig->Get('login', 'forgot_password_link_url', '')),
|
||||
'registrationLinkUrl' => \trim($oConfig->Get('login', 'registration_link_url', '')),
|
||||
'hideSubmitButton' => (bool) $oConfig->Get('login', 'hide_submit_button', true),
|
||||
|
|
|
@ -385,8 +385,6 @@ Enables caching in the system'),
|
|||
'curl_proxy_auth' => array(''),
|
||||
'in_iframe' => array(false),
|
||||
'force_https' => array(false),
|
||||
'custom_login_link' => array(''),
|
||||
'custom_logout_link' => array(''),
|
||||
'http_client_ip_check_proxy' => array(false),
|
||||
'fast_cache_memcache_host' => array('127.0.0.1'),
|
||||
'fast_cache_memcache_port' => array(11211),
|
||||
|
|
Loading…
Reference in a new issue