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) {
|
||||
showActivePlayerMenuInternal(dialogHelper, playerInfo);
|
||||
showActivePlayerMenuInternal(playerInfo);
|
||||
}
|
||||
|
||||
function disconnectFromPlayer(currentDeviceName) {
|
||||
|
@ -182,7 +182,7 @@ function disconnectFromPlayer(currentDeviceName) {
|
|||
}
|
||||
}
|
||||
|
||||
function showActivePlayerMenuInternal(dialogHelper, playerInfo) {
|
||||
function showActivePlayerMenuInternal(playerInfo) {
|
||||
let html = '';
|
||||
|
||||
const dialogOptions = {
|
||||
|
|
|
@ -1995,6 +1995,7 @@ export default function (view, params) {
|
|||
|
||||
function onWebSocketMessage(e, data) {
|
||||
const msg = data;
|
||||
const apiClient = getApiClient();
|
||||
|
||||
if (msg.MessageType === 'UserDataChanged' && currentItem && msg.Data.UserId == apiClient.getCurrentUserId()) {
|
||||
const key = currentItem.UserData.Key;
|
||||
|
@ -2012,6 +2013,8 @@ export default function (view, params) {
|
|||
|
||||
let currentItem;
|
||||
const self = this;
|
||||
|
||||
function init() {
|
||||
const apiClient = getApiClient();
|
||||
|
||||
const btnResume = view.querySelector('.mainDetailButtons .btnResume');
|
||||
|
@ -2071,4 +2074,7 @@ export default function (view, params) {
|
|||
self._currentPlaybackMediaSources = null;
|
||||
self.currentRecordingFields = null;
|
||||
});
|
||||
}
|
||||
|
||||
init();
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ function getThemeStylesheetInfo(id) {
|
|||
let theme;
|
||||
|
||||
if (id) {
|
||||
theme = themes.find(theme => {
|
||||
return theme.id === id;
|
||||
theme = themes.find(currentTheme => {
|
||||
return currentTheme.id === id;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue