EmbyCrackedClient/web/games/games.js
2025-06-25 11:46:04 +08:00

1 line
No EOL
1.8 KiB
JavaScript

import TabbedView from"./../modules/tabbedview/tabbedview.js";import globalize from"./../modules/common/globalize.js";import"./../modules/emby-elements/emby-itemscontainer/emby-itemscontainer.js";import"./../modules/emby-elements/emby-button/emby-button.js";import"./../modules/emby-elements/emby-scroller/emby-scroller.js";function getTabs(){var subviews=this.item.Subviews||[];return[{name:globalize.translate("Systems"),id:"gamesystems",enabled:!0},{name:globalize.translate("Games"),id:"games",enabled:subviews.includes("games")},{name:globalize.translate("Collections"),id:"collections",enabled:subviews.includes("collections")},{name:globalize.translate("Genres"),id:"genres",enabled:subviews.includes("genres")},{name:globalize.translate("Tags"),id:"tags",enabled:subviews.includes("tags")},{name:globalize.translate("Folders"),id:"folders"}]}function GamesView(view,params){TabbedView.apply(this,arguments)}Object.assign(GamesView.prototype,TabbedView.prototype),GamesView.prototype.getTabs=getTabs,GamesView.prototype.getAutoBackdropItemTypes=function(){return["Game"]},GamesView.prototype.loadTabController=function(id){switch(id){case"collections":return Emby.importModule("./modules/tabbedview/collectionstab.js");case"genres":return Emby.importModule("./modules/tabbedview/genrestab.js");case"tags":return Emby.importModule("./modules/tabbedview/tagstab.js");case"folders":return Emby.importModule("./modules/tabbedview/folderstab.js");case"gamesystems":return Emby.importModule("./games/gamesystems.js");case"games":return Emby.importModule("./games/gamestab.js");default:throw new Error("tab not found: "+id)}},GamesView.prototype.getTabControllerOptions=function(id){var options=TabbedView.prototype.getTabControllerOptions.apply(this,arguments);return"genres"!==id&&"tags"!==id||(options.queryIncludeItemTypes=["Game"]),options};export default GamesView;