1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 04:22:30 +01:00
Radarr/UI/System/Layout.js

80 lines
2.6 KiB
JavaScript
Raw Normal View History

2013-07-28 22:20:26 +02:00
'use strict';
define(
[
'app',
'marionette',
'System/StatusModel',
'System/About/View',
'Logs/Layout',
'Shared/Toolbar/ToolbarLayout',
'Shared/LoadingView'
], function (App,
Marionette,
StatusModel,
AboutView,
LogsLayout,
ToolbarLayout,
LoadingView) {
return Marionette.Layout.extend({
template: 'System/LayoutTemplate',
regions: {
toolbar : '#toolbar',
about : '#about',
loading : '#loading'
},
leftSideButtons: {
type : 'default',
storeState: false,
items :
[
{
title: 'Logs',
icon : 'icon-book',
route: 'logs'
},
{
2013-08-09 08:04:45 +02:00
title : 'Check for Update',
icon : 'icon-nd-update',
command: 'applicationUpdate'
},
2013-07-28 22:20:26 +02:00
// {
// title : 'Restart',
// icon : 'icon-repeat',
// command : 'restart',
// successMessage: 'NzbDrone restart has been triggered',
// errorMessage : 'Failed to restart NzbDrone'
// },
// {
// title : 'Shutdown',
// icon : 'icon-power-off',
// command : 'shutdown',
// successMessage: 'NzbDrone shutdown has started',
// errorMessage : 'Failed to shutdown NzbDrone'
// }
]
},
initialize: function () {
this.statusModel = StatusModel;
},
onRender: function () {
this._showToolbar();
this.about.show(new AboutView({ model: this.statusModel }));
},
_showToolbar: function () {
this.toolbar.show(new ToolbarLayout({
left :
[
this.leftSideButtons
],
context: this
}));
}
});
});