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

Add enum for library tab values

This commit is contained in:
Bill Thornton 2023-05-09 10:28:29 -04:00
parent 9e5a58b861
commit e730f1a17c
6 changed files with 75 additions and 46 deletions

View file

@ -12,6 +12,7 @@ import globalize from '../../scripts/globalize';
import '../../styles/scrollstyles.scss';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
import '../../elements/emby-button/emby-button';
import { LibraryTab } from '../../types/libraryTab.ts';
import Dashboard from '../../utils/dashboard';
import Events from '../../utils/events.ts';
import autoFocuser from '../../components/autoFocuser';
@ -34,19 +35,19 @@ function getTabs() {
function getDefaultTabIndex(folderId) {
switch (userSettings.get('landing-' + folderId)) {
case 'suggestions':
case LibraryTab.Suggestions:
return 1;
case 'upcoming':
case LibraryTab.Upcoming:
return 2;
case 'genres':
case LibraryTab.Genres:
return 3;
case 'networks':
case LibraryTab.Networks:
return 4;
case 'episodes':
case LibraryTab.Episodes:
return 5;
default: