mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Sound notification
Additional code refactoring
This commit is contained in:
parent
b42ce01e7e
commit
aa84077ac4
87 changed files with 1573 additions and 574 deletions
39
dev/Stores/Theme.js
Normal file
39
dev/Stores/Theme.js
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
|
||||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
Settings = require('Storage/Settings')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function ThemeStore()
|
||||
{
|
||||
this.themes = ko.observableArray([]);
|
||||
this.themeBackgroundName = ko.observable('');
|
||||
this.themeBackgroundHash = ko.observable('');
|
||||
|
||||
this.theme = ko.observable('')
|
||||
.extend({'limitedList': this.themes});
|
||||
}
|
||||
|
||||
ThemeStore.prototype.populate = function ()
|
||||
{
|
||||
var aThemes = Settings.settingsGet('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