mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixed code smells
This commit is contained in:
parent
fc9f747db2
commit
5c58d1472f
3 changed files with 65 additions and 59 deletions
|
@ -144,7 +144,7 @@ export function show(button) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function showActivePlayerMenu(playerInfo) {
|
function showActivePlayerMenu(playerInfo) {
|
||||||
showActivePlayerMenuInternal(dialogHelper, playerInfo);
|
showActivePlayerMenuInternal(playerInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
function disconnectFromPlayer(currentDeviceName) {
|
function disconnectFromPlayer(currentDeviceName) {
|
||||||
|
@ -182,7 +182,7 @@ function disconnectFromPlayer(currentDeviceName) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showActivePlayerMenuInternal(dialogHelper, playerInfo) {
|
function showActivePlayerMenuInternal(playerInfo) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
const dialogOptions = {
|
const dialogOptions = {
|
||||||
|
|
|
@ -1995,6 +1995,7 @@ export default function (view, params) {
|
||||||
|
|
||||||
function onWebSocketMessage(e, data) {
|
function onWebSocketMessage(e, data) {
|
||||||
const msg = data;
|
const msg = data;
|
||||||
|
const apiClient = getApiClient();
|
||||||
|
|
||||||
if (msg.MessageType === 'UserDataChanged' && currentItem && msg.Data.UserId == apiClient.getCurrentUserId()) {
|
if (msg.MessageType === 'UserDataChanged' && currentItem && msg.Data.UserId == apiClient.getCurrentUserId()) {
|
||||||
const key = currentItem.UserData.Key;
|
const key = currentItem.UserData.Key;
|
||||||
|
@ -2012,6 +2013,8 @@ export default function (view, params) {
|
||||||
|
|
||||||
let currentItem;
|
let currentItem;
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
|
function init() {
|
||||||
const apiClient = getApiClient();
|
const apiClient = getApiClient();
|
||||||
|
|
||||||
const btnResume = view.querySelector('.mainDetailButtons .btnResume');
|
const btnResume = view.querySelector('.mainDetailButtons .btnResume');
|
||||||
|
@ -2071,4 +2074,7 @@ export default function (view, params) {
|
||||||
self._currentPlaybackMediaSources = null;
|
self._currentPlaybackMediaSources = null;
|
||||||
self.currentRecordingFields = null;
|
self.currentRecordingFields = null;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@ function getThemeStylesheetInfo(id) {
|
||||||
let theme;
|
let theme;
|
||||||
|
|
||||||
if (id) {
|
if (id) {
|
||||||
theme = themes.find(theme => {
|
theme = themes.find(currentTheme => {
|
||||||
return theme.id === id;
|
return currentTheme.id === id;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue