mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +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
|
|
@ -14,7 +14,7 @@ import { showScreenPopup } from 'Knoin/Knoin';
|
|||
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
import ThemeStore from 'Stores/Theme';
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
import LanguageStore from 'Stores/Language';
|
||||
import AppAdminStore from 'Stores/Admin/App';
|
||||
import CapaAdminStore from 'Stores/Admin/Capa';
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ import { SaveSettingsStep, UploadErrorCode, Capa } from 'Common/Enums';
|
|||
import { changeTheme, convertThemeName } from 'Common/Utils';
|
||||
import { userBackground, themePreviewLink, uploadBackground } from 'Common/Links';
|
||||
import { i18n } from 'Common/Translator';
|
||||
import { doc, $htmlCL } from 'Common/Globals';
|
||||
|
||||
import ThemeStore from 'Stores/Theme';
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
|
|
@ -39,13 +40,12 @@ export class ThemesUserSettings {
|
|||
});
|
||||
|
||||
this.background.hash.subscribe((value) => {
|
||||
const b = document.body, cl = document.documentElement.classList;
|
||||
if (!value) {
|
||||
cl.remove('UserBackground');
|
||||
b.removeAttribute('style');
|
||||
$htmlCL.remove('UserBackground');
|
||||
doc.body.removeAttribute('style');
|
||||
} else {
|
||||
cl.add('UserBackground');
|
||||
b.style.backgroundImage = "url("+userBackground(value)+")";
|
||||
$htmlCL.add('UserBackground');
|
||||
doc.body.style.backgroundImage = "url("+userBackground(value)+")";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue