mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Simplify UserBackground code
This commit is contained in:
parent
e13337e247
commit
18cedbabad
4 changed files with 14 additions and 32 deletions
|
|
@ -2,9 +2,9 @@ import ko from 'ko';
|
|||
|
||||
import { SaveSettingsStep, UploadErrorCode, Capa } from 'Common/Enums';
|
||||
import { changeTheme, convertThemeName } from 'Common/Utils';
|
||||
import { userBackground, themePreviewLink, serverRequest } from 'Common/Links';
|
||||
import { themePreviewLink, serverRequest } from 'Common/Links';
|
||||
import { i18n } from 'Common/Translator';
|
||||
import { doc, $htmlCL, Settings } from 'Common/Globals';
|
||||
import { Settings } from 'Common/Globals';
|
||||
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
|
||||
|
|
@ -38,16 +38,6 @@ export class ThemesUserSettings {
|
|||
Theme: value
|
||||
});
|
||||
});
|
||||
|
||||
this.background.hash.subscribe((value) => {
|
||||
if (!value) {
|
||||
$htmlCL.remove('UserBackground');
|
||||
doc.body.removeAttribute('style');
|
||||
} else {
|
||||
$htmlCL.add('UserBackground');
|
||||
doc.body.style.backgroundImage = "url("+userBackground(value)+")";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onBuild() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue