Migrate appRouter to ES6

This commit is contained in:
MrTimscampi 2020-07-30 20:34:21 +02:00
parent e2aff66203
commit 4aa0ef4936
28 changed files with 652 additions and 709 deletions

View file

@ -8,7 +8,6 @@ import browser from 'browser';
import actionsheet from 'actionsheet';
/* eslint-disable indent */
export function getCommands(options) {
const item = options.item;
const user = options.user;
@ -16,7 +15,7 @@ import actionsheet from 'actionsheet';
const canPlay = playbackManager.canPlay(item);
const restrictOptions = (browser.operaTv || browser.web0s) && !user.Policy.IsAdministrator;
let commands = [];
const commands = [];
if (canPlay && item.MediaType !== 'Photo') {
if (options.play !== false) {
@ -367,7 +366,7 @@ import actionsheet from 'actionsheet';
case 'copy-stream': {
const downloadHref = apiClient.getItemDownloadUrl(itemId);
const textAreaCopy = function () {
let textArea = document.createElement('textarea');
const textArea = document.createElement('textarea');
textArea.value = downloadHref;
document.body.appendChild(textArea);
textArea.focus();