1 line
1.6 KiB
JavaScript
1 line
1.6 KiB
JavaScript
|
|
import ListPage from"./../list/list.js";import globalize from"./../modules/common/globalize.js";import"./../modules/emby-elements/emby-input/emby-input.js";import"./../modules/emby-elements/emby-button/emby-button.js";import"./../modules/emby-elements/emby-scroller/emby-scroller.js";function DevicesPage(view,params){this.enableAlphaNumericShortcuts=!1,ListPage.call(this,view,params),this.itemsContainer.setAttribute("data-monitor","Devices")}Object.assign(DevicesPage.prototype,ListPage.prototype),DevicesPage.prototype.getItemTypes=function(){return["Device"]},DevicesPage.prototype.getSettingsKey=function(){return"devices"},DevicesPage.prototype.getItemCountText=function(numItems){return 1===numItems?globalize.translate("OneDevice"):globalize.translate("DeviceCountValue",numItems)},DevicesPage.prototype.setTitle=function(){},DevicesPage.prototype.getBaseListRendererOptions=function(){var options=ListPage.prototype.getBaseListRendererOptions.apply(this,arguments);return options.draggable=!1,options.draggableXActions=!0,options},DevicesPage.prototype.getCardOptions=function(items,settings){var options=ListPage.prototype.getCardOptions.apply(this,arguments);return(options=Object.assign(options,{paddedImage:!0,defaultBackground:!0,shape:"backdrop"})).fields.includes("Name")&&options.fields.push("DeviceUserInfo"),options},DevicesPage.prototype.getListViewOptions=function(items,settings){var options=ListPage.prototype.getListViewOptions.apply(this,arguments);return options.enableDefaultIcon=!0,options.fields.includes("Name")&&options.fields.push("DeviceUserInfo"),options};export default DevicesPage;
|