mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Merge branch 'master' into UserMailTemplates
# Conflicts: # dev/App/User.js # dev/Common/Enums.js # dev/Screen/User/Settings.js # dev/Settings/Admin/General.js # snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php # snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Admin.php # snappymail/v/0.0.0/app/libraries/RainLoop/Actions/User.php
This commit is contained in:
commit
f7f56b3789
794 changed files with 96444 additions and 74188 deletions
|
|
@ -1,9 +1,7 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import {
|
||||
elementById,
|
||||
Settings
|
||||
} from 'Common/Globals';
|
||||
import { Settings, SettingsGet } from 'Common/Globals';
|
||||
import { changeTheme } from 'Common/Utils';
|
||||
|
||||
import { logoutLink } from 'Common/Links';
|
||||
import { i18nToNodes, initOnStartOrLangChange } from 'Common/Translator';
|
||||
|
|
@ -25,11 +23,9 @@ export class AbstractApp {
|
|||
this.Remote = Remote;
|
||||
}
|
||||
|
||||
logoutReload(close = false) {
|
||||
logoutReload() {
|
||||
const url = logoutLink();
|
||||
|
||||
close && window.close && window.close();
|
||||
|
||||
if (location.href !== url) {
|
||||
setTimeout(() => (Settings.app('inIframe') ? parent : window).location.href = url, 100);
|
||||
} else {
|
||||
|
|
@ -37,22 +33,27 @@ export class AbstractApp {
|
|||
}
|
||||
}
|
||||
|
||||
refresh() {
|
||||
// rl.adminArea() || !translatorReload(false, );
|
||||
rl.adminArea() || (
|
||||
LanguageStore.language(SettingsGet('Language'))
|
||||
& ThemeStore.populate()
|
||||
& changeTheme(SettingsGet('Theme'))
|
||||
);
|
||||
|
||||
this.start();
|
||||
}
|
||||
|
||||
bootstart() {
|
||||
const register = (key, ClassObject, templateID) => ko.components.register(key, {
|
||||
template: { element: templateID || (key + 'Component') },
|
||||
viewModel: {
|
||||
createViewModel: (params, componentInfo) => {
|
||||
params = params || {};
|
||||
|
||||
if (componentInfo && componentInfo.element) {
|
||||
|
||||
i18nToNodes(componentInfo.element);
|
||||
|
||||
if (params.inline) {
|
||||
componentInfo.element.style.display = 'inline-block';
|
||||
}
|
||||
i18nToNodes(componentInfo.element);
|
||||
if (params.inline) {
|
||||
componentInfo.element.style.display = 'inline-block';
|
||||
}
|
||||
|
||||
return new ClassObject(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -68,14 +69,7 @@ export class AbstractApp {
|
|||
|
||||
LanguageStore.populate();
|
||||
ThemeStore.populate();
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {void}
|
||||
*/
|
||||
hideLoading() {
|
||||
elementById('rl-content').hidden = false;
|
||||
elementById('rl-loading').remove();
|
||||
this.start();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import 'External/Admin/ko';
|
||||
import 'External/ko';
|
||||
|
||||
import { Settings, SettingsGet } from 'Common/Globals';
|
||||
|
||||
|
|
@ -16,9 +16,8 @@ class AdminApp extends AbstractApp {
|
|||
this.weakPassword = ko.observable(false);
|
||||
}
|
||||
|
||||
bootstart() {
|
||||
super.bootstart();
|
||||
if (!Settings.app('allowAdminPanel')) {
|
||||
start() {
|
||||
if (!Settings.app('adminAllowed')) {
|
||||
rl.route.root();
|
||||
setTimeout(() => location.href = '/', 1);
|
||||
} else if (SettingsGet('Auth')) {
|
||||
|
|
@ -27,7 +26,6 @@ class AdminApp extends AbstractApp {
|
|||
} else {
|
||||
startScreens([LoginAdminScreen]);
|
||||
}
|
||||
this.hideLoading();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
848
dev/App/User.js
848
dev/App/User.js
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue