mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Update dependencies
This commit is contained in:
parent
80ad4fdbcc
commit
13065dd926
7 changed files with 709 additions and 418 deletions
|
|
@ -85,11 +85,12 @@ function includeLayout()
|
|||
{
|
||||
const app = window.document.getElementById('rl-app');
|
||||
|
||||
require('style-loader!Styles/@Boot.css');
|
||||
require('Styles/@Boot.css');
|
||||
|
||||
if (app)
|
||||
{
|
||||
app.innerHTML = require('Html/Layout.html').replace(/[\r\n\t]+/g, '');
|
||||
const layout = require('Html/Layout.html');
|
||||
app.innerHTML = ((layout && layout.default ? layout.default : layout) || '').replace(/[\r\n\t]+/g, '');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import _ from '_';
|
|||
import ko from 'ko';
|
||||
import {$body} from 'Common/Globals';
|
||||
import {EventKeyCode, Magics} from 'Common/Enums';
|
||||
import {trim, inArray, changeTheme} from 'Common/Utils';
|
||||
import {trim, deModule, inArray, changeTheme} from 'Common/Utils';
|
||||
import {reload as translatorReload} from 'Common/Translator';
|
||||
|
||||
import * as Settings from 'Storage/Settings';
|
||||
|
|
@ -22,7 +22,7 @@ let
|
|||
* @returns {string}
|
||||
*/
|
||||
function cmdError(cmd) {
|
||||
return require('Html/Cmds/Error.html').replace('{{ cmd }}', cmd);
|
||||
return deModule(require('Html/Cmds/Error.html')).replace('{{ cmd }}', cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -37,7 +37,7 @@ function cmdClear(dom) {
|
|||
* @returns {string}
|
||||
*/
|
||||
function cmdHelp(cmds) {
|
||||
return require('Html/Cmds/Help.html').replace('{{ commands }}', cmds.join(' '));
|
||||
return deModule(require('Html/Cmds/Help.html')).replace('{{ commands }}', cmds.join(' '));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -49,7 +49,7 @@ function cmdTheme(param, themes) {
|
|||
changeTheme(param);
|
||||
return '';
|
||||
}
|
||||
return require('Html/Cmds/ThemeEmpty.html').replace('{{ themes }}', themes.join(', '));
|
||||
return deModule(require('Html/Cmds/ThemeEmpty.html')).replace('{{ themes }}', themes.join(', '));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -61,14 +61,14 @@ function cmdLang(param, isAdmin, langs) {
|
|||
translatorReload(isAdmin, param);
|
||||
return '';
|
||||
}
|
||||
return require('Html/Cmds/LangEmpty.html').replace('{{ langs }}', langs.join(', '));
|
||||
return deModule(require('Html/Cmds/LangEmpty.html')).replace('{{ langs }}', langs.join(', '));
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
function cmdVersion() {
|
||||
return require('Html/Cmds/Version.html').replace('{{ version }}',
|
||||
return deModule(require('Html/Cmds/Version.html')).replace('{{ version }}',
|
||||
Settings.appSettingsGet('version') + ' (' + Settings.appSettingsGet('appVersionType') + ')');
|
||||
}
|
||||
|
||||
|
|
@ -231,7 +231,7 @@ class CmdContoller
|
|||
|
||||
if (h && h[0])
|
||||
{
|
||||
h.append($('<div></div>').html(require('Html/Cmds/Main.html').replace('{{ cmd }}', cmdLine)));
|
||||
h.append($('<div></div>').html(deModule(require('Html/Cmds/Main.html')).replace('{{ cmd }}', cmdLine)));
|
||||
if (result)
|
||||
{
|
||||
h.append($('<div></div>').html(result));
|
||||
|
|
|
|||
|
|
@ -254,6 +254,14 @@ const timeOutActionSecond = (function() {
|
|||
|
||||
export {timeOutAction, timeOutActionSecond};
|
||||
|
||||
/**
|
||||
* @param {any} m
|
||||
* @returns {any}
|
||||
*/
|
||||
export function deModule(m) {
|
||||
return (m && m.default ? m.default : m) || '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {boolean}
|
||||
*/
|
||||
|
|
@ -629,7 +637,7 @@ export function previewMessage({title, subject, date, fromCreds, toCreds, toLabe
|
|||
|
||||
const html = bodyClone ? bodyClone.html() : '';
|
||||
|
||||
doc.write(require('Html/PreviewMessage.html')
|
||||
doc.write(deModule(require('Html/PreviewMessage.html'))
|
||||
.replace('{{title}}', encodeHtml(title))
|
||||
.replace('{{subject}}', encodeHtml(subject))
|
||||
.replace('{{date}}', encodeHtml(date))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue