1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

rework settings page

This commit is contained in:
Luke Pulverenti 2015-07-28 15:42:24 -04:00
parent 3e9ce24eaf
commit 2548f83871
35 changed files with 1216 additions and 520 deletions

View file

@ -28,11 +28,11 @@
});
$('#selectSubtitlePlaybackMode', page).val(user.Configuration.SubtitleMode || "").selectmenu("refresh").trigger('change');
$('#chkPlayDefaultAudioTrack', page).checked(user.Configuration.PlayDefaultAudioTrack || false).checkboxradio("refresh");
$('#chkEnableCinemaMode', page).checked(user.Configuration.EnableCinemaMode || false).checkboxradio("refresh");
$('#chkEnableChromecastAc3', page).checked(AppSettings.enableChromecastAc3()).checkboxradio("refresh");
$('#chkExternalVideoPlayer', page).checked(AppSettings.enableExternalPlayers()).checkboxradio("refresh");
page.querySelector('.chkPlayDefaultAudioTrack').checked = user.Configuration.PlayDefaultAudioTrack || false;
page.querySelector('.chkEnableCinemaMode').checked = user.Configuration.EnableCinemaMode || false;
page.querySelector('.chkEnableChromecastAc3').checked = AppSettings.enableChromecastAc3();
page.querySelector('.chkExternalVideoPlayer').checked = AppSettings.enableExternalPlayers();
var bitrateOptions = MediaPlayer.getVideoQualityOptions().map(function (i) {
@ -81,8 +81,8 @@
user.Configuration.SubtitleLanguagePreference = $('#selectSubtitleLanguage', page).val();
user.Configuration.SubtitleMode = $('#selectSubtitlePlaybackMode', page).val();
user.Configuration.PlayDefaultAudioTrack = $('#chkPlayDefaultAudioTrack', page).checked();
user.Configuration.EnableCinemaMode = $('#chkEnableCinemaMode', page).checked();
user.Configuration.PlayDefaultAudioTrack = page.querySelector('.chkPlayDefaultAudioTrack').checked;
user.Configuration.EnableCinemaMode = page.querySelector('.chkEnableCinemaMode').checked;
ApiClient.updateUserConfiguration(user.Id, user.Configuration).done(function () {
Dashboard.alert(Globalize.translate('SettingsSaved'));
@ -98,10 +98,11 @@
Dashboard.showLoadingMsg();
AppSettings.enableExternalPlayers($('#chkExternalVideoPlayer', page).checked());
AppSettings.enableExternalPlayers(page.querySelector('.chkExternalVideoPlayer').checked);
AppSettings.maxStreamingBitrate($('#selectMaxBitrate', page).val());
AppSettings.maxChromecastBitrate($('#selectMaxChromecastBitrate', page).val());
AppSettings.enableChromecastAc3($('#chkEnableChromecastAc3', page).checked());
AppSettings.enableExternalPlayers(page.querySelector('.chkEnableChromecastAc3').checked);
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();