mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix sonarjs no-small-switch
This commit is contained in:
parent
762573bef8
commit
76ed503c81
8 changed files with 29 additions and 46 deletions
|
@ -66,11 +66,9 @@ function renderRecordingFolders(context, promise) {
|
|||
|
||||
function onMoreClick() {
|
||||
const type = this.getAttribute('data-type');
|
||||
const serverId = ApiClient.serverId();
|
||||
|
||||
switch (type) {
|
||||
case 'latest':
|
||||
Dashboard.navigate('list.html?type=Recordings&serverId=' + serverId);
|
||||
if (type === 'latest') {
|
||||
Dashboard.navigate('list.html?type=Recordings&serverId=' + ApiClient.serverId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -374,10 +374,9 @@ import Dashboard from '../../utils/dashboard';
|
|||
}
|
||||
|
||||
function onInputCommand(e) {
|
||||
switch (e.detail.command) {
|
||||
case 'search':
|
||||
e.preventDefault();
|
||||
Dashboard.navigate('search.html?collectionType=movies&parentId=' + params.topParentId);
|
||||
if (e.detail.command === 'search') {
|
||||
e.preventDefault();
|
||||
Dashboard.navigate('search.html?collectionType=movies&parentId=' + params.topParentId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -348,10 +348,9 @@ import Dashboard from '../../utils/dashboard';
|
|||
}
|
||||
|
||||
function onInputCommand(e) {
|
||||
switch (e.detail.command) {
|
||||
case 'search':
|
||||
e.preventDefault();
|
||||
Dashboard.navigate('search.html?collectionType=music&parentId=' + params.topParentId);
|
||||
if (e.detail.command === 'search') {
|
||||
e.preventDefault();
|
||||
Dashboard.navigate('search.html?collectionType=music&parentId=' + params.topParentId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -333,10 +333,9 @@ import autoFocuser from '../../components/autoFocuser';
|
|||
}
|
||||
|
||||
function onInputCommand(e) {
|
||||
switch (e.detail.command) {
|
||||
case 'search':
|
||||
e.preventDefault();
|
||||
Dashboard.navigate('search.html?collectionType=tv&parentId=' + params.topParentId);
|
||||
if (e.detail.command === 'search') {
|
||||
e.preventDefault();
|
||||
Dashboard.navigate('search.html?collectionType=tv&parentId=' + params.topParentId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue