mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Small fixes
This commit is contained in:
parent
cc6626c374
commit
276e8c48e8
10 changed files with 67 additions and 39 deletions
|
|
@ -46,6 +46,7 @@
|
|||
'Filters': 'FILTERS',
|
||||
'AttachmentThumbnails': 'ATTACHMENT_THUMBNAILS',
|
||||
'Templates': 'TEMPLATES',
|
||||
'AutoLogout': 'AUTOLOGOUT',
|
||||
'AdditionalAccounts': 'ADDITIONAL_ACCOUNTS'
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
*/
|
||||
Plugins.prototype.addSettingsViewModel = function (SettingsViewModelClass, sTemplate, sLabelName, sRoute)
|
||||
{
|
||||
this.aViewModelsHooks.push([SettingsViewModelClass, sTemplate, sLabelName, sRoute]);
|
||||
this.aUserViewModelsHooks.push([SettingsViewModelClass, sTemplate, sLabelName, sRoute]);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
|
||||
Plugins.prototype.runSettingsViewModelHooks = function (bAdmin)
|
||||
{
|
||||
_.each(bAdmin ? this.aAdminViewModelsHooks : this.aViewModelsHooks, function (aView) {
|
||||
_.each(bAdmin ? this.aAdminViewModelsHooks : this.aUserViewModelsHooks, function (aView) {
|
||||
require('Knoin/Knoin').addSettingsViewModel(aView[0], aView[1], aView[2], aView[3]);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,8 +65,11 @@
|
|||
'SettingsFilters', 'SETTINGS_LABELS/LABEL_FILTERS_NAME', 'filters');
|
||||
}
|
||||
|
||||
if (Settings.capa(Enums.Capa.AutoLogout) || Settings.capa(Enums.Capa.TwoFactor))
|
||||
{
|
||||
kn.addSettingsViewModel(require('Settings/User/Security'),
|
||||
'SettingsSecurity', 'SETTINGS_LABELS/LABEL_SECURITY_NAME', 'security');
|
||||
}
|
||||
|
||||
if ((Settings.settingsGet('AllowGoogleSocial') && Settings.settingsGet('AllowGoogleSocialAuth')) ||
|
||||
Settings.settingsGet('AllowFacebookSocial') ||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
function SecurityUserSettings()
|
||||
{
|
||||
this.capaAutoLogout = Settings.capa(Enums.Capa.AutoLogout);
|
||||
this.capaTwoFactor = Settings.capa(Enums.Capa.TwoFactor);
|
||||
|
||||
this.autoLogout = SettinsStore.autoLogout;
|
||||
|
|
@ -212,6 +213,8 @@
|
|||
Remote.getTwoFactor(this.onResult);
|
||||
}
|
||||
|
||||
if (this.capaAutoLogout)
|
||||
{
|
||||
var self = this;
|
||||
|
||||
_.delay(function () {
|
||||
|
|
@ -227,6 +230,7 @@
|
|||
});
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = SecurityUserSettings;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "RainLoop",
|
||||
"title": "RainLoop Webmail",
|
||||
"version": "1.8.1",
|
||||
"release": "263",
|
||||
"release": "266",
|
||||
"description": "Simple, modern & fast web-based email client",
|
||||
"homepage": "http://rainloop.net",
|
||||
"main": "gulpfile.js",
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
"plugins"
|
||||
],
|
||||
"readmeFilename": "README.md",
|
||||
"ownCloudPackageVersion": "3.1",
|
||||
"ownCloudPackageVersion": "3.2",
|
||||
"engines": {
|
||||
"node": ">= 0.10.0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1589,6 +1589,11 @@ class Actions
|
|||
$aResult['UseThreads'] = (bool) $oSettingsLocal->GetConf('UseThreads', $aResult['UseThreads']);
|
||||
$aResult['ReplySameFolder'] = (bool) $oSettingsLocal->GetConf('ReplySameFolder', $aResult['ReplySameFolder']);
|
||||
|
||||
if (!$this->GetCapa(false, \RainLoop\Enumerations\Capa::AUTOLOGOUT, $oAccount))
|
||||
{
|
||||
$aResult['AutoLogout'] = 0;
|
||||
}
|
||||
|
||||
if ($this->GetCapa(false, \RainLoop\Enumerations\Capa::USER_BACKGROUND, $oAccount))
|
||||
{
|
||||
$aResult['UserBackgroundName'] = (string) $oSettings->GetConf('UserBackgroundName', $aResult['UserBackgroundName']);
|
||||
|
|
@ -1644,7 +1649,7 @@ class Actions
|
|||
}
|
||||
|
||||
$sPluginsLink = '';
|
||||
if (0 < $this->Plugins()->Count())
|
||||
if (0 < $this->Plugins()->Count() && $this->Plugins()->HaveJs($bAdmin))
|
||||
{
|
||||
$sPluginsLink = './?/Plugins/0/'.($bAdmin ? 'Admin' : 'User').'/'.$sStaticCache.'/';
|
||||
}
|
||||
|
|
@ -7672,6 +7677,11 @@ class Actions
|
|||
$aResult[] = \RainLoop\Enumerations\Capa::OPEN_PGP;
|
||||
}
|
||||
|
||||
if (!\RainLoop\Utils::IsOwnCloud())
|
||||
{
|
||||
$aResult[] = \RainLoop\Enumerations\Capa::AUTOLOGOUT;
|
||||
}
|
||||
|
||||
return $aResult;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,4 +16,5 @@ class Capa
|
|||
const ATTACHMENT_THUMBNAILS = 'ATTACHMENT_THUMBNAILS';
|
||||
const ADDITIONAL_ACCOUNTS = 'ADDITIONAL_ACCOUNTS';
|
||||
const TEMPLATES = 'TEMPLATES';
|
||||
const AUTOLOGOUT = 'AUTOLOGOUT';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,6 +222,23 @@ class Manager
|
|||
return $sResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $bAdminScope = false
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function HaveJs($bAdminScope = false)
|
||||
{
|
||||
$bResult = false;
|
||||
|
||||
if ($this->bIsEnabled)
|
||||
{
|
||||
$bResult = $bAdminScope ? 0 < \count($this->aAdminJs) : 0 < \count($this->aJs);
|
||||
}
|
||||
|
||||
return $bResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $bAdminScope = false
|
||||
*
|
||||
|
|
|
|||
|
|
@ -66,26 +66,18 @@
|
|||
</div>
|
||||
<div class="controls">
|
||||
<div class="pull-right social-buttons">
|
||||
<span data-bind="visible: facebookLoginEnabled">
|
||||
<a href="#" tabindex="-1" class="social-button" data-bind="command: facebookCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_FACEBOOK'">
|
||||
<a href="#" tabindex="-1" class="social-button" data-bind="visible: facebookLoginEnabled, command: facebookCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_FACEBOOK'">
|
||||
<i class="icon-facebook-alt"></i>
|
||||
</a>
|
||||
</span>
|
||||
<span data-bind="visible: googleLoginEnabled">
|
||||
<a href="#" tabindex="-1" class="social-button" data-bind="command: googleCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_GOOGLE'">
|
||||
<a href="#" tabindex="-1" class="social-button" data-bind="visible: googleLoginEnabled, command: googleCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_GOOGLE'">
|
||||
<i class="icon-google"></i>
|
||||
</a>
|
||||
</span>
|
||||
<span data-bind="visible: twitterLoginEnabled">
|
||||
<a href="#" tabindex="-1" class="social-button" data-bind="command: twitterCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_TWITTER'">
|
||||
<a href="#" tabindex="-1" class="social-button" data-bind="visible: twitterLoginEnabled, command: twitterCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_TWITTER'">
|
||||
<i class="icon-twitter"></i>
|
||||
</a>
|
||||
</span>
|
||||
<span data-bind="visible: allowLanguagesOnLogin() && !socialLoginEnabled()">
|
||||
<a href="#" tabindex="-1" class="language-button" data-bind="click: selectLanguage, tooltip: 'POPUPS_LANGUAGES/TITLE_LANGUAGES'">
|
||||
<a href="#" tabindex="-1" class="language-button" data-bind="visible: allowLanguagesOnLogin() && !socialLoginEnabled(), click: selectLanguage, tooltip: 'POPUPS_LANGUAGES/TITLE_LANGUAGES'">
|
||||
<i data-bind="css: langRequest() ? 'icon-spinner animated' : 'icon-world'"></i>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<label class="signMeLabel inline" data-bind="click: function () { signMe(!signMe()); }, visible: signMeVisibility">
|
||||
<i data-bind="css: signMe() ? 'checkboxSignMe icon-checkbox-checked' : 'checkboxSignMe icon-checkbox-unchecked'"></i>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<div class="b-settings-security">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-horizontal" data-bind="visible: capaAutoLogout">
|
||||
<div class="legend">
|
||||
<span class="i18n" data-i18n-text="SETTINGS_SECURITY/LEGEND_SECURITY"></span>
|
||||
</div>
|
||||
|
|
@ -21,8 +21,8 @@
|
|||
}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div class="form-horizontal" data-bind="visible: capaTwoFactor">
|
||||
<div class="legend">
|
||||
<span class="i18n" data-i18n-text="SETTINGS_SECURITY/LEGEND_TWO_FACTOR_AUTH"></span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue