mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
Small code cleanups and fix translations
This commit is contained in:
parent
b31bf3d7f5
commit
7ccc44616d
54 changed files with 288 additions and 426 deletions
|
|
@ -2,9 +2,7 @@ import ko from 'ko';
|
|||
import { KeyState } from 'Common/Enums';
|
||||
import { Focused } from 'Common/EnumsUser';
|
||||
|
||||
import { keyScope, leftPanelDisabled } from 'Common/Globals';
|
||||
|
||||
const Settings = rl.settings;
|
||||
import { keyScope, leftPanelDisabled, Settings } from 'Common/Globals';
|
||||
|
||||
class AppUserStore {
|
||||
constructor() {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import ko from 'ko';
|
|||
|
||||
import { StorageResultType, Notification } from 'Common/Enums';
|
||||
import { Layout, Focused, MessageSetAction } from 'Common/EnumsUser';
|
||||
|
||||
import { doc } from 'Common/Globals';
|
||||
import { pInt, pString } from 'Common/Utils';
|
||||
import { plainToHtml } from 'Common/UtilsUser';
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ const
|
|||
|
||||
let iMessageBodyCacheCount = 0;
|
||||
|
||||
document.body.append(hcont);
|
||||
doc.body.append(hcont);
|
||||
|
||||
class MessageUserStore {
|
||||
constructor() {
|
||||
|
|
@ -485,7 +485,7 @@ class MessageUserStore {
|
|||
if (messagesDom) {
|
||||
id = 'rl-mgs-' + message.hash.replace(/[^a-zA-Z0-9]/g, '');
|
||||
|
||||
const textBody = document.getElementById(id);
|
||||
const textBody = doc.getElementById(id);
|
||||
if (textBody) {
|
||||
textBody.rlCacheCount = ++iMessageBodyCacheCount;
|
||||
message.body = textBody;
|
||||
|
|
@ -508,7 +508,7 @@ class MessageUserStore {
|
|||
/-----BEGIN PGP SIGNED MESSAGE-----/.test(plain) && /-----BEGIN PGP SIGNATURE-----/.test(plain);
|
||||
}
|
||||
|
||||
const pre = document.createElement('pre');
|
||||
const pre = doc.createElement('pre');
|
||||
if (pgpSigned && message.isPgpSigned()) {
|
||||
pre.className = 'b-plain-openpgp signed';
|
||||
pre.textContent = plain;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import ko from 'ko';
|
|||
|
||||
import { i18n } from 'Common/Translator';
|
||||
import { pString } from 'Common/Utils';
|
||||
import { doc } from 'Common/Globals';
|
||||
|
||||
import AccountStore from 'Stores/User/Account';
|
||||
|
||||
|
|
@ -360,7 +361,7 @@ class PgpUserStore {
|
|||
verControl.addEventHandler('click', domControlSignedClickHelper(this, dom, domText));
|
||||
}
|
||||
|
||||
dom.before(verControl, document.createElement('div'));
|
||||
dom.before(verControl, doc.createElement('div'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import ko from 'ko';
|
|||
import { MESSAGES_PER_PAGE_VALUES } from 'Common/Consts';
|
||||
import { Layout, EditorDefaultType } from 'Common/EnumsUser';
|
||||
import { pInt } from 'Common/Utils';
|
||||
import { doc } from 'Common/Globals';
|
||||
|
||||
class SettingsUserStore {
|
||||
constructor() {
|
||||
|
|
@ -39,7 +40,7 @@ class SettingsUserStore {
|
|||
}
|
||||
|
||||
subscribers() {
|
||||
const htmlCL = document.documentElement.classList;
|
||||
const htmlCL = doc.documentElement.classList;
|
||||
this.layout.subscribe(value => {
|
||||
htmlCL.toggle('rl-no-preview-pane', Layout.NoPreview === value);
|
||||
htmlCL.toggle('rl-side-preview-pane', Layout.SidePreview === value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue