snappymail/dev/Stores/Language.js
djmaze db0d03db83 Bugfix: conflicting File object with native JS
Cleanup: Stores and tooltips
2021-02-17 14:40:21 +01:00

17 lines
479 B
JavaScript

import ko from 'ko';
export const LanguageStore = {
languages: ko.observableArray(),
userLanguage: ko.observable(''),
populate: function() {
const Settings = rl.settings,
aLanguages = Settings.app('languages');
this.languages(Array.isArray(aLanguages) ? aLanguages : []);
this.language(Settings.get('Language'));
this.userLanguage(Settings.get('UserLanguage'));
}
}
LanguageStore.language = ko.observable('')
.extend({ limitedList: LanguageStore.languages });