*.jsx -> *.js

This commit is contained in:
RainLoop Team 2016-08-11 02:34:09 +03:00
parent 0a2b826f71
commit e88c193334
98 changed files with 341 additions and 340 deletions

73
dev/Stores/User/App.js Normal file
View file

@ -0,0 +1,73 @@
import ko from 'ko';
import {Focused, KeyState} from 'Common/Enums';
import {keyScope} from 'Common/Globals';
import * as Settings from 'Storage/Settings';
import {isNonEmptyArray} from 'Common/Utils';
import {AbstractAppStore} from 'Stores/AbstractApp';
class AppUserStore extends AbstractAppStore
{
constructor() {
super();
this.currentAudio = ko.observable('');
this.focusedState = ko.observable(Focused.None);
this.focusedState.subscribe(function(value) {
switch (value)
{
case Focused.MessageList:
keyScope(KeyState.MessageList);
break;
case Focused.MessageView:
keyScope(KeyState.MessageView);
break;
case Focused.FolderList:
keyScope(KeyState.FolderList);
break;
default:
break;
}
}, this);
this.projectHash = ko.observable('');
this.threadsAllowed = ko.observable(false);
this.composeInEdit = ko.observable(false);
this.contactsAutosave = ko.observable(false);
this.useLocalProxyForExternalImages = ko.observable(false);
this.contactsIsAllowed = ko.observable(false);
this.attachmentsActions = ko.observableArray([]);
this.devEmail = '';
this.devPassword = '';
}
populate() {
super.populate();
this.projectHash(Settings.settingsGet('ProjectHash'));
this.contactsAutosave(!!Settings.settingsGet('ContactsAutosave'));
this.useLocalProxyForExternalImages(!!Settings.settingsGet('UseLocalProxyForExternalImages'));
this.contactsIsAllowed(!!Settings.settingsGet('ContactsIsAllowed'));
const attachmentsActions = Settings.appSettingsGet('attachmentsActions');
this.attachmentsActions(isNonEmptyArray(attachmentsActions) ? attachmentsActions : []);
this.devEmail = Settings.settingsGet('DevEmail');
this.devPassword = Settings.settingsGet('DevPassword');
}
}
module.exports = new AppUserStore();