mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-28 09:41:29 +08:00
45 lines
No EOL
1 KiB
JavaScript
45 lines
No EOL
1 KiB
JavaScript
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
|
|
|
(function (module, require) {
|
|
|
|
'use strict';
|
|
|
|
var
|
|
ko = require('ko'),
|
|
|
|
Settings = require('Storage:Settings'),
|
|
Data = require('Storage:Admin:Data'),
|
|
Remote = require('Storage:Admin:Remote'),
|
|
|
|
kn = require('App:Knoin'),
|
|
KnoinAbstractViewModel = require('Knoin:AbstractViewModel')
|
|
;
|
|
|
|
/**
|
|
* @constructor
|
|
* @extends KnoinAbstractViewModel
|
|
*/
|
|
function AdminPaneViewModel()
|
|
{
|
|
KnoinAbstractViewModel.call(this, 'Right', 'AdminPane');
|
|
|
|
this.adminDomain = ko.observable(Settings.settingsGet('AdminDomain'));
|
|
this.version = ko.observable(Settings.settingsGet('Version'));
|
|
|
|
this.adminManLoadingVisibility = Data.adminManLoadingVisibility;
|
|
|
|
kn.constructorEnd(this);
|
|
}
|
|
|
|
kn.extendAsViewModel('AdminPaneViewModel', AdminPaneViewModel);
|
|
|
|
AdminPaneViewModel.prototype.logoutClick = function ()
|
|
{
|
|
Remote.adminLogout(function () {
|
|
require('App:Admin').loginAndLogoutReload();
|
|
});
|
|
};
|
|
|
|
module.exports = AdminPaneViewModel;
|
|
|
|
}(module, require)); |