mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
*.jsx -> *.js
This commit is contained in:
parent
0a2b826f71
commit
e88c193334
98 changed files with 341 additions and 340 deletions
36
dev/Stores/AbstractApp.js
Normal file
36
dev/Stores/AbstractApp.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
import ko from 'ko';
|
||||
import {$html, bMobileDevice} from 'Common/Globals';
|
||||
import * as Settings from 'Storage/Settings';
|
||||
|
||||
class AbstractAppStore
|
||||
{
|
||||
constructor() {
|
||||
this.allowLanguagesOnSettings = ko.observable(true);
|
||||
this.allowLanguagesOnLogin = ko.observable(true);
|
||||
|
||||
this.interfaceAnimation = ko.observable(true);
|
||||
|
||||
this.interfaceAnimation.subscribe(function(bValue) {
|
||||
const bAnim = bMobileDevice || !bValue;
|
||||
$html.toggleClass('rl-anim', !bAnim).toggleClass('no-rl-anim', bAnim);
|
||||
});
|
||||
|
||||
this.interfaceAnimation.valueHasMutated();
|
||||
|
||||
this.prem = ko.observable(false);
|
||||
this.community = ko.observable(true);
|
||||
}
|
||||
|
||||
populate() {
|
||||
this.allowLanguagesOnLogin(!!Settings.settingsGet('AllowLanguagesOnLogin'));
|
||||
this.allowLanguagesOnSettings(!!Settings.settingsGet('AllowLanguagesOnSettings'));
|
||||
|
||||
this.interfaceAnimation(!!Settings.settingsGet('InterfaceAnimation'));
|
||||
|
||||
this.prem(!!Settings.settingsGet('PremType'));
|
||||
this.community(!!Settings.settingsGet('Community'));
|
||||
}
|
||||
}
|
||||
|
||||
export {AbstractAppStore, AbstractAppStore as default};
|
||||
Loading…
Add table
Add a link
Reference in a new issue