mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Reduce JavaScript footprint
This commit is contained in:
parent
689126c57d
commit
b12852bd08
42 changed files with 240 additions and 426 deletions
|
|
@ -3,7 +3,7 @@ import { Settings } from 'Common/Globals';
|
|||
import { addObservablesTo } from 'External/ko';
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
import { i18n, trigger as translatorTrigger } from 'Common/Translator';
|
||||
import { i18n, translateTrigger } from 'Common/Translator';
|
||||
|
||||
export class AdminSettingsAbout /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
|
|
@ -22,7 +22,7 @@ export class AdminSettingsAbout /*extends AbstractViewSettings*/ {
|
|||
this.coreUpdating = ko.observable(false).extend({ throttle: 100 });
|
||||
|
||||
this.coreVersionHtmlDesc = ko.computed(() => {
|
||||
translatorTrigger();
|
||||
translateTrigger();
|
||||
return i18n('TAB_ABOUT/HTML_NEW_VERSION', { 'VERSION': this.coreVersion() });
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -85,11 +85,7 @@ export class AdminSettingsContacts extends AbstractViewSettings {
|
|||
this.testContactsSuccess(true);
|
||||
} else {
|
||||
this.testContactsError(true);
|
||||
if (data?.Result) {
|
||||
this.testContactsErrorMessage(data.Result.Message || '');
|
||||
} else {
|
||||
this.testContactsErrorMessage('');
|
||||
}
|
||||
this.testContactsErrorMessage(data?.Result?.Message || '');
|
||||
}
|
||||
|
||||
this.testing(false);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export class AdminSettingsPackages extends AbstractViewSettings {
|
|||
oDom.addEventListener('click', event => {
|
||||
// configurePlugin
|
||||
let el = event.target.closestWithin('.package-configure', oDom),
|
||||
data = el ? ko.dataFor(el) : 0;
|
||||
data = el && ko.dataFor(el);
|
||||
data && Remote.request('AdminPluginLoad',
|
||||
(iError, data) => iError || showScreenPopup(PluginPopupView, [data.Result]),
|
||||
{
|
||||
|
|
@ -51,7 +51,7 @@ export class AdminSettingsPackages extends AbstractViewSettings {
|
|||
);
|
||||
// disablePlugin
|
||||
el = event.target.closestWithin('.package-active', oDom);
|
||||
data = el ? ko.dataFor(el) : 0;
|
||||
data = el && ko.dataFor(el);
|
||||
data && this.disablePlugin(data);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue