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

1 line
No EOL
2.1 KiB
JavaScript

import ItemsTab from"./../modules/tabbedview/itemstab.js";import"./../modules/emby-elements/emby-scroller/emby-scroller.js";import"./../modules/emby-elements/emby-button/emby-button.js";import globalize from"./../modules/common/globalize.js";import{appLogger}from"./../modules/common/servicelocator.js";function LogsTab(view,params){this.enableAlphaNumericShortcuts=!1,ItemsTab.call(this,view,params)}require(["flexStyles"]),Object.assign(LogsTab.prototype,ItemsTab.prototype),LogsTab.prototype.getMode=function(){return-1===window.location.href.toString().toLowerCase().indexOf("applog")?"server":"app"},LogsTab.prototype.getApiClientQueryMethodName=function(){return"getLogs"},LogsTab.prototype.getItems=function(query){return"server"===this.getMode()?ItemsTab.prototype.getItems.apply(this,arguments):appLogger.getLogFiles(query||{})},LogsTab.prototype.getBaseListRendererOptions=function(){var options=ItemsTab.prototype.getBaseListRendererOptions.apply(this,arguments);return options.draggable=!1,options.draggableXActions=!0,options.action="link",options},LogsTab.prototype.getListViewOptions=function(items,settings){var options=ItemsTab.prototype.getListViewOptions.apply(this,arguments);return options.transparentIcon=!0,options.enableDefaultIcon=!0,options.roundImage=!0,options.moreButton=!0,options.downloadButton=!0,options},LogsTab.prototype.getCardOptions=function(items,settings){var options=ItemsTab.prototype.getCardOptions.apply(this,arguments);return options.shape="backdrop",options.defaultBackground=!0,options},LogsTab.prototype.getItemTypes=function(){return["Log"]},LogsTab.prototype.getSettingsKey=function(){return"logs"},LogsTab.prototype.setTitle=function(){},LogsTab.prototype.getViewSettingDefaults=function(){var viewSettings=ItemsTab.prototype.getViewSettingDefaults.apply(this,arguments);return viewSettings.imageType="list",viewSettings},LogsTab.prototype.getItemCountText=function(numItems){return 1===numItems?globalize.translate("OneLog"):globalize.translate("LogCountValue",numItems)},LogsTab.prototype.loadTemplate=function(){return this.loadItemsTemplate()};export default LogsTab;