mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
rework nav drawer
This commit is contained in:
parent
52f247c51a
commit
ff8014a721
66 changed files with 5861 additions and 6234 deletions
|
@ -1,12 +1,24 @@
|
|||
define(['jQuery'], function ($) {
|
||||
|
||||
function loadPage(page, config) {
|
||||
function loadPage(page, config, users) {
|
||||
|
||||
page.querySelector('#chkEnablePlayTo').checked = config.EnablePlayTo;
|
||||
page.querySelector('#chkEnableDlnaDebugLogging').checked = config.EnableDebugLog;
|
||||
|
||||
$('#txtClientDiscoveryInterval', page).val(config.ClientDiscoveryIntervalSeconds);
|
||||
|
||||
$('#chkEnableServer', page).checked(config.EnableServer);
|
||||
$('#chkBlastAliveMessages', page).checked(config.BlastAliveMessages);
|
||||
$('#txtBlastInterval', page).val(config.BlastAliveMessageIntervalSeconds);
|
||||
|
||||
$('#chkEnableMovieFolders', page).checked(config.EnableMovieFolders);
|
||||
|
||||
var usersHtml = users.map(function (u) {
|
||||
return '<option value="' + u.Id + '">' + u.Name + '</option>';
|
||||
}).join('');
|
||||
|
||||
$('#selectUser', page).html(usersHtml).val(config.DefaultUserId || '');
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
|
@ -23,6 +35,13 @@
|
|||
|
||||
config.ClientDiscoveryIntervalSeconds = $('#txtClientDiscoveryInterval', form).val();
|
||||
|
||||
config.EnableServer = $('#chkEnableServer', form).checked();
|
||||
config.BlastAliveMessages = $('#chkBlastAliveMessages', form).checked();
|
||||
config.BlastAliveMessageIntervalSeconds = $('#txtBlastInterval', form).val();
|
||||
config.DefaultUserId = $('#selectUser', form).val();
|
||||
|
||||
config.EnableMovieFolders = $('#chkEnableMovieFolders', form).checked();
|
||||
|
||||
ApiClient.updateNamedConfiguration("dlna", config).then(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
|
@ -40,9 +59,12 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
ApiClient.getNamedConfiguration("dlna").then(function (config) {
|
||||
var promise1 = ApiClient.getNamedConfiguration("dlna");
|
||||
var promise2 = ApiClient.getUsers();
|
||||
|
||||
loadPage(page, config);
|
||||
Promise.all([promise1, promise2]).then(function (responses) {
|
||||
|
||||
loadPage(page, responses[0], responses[1]);
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue