mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-26 16:26:44 +03:00
Cleanup a bit of javascript
This commit is contained in:
parent
0b8ec5c664
commit
938c209869
3 changed files with 54 additions and 48 deletions
|
|
@ -6,6 +6,7 @@ import { i18n } from 'Common/Translator';
|
|||
import { SettingsCapa } from 'Common/Globals';
|
||||
|
||||
import { ThemeStore, convertThemeName, changeTheme } from 'Stores/Theme';
|
||||
import { addSubscribablesTo } from 'External/ko';
|
||||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
|
|
@ -24,20 +25,22 @@ export class UserSettingsThemes /*extends AbstractViewSettings*/ {
|
|||
this.fontSansSerif = ThemeStore.fontSansSerif;
|
||||
this.fontSerif = ThemeStore.fontSerif;
|
||||
this.fontMono = ThemeStore.fontMono;
|
||||
ThemeStore.fontSansSerif.subscribe(value => {
|
||||
Remote.saveSettings(null, {
|
||||
fontSansSerif: value
|
||||
});
|
||||
});
|
||||
ThemeStore.fontSerif.subscribe(value => {
|
||||
Remote.saveSettings(null, {
|
||||
fontSerif: value
|
||||
});
|
||||
});
|
||||
ThemeStore.fontMono.subscribe(value => {
|
||||
Remote.saveSettings(null, {
|
||||
fontMono: value
|
||||
});
|
||||
addSubscribablesTo(ThemeStore, {
|
||||
fontSansSerif: value => {
|
||||
Remote.saveSettings(null, {
|
||||
fontSansSerif: value
|
||||
});
|
||||
},
|
||||
fontSerif: value => {
|
||||
Remote.saveSettings(null, {
|
||||
fontSerif: value
|
||||
});
|
||||
},
|
||||
fontMono: value => {
|
||||
Remote.saveSettings(null, {
|
||||
fontMono: value
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.theme = ThemeStore.theme;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue