mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 02:48:19 -07:00
Fix editing other user settings
This commit is contained in:
parent
1bcd33e011
commit
ea8007428e
@ -1,4 +1,4 @@
|
||||
define(["displaySettings", "userSettings", "autoFocuser"], function (DisplaySettings, currentUserSettings, autoFocuser) {
|
||||
define(["displaySettings", "userSettingsBuilder", "userSettings", "autoFocuser"], function (DisplaySettings, userSettingsBuilder, currentUserSettings, autoFocuser) {
|
||||
"use strict";
|
||||
|
||||
return function (view, params) {
|
||||
@ -11,7 +11,7 @@ define(["displaySettings", "userSettings", "autoFocuser"], function (DisplaySett
|
||||
var settingsInstance;
|
||||
var hasChanges;
|
||||
var userId = params.userId || ApiClient.getCurrentUserId();
|
||||
var userSettings = userId === ApiClient.getCurrentUserId() ? currentUserSettings : new userSettings();
|
||||
var userSettings = userId === ApiClient.getCurrentUserId() ? currentUserSettings : new userSettingsBuilder();
|
||||
view.addEventListener("viewshow", function () {
|
||||
window.addEventListener("beforeunload", onBeforeUnload);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(["homescreenSettings", "dom", "globalize", "loading", "userSettings", "autoFocuser", "listViewStyle"], function (HomescreenSettings, dom, globalize, loading, currentUserSettings, autoFocuser) {
|
||||
define(["homescreenSettings", "userSettingsBuilder", "dom", "globalize", "loading", "userSettings", "autoFocuser", "listViewStyle"], function (HomescreenSettings, userSettingsBuilder, dom, globalize, loading, currentUserSettings, autoFocuser) {
|
||||
"use strict";
|
||||
|
||||
return function (view, params) {
|
||||
@ -11,7 +11,7 @@ define(["homescreenSettings", "dom", "globalize", "loading", "userSettings", "au
|
||||
var homescreenSettingsInstance;
|
||||
var hasChanges;
|
||||
var userId = params.userId || ApiClient.getCurrentUserId();
|
||||
var userSettings = userId === ApiClient.getCurrentUserId() ? currentUserSettings : new userSettings();
|
||||
var userSettings = userId === ApiClient.getCurrentUserId() ? currentUserSettings : new userSettingsBuilder();
|
||||
view.addEventListener("viewshow", function () {
|
||||
window.addEventListener("beforeunload", onBeforeUnload);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(["playbackSettings", "dom", "globalize", "loading", "userSettings", "autoFocuser", "listViewStyle"], function (PlaybackSettings, dom, globalize, loading, currentUserSettings, autoFocuser) {
|
||||
define(["playbackSettings", "userSettingsBuilder", "dom", "globalize", "loading", "userSettings", "autoFocuser", "listViewStyle"], function (PlaybackSettings, userSettingsBuilder, dom, globalize, loading, currentUserSettings, autoFocuser) {
|
||||
"use strict";
|
||||
|
||||
return function (view, params) {
|
||||
@ -11,7 +11,7 @@ define(["playbackSettings", "dom", "globalize", "loading", "userSettings", "auto
|
||||
var settingsInstance;
|
||||
var hasChanges;
|
||||
var userId = params.userId || ApiClient.getCurrentUserId();
|
||||
var userSettings = userId === ApiClient.getCurrentUserId() ? currentUserSettings : new userSettings();
|
||||
var userSettings = userId === ApiClient.getCurrentUserId() ? currentUserSettings : new userSettingsBuilder();
|
||||
view.addEventListener("viewshow", function () {
|
||||
window.addEventListener("beforeunload", onBeforeUnload);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(["subtitleSettings", "userSettings", "autoFocuser"], function (SubtitleSettings, currentUserSettings, autoFocuser) {
|
||||
define(["subtitleSettings", "userSettingsBuilder", "userSettings", "autoFocuser"], function (SubtitleSettings, userSettingsBuilder, currentUserSettings, autoFocuser) {
|
||||
"use strict";
|
||||
|
||||
return function (view, params) {
|
||||
@ -11,7 +11,7 @@ define(["subtitleSettings", "userSettings", "autoFocuser"], function (SubtitleSe
|
||||
var subtitleSettingsInstance;
|
||||
var hasChanges;
|
||||
var userId = params.userId || ApiClient.getCurrentUserId();
|
||||
var userSettings = userId === ApiClient.getCurrentUserId() ? currentUserSettings : new userSettings();
|
||||
var userSettings = userId === ApiClient.getCurrentUserId() ? currentUserSettings : new userSettingsBuilder();
|
||||
view.addEventListener("viewshow", function () {
|
||||
window.addEventListener("beforeunload", onBeforeUnload);
|
||||
|
||||
|
@ -251,5 +251,5 @@ define(['appSettings', 'events'], function (appSettings, events) {
|
||||
return this.get(key, true);
|
||||
};
|
||||
|
||||
return new UserSettings();
|
||||
return UserSettings;
|
||||
});
|
@ -812,7 +812,10 @@ var AppInfo = {};
|
||||
define("emby-toggle", [elementsPath + "/emby-toggle/emby-toggle"], returnFirstDependency);
|
||||
|
||||
define("appSettings", [scriptsPath + "/settings/appSettings"], returnFirstDependency);
|
||||
define("userSettings", [scriptsPath + "/settings/userSettings"], returnFirstDependency);
|
||||
define("userSettingsBuilder", [scriptsPath + "/settings/userSettingsBuilder"], returnFirstDependency);
|
||||
define("userSettings", ["userSettingsBuilder"], function(userSettingsBuilder) {
|
||||
return new userSettingsBuilder();
|
||||
});
|
||||
|
||||
define("chromecastHelper", [componentsPath + "/chromecast/chromecasthelpers"], returnFirstDependency);
|
||||
define("mediaSession", [componentsPath + "/playback/mediasession"], returnFirstDependency);
|
||||
|
Loading…
Reference in New Issue
Block a user