mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 17:13:49 -07:00
Added Auth, startup options to UI
Added caching to ConfigFileProvider,
This commit is contained in:
parent
8a5bd31da7
commit
4da6654440
34 changed files with 579 additions and 365 deletions
31
UI/Settings/General/GeneralView.js
Normal file
31
UI/Settings/General/GeneralView.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
'use strict';
|
||||
define(['app', 'Settings/SettingsModel', 'Shared/Messenger'], function () {
|
||||
|
||||
NzbDrone.Settings.General.GeneralView = Backbone.Marionette.ItemView.extend({
|
||||
template: 'Settings/General/GeneralTemplate',
|
||||
|
||||
initialize: function () {
|
||||
|
||||
NzbDrone.vent.on(NzbDrone.Commands.SaveSettings, this.saveSettings, this);
|
||||
},
|
||||
|
||||
saveSettings: function () {
|
||||
if (!this.model.isSaved) {
|
||||
this.model.save(undefined, this.syncNotification("Naming Settings Saved", "Couldn't Save Naming Settings"));
|
||||
}
|
||||
},
|
||||
|
||||
syncNotification: function (success, error) {
|
||||
return {
|
||||
success: function () {
|
||||
NzbDrone.Shared.Messenger.show({message: 'General Settings Saved'});
|
||||
},
|
||||
error : function () {
|
||||
NzbDrone.Shared.Messenger.show({message: "Couldn't Save General Settings", type: 'error'});
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue