mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
es5 -> es2015 (last stage)
Signature plugin fixes Add view decorator A large number of fixes
This commit is contained in:
parent
e88c193334
commit
17669b7be0
153 changed files with 21193 additions and 21115 deletions
|
|
@ -1,32 +1,26 @@
|
|||
|
||||
var
|
||||
ko = require('ko'),
|
||||
import ko from 'ko';
|
||||
import {isArray} from 'Common/Utils';
|
||||
import * as Settings from 'Storage/Settings';
|
||||
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
Settings = require('Storage/Settings');
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function ThemeStore()
|
||||
class ThemeStore
|
||||
{
|
||||
this.themes = ko.observableArray([]);
|
||||
this.themeBackgroundName = ko.observable('');
|
||||
this.themeBackgroundHash = ko.observable('');
|
||||
constructor() {
|
||||
this.themes = ko.observableArray([]);
|
||||
this.themeBackgroundName = ko.observable('');
|
||||
this.themeBackgroundHash = ko.observable('');
|
||||
|
||||
this.theme = ko.observable('')
|
||||
.extend({'limitedList': this.themes});
|
||||
this.theme = ko.observable('').extend({limitedList: this.themes});
|
||||
}
|
||||
|
||||
populate() {
|
||||
const themes = Settings.appSettingsGet('themes');
|
||||
|
||||
this.themes(isArray(themes) ? themes : []);
|
||||
this.theme(Settings.settingsGet('Theme'));
|
||||
this.themeBackgroundName(Settings.settingsGet('UserBackgroundName'));
|
||||
this.themeBackgroundHash(Settings.settingsGet('UserBackgroundHash'));
|
||||
}
|
||||
}
|
||||
|
||||
ThemeStore.prototype.populate = function()
|
||||
{
|
||||
var aThemes = Settings.appSettingsGet('themes');
|
||||
|
||||
this.themes(Utils.isArray(aThemes) ? aThemes : []);
|
||||
this.theme(Settings.settingsGet('Theme'));
|
||||
this.themeBackgroundName(Settings.settingsGet('UserBackgroundName'));
|
||||
this.themeBackgroundHash(Settings.settingsGet('UserBackgroundHash'));
|
||||
};
|
||||
|
||||
module.exports = new ThemeStore();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue