diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index f8e8780ad3..e471a8f712 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -14,12 +14,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.4.172", - "_release": "1.4.172", + "version": "1.4.173", + "_release": "1.4.173", "_resolution": { "type": "version", - "tag": "1.4.172", - "commit": "044948fa660671caa6d1ce4951ccf0d4c6e211e2" + "tag": "1.4.173", + "commit": "8766e295ec13de73c5ef5a61c7357fc30d8c9fa1" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.1", diff --git a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js index 39e66cfd4b..c9dc6d196e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js +++ b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js @@ -702,7 +702,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo return html; } - function getCardFooterText(item, options, showTitle, imgUrl, footerClass, progressHtml, isOuterFooter) { + function getCardFooterText(item, options, showTitle, forceName, imgUrl, footerClass, progressHtml, isOuterFooter) { var html = ''; @@ -869,6 +869,10 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo } } + if (showTitle && forceName && lines.length == 1) { + lines = []; + } + html += getCardTextLines(lines, cssClass, !options.overlayText, isOuterFooter); if (progressHtml) { @@ -1012,7 +1016,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo var imgInfo = getCardImageUrl(item, apiClient, options); var imgUrl = imgInfo.imgUrl; - var forceName = imgInfo.forceName; + var forceName = imgInfo.forceName || !imgUrl; var showTitle = options.showTitle == 'auto' ? true : (options.showTitle || item.Type == 'PhotoAlbum' || item.Type == 'Folder'); var overlayText = options.overlayText; @@ -1057,7 +1061,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo if (overlayText) { footerCssClass = progressHtml ? 'innerCardFooter fullInnerCardFooter' : 'innerCardFooter'; - innerCardFooter += getCardFooterText(item, options, showTitle, imgUrl, footerCssClass, progressHtml, false); + innerCardFooter += getCardFooterText(item, options, showTitle, forceName, imgUrl, footerCssClass, progressHtml, false); footerOverlayed = true; } else if (progressHtml) { @@ -1076,7 +1080,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo var outerCardFooter = ''; if (!overlayText && !footerOverlayed) { footerCssClass = options.cardLayout ? 'cardFooter' : 'cardFooter transparent'; - outerCardFooter = getCardFooterText(item, options, showTitle, imgUrl, footerCssClass, progressHtml, true); + outerCardFooter = getCardFooterText(item, options, showTitle, forceName, imgUrl, footerCssClass, progressHtml, true); } if (outerCardFooter && !options.cardLayout && options.allowBottomPadding !== false) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json index 55e3ba9b76..4982b64d81 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/bg-BG.json b/dashboard-ui/bower_components/emby-webcomponents/strings/bg-BG.json index dd6257a51d..bd971ace2c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/bg-BG.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/bg-BG.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json index e684634a0a..0d4807ad54 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json b/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json index 10ddbdc195..e3732a85ca 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json index e26ea71c61..66ec2e1bdd 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/de.json b/dashboard-ui/bower_components/emby-webcomponents/strings/de.json index 10f181c718..a88fb83506 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/de.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/de.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Offline verf\u00fcgbar machen", "ServerNameIsRestarting": "Emby Server - {0} startet neu.", "ServerNameIsShuttingDown": "Emby Server - {0} f\u00e4hrt herunter.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Bitte starte Emby Server - {0} neu." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/el.json b/dashboard-ui/bower_components/emby-webcomponents/strings/el.json index 27bb6eb6c5..21d7ce6806 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/el.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/el.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/en-GB.json b/dashboard-ui/bower_components/emby-webcomponents/strings/en-GB.json index d08b344320..779f2dae29 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-GB.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-GB.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es-AR.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es-AR.json index d306708ec4..c3b5c2ca52 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-AR.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-AR.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json index 82dd5549df..ed96888622 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es.json index d3bf0301a1..18d66fad0f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json index 88e6536ea0..4c676fda91 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fr-CA.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fr-CA.json index 69065614df..552f540717 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fr-CA.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fr-CA.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json index 1c46787bf3..0a61d404c5 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Rendre disponible hors connexion", "ServerNameIsRestarting": "Emby Server - {0} est red\u00e9marr\u00e9.", "ServerNameIsShuttingDown": "Emby Server - {0} est arr\u00eater.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "S'il vous pla\u00eet red\u00e9marrer Emby server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json b/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json index f4f204680a..e873bc0bad 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/he.json b/dashboard-ui/bower_components/emby-webcomponents/strings/he.json index de9023c714..a5484acdeb 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/he.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/he.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json index f6f5861f79..ac6eaf1d83 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json b/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json index ae1513e098..8c07f95850 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/id.json b/dashboard-ui/bower_components/emby-webcomponents/strings/id.json index c9f7526614..e808a1c630 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/id.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/id.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/it.json b/dashboard-ui/bower_components/emby-webcomponents/strings/it.json index b3569abcd0..d4d6ecbb72 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/it.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/it.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json index 6c8980a2a2..6c3f272930 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "\u0414\u0435\u0440\u0431\u0435\u0441 \u049b\u043e\u043b\u0436\u0435\u0442\u0456\u043c\u0434\u0456 \u0435\u0442\u0443", "ServerNameIsRestarting": "Emby Server - {0} \u049b\u0430\u0439\u0442\u0430 \u0456\u0441\u043a\u0435 \u049b\u043e\u0441\u044b\u043b\u0443\u0434\u0430.", "ServerNameIsShuttingDown": "Emby Server - {0} \u0436\u04b1\u043c\u044b\u0441\u0442\u044b \u0430\u044f\u049b\u0442\u0430\u0443\u0434\u0430.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Emby Server \u04af\u0448\u0456\u043d \u049b\u0430\u0439\u0442\u0430 \u0456\u0441\u043a\u0435 \u049b\u043e\u0441\u044b\u04a3\u044b\u0437 - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json index 5b1b515c8b..f19c9d2f05 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json index 69065614df..552f540717 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json index 91fc28003f..ff95104968 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json index d373355ad2..3eb3d4bb86 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json b/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json index f3b894a423..fc3b4f69b7 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-BR.json b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-BR.json index cbbc019a8a..05f81dc56e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-BR.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-BR.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Disponibilizar offline", "ServerNameIsRestarting": "Servidor Emby - {0} est\u00e1 reiniciando.", "ServerNameIsShuttingDown": "Servidor Emby - {0} est\u00e1 desligando.", + "HeaderDeleteItems": "Apagar Itens", + "ConfirmDeleteItems": "Apagar estes itens ir\u00e1 remov\u00ea-los do sistema de arquivos e da biblioteca de m\u00eddia. Tem certeza que deseja continuar?", "PleaseRestartServerName": "Por favor reinicie o Servidor Emby - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-PT.json b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-PT.json index 3c2c7ecfd4..4ffe9fe89b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-PT.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-PT.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json index 7bb318240f..a802907826 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json index 0962634744..493cba9f38 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e", "ServerNameIsRestarting": "Emby Server - {0} \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f.", "ServerNameIsShuttingDown": "Emby Server - {0} \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json index 69065614df..552f540717 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sl-SI.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sl-SI.json index 51047c140b..ec4cb25764 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sl-SI.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sl-SI.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json index 02904431d1..387064bd8e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json index 70f99061b3..fc614cb8c2 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json index 04c60a4d15..15ff01f2dd 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json b/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json index fa221e593f..d5428b4e97 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-CN.json b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-CN.json index 7af47e4433..1b9897833b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-CN.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-CN.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-HK.json b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-HK.json index 3ed8836499..1a296176a2 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-HK.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-HK.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-TW.json b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-TW.json index 37d13a1c13..4687a2d7b8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-TW.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-TW.json @@ -252,5 +252,7 @@ "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "PleaseRestartServerName": "Please restart Emby Server - {0}." } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-icon/.bower.json b/dashboard-ui/bower_components/iron-icon/.bower.json index 87e3dad5d3..f76855b27a 100644 --- a/dashboard-ui/bower_components/iron-icon/.bower.json +++ b/dashboard-ui/bower_components/iron-icon/.bower.json @@ -32,14 +32,14 @@ "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/polymerelements/iron-icon", + "homepage": "https://github.com/PolymerElements/iron-icon", "_release": "1.0.10", "_resolution": { "type": "version", "tag": "v1.0.10", "commit": "f4e146da4982ff96bb25db85290c09e8de4ec734" }, - "_source": "git://github.com/polymerelements/iron-icon.git", + "_source": "git://github.com/PolymerElements/iron-icon.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-icon" + "_originalSource": "PolymerElements/iron-icon" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json index 15bb248747..25eb84c037 100644 --- a/dashboard-ui/bower_components/polymer/.bower.json +++ b/dashboard-ui/bower_components/polymer/.bower.json @@ -32,14 +32,14 @@ "iron-component-page": "polymerElements/iron-component-page#^1.1.6" }, "private": true, - "homepage": "https://github.com/Polymer/polymer", + "homepage": "https://github.com/polymer/polymer", "_release": "1.6.1", "_resolution": { "type": "version", "tag": "v1.6.1", "commit": "1f197d9d7874b1e5808b2a5c26f34446a7d912fc" }, - "_source": "git://github.com/Polymer/polymer.git", - "_target": "^1.0.0", - "_originalSource": "Polymer/polymer" + "_source": "git://github.com/polymer/polymer.git", + "_target": "^1.1.0", + "_originalSource": "polymer/polymer" } \ No newline at end of file diff --git a/dashboard-ui/scripts/mysync.js b/dashboard-ui/scripts/mysync.js index c48419c608..56449ef355 100644 --- a/dashboard-ui/scripts/mysync.js +++ b/dashboard-ui/scripts/mysync.js @@ -1,4 +1,4 @@ -define(['loading', 'apphost', 'globalize', 'syncJobList', 'events', 'localsync'], function (loading, appHost, globalize, syncJobList, events) { +define(['loading', 'apphost', 'globalize', 'syncJobList', 'events', 'localsync', 'emby-button', 'paper-icon-button-light'], function (loading, appHost, globalize, syncJobList, events) { function initSupporterInfo(view, params) { diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 762e5e6e57..400f1721e9 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -2327,7 +2327,7 @@ var AppInfo = {}; defineRoute({ path: '/mysync.html', - dependencies: ['scripts/syncactivity', 'scripts/taskbutton', 'emby-button'], + dependencies: [], autoFocus: false, transition: 'fade', controller: 'scripts/mysync' @@ -2493,7 +2493,8 @@ var AppInfo = {}; defineRoute({ path: '/syncactivity.html', dependencies: [], - autoFocus: false + autoFocus: false, + controller: 'scripts/syncactivity' }); defineRoute({ diff --git a/dashboard-ui/scripts/syncactivity.js b/dashboard-ui/scripts/syncactivity.js index a479697398..d0f88a1fef 100644 --- a/dashboard-ui/scripts/syncactivity.js +++ b/dashboard-ui/scripts/syncactivity.js @@ -1,394 +1,4 @@ -define(['jQuery', 'paper-icon-button-light', 'cardStyle'], function ($) { - - function cancelJob(page, id) { - - var msg = Globalize.translate('CancelSyncJobConfirmation'); - - require(['confirm'], function (confirm) { - - confirm(msg, Globalize.translate('HeaderCancelSyncJob')).then(function () { - - Dashboard.showLoadingMsg(); - - ApiClient.ajax({ - - url: ApiClient.getUrl('Sync/Jobs/' + id), - type: 'DELETE' - - }).then(function () { - - reloadData(page); - }); - }); - }); - } - - function getSyncStatusBanner(job) { - - var opacity = '.85'; - var background = 'rgba(204,51,51,' + opacity + ')'; - var text = Globalize.translate('SyncJobStatus' + job.Status); - - if (job.Status == 'Completed') { - background = 'rgba(82, 181, 75, ' + opacity + ')'; - } - else if (job.Status == 'CompletedWithError') { - - } - else if (job.Status == 'Queued') { - background = 'rgba(51, 136, 204, ' + opacity + ')'; - } - else if (job.Status == 'ReadyToTransfer') { - background = 'rgba(51, 136, 204, ' + opacity + ')'; - } - else if (job.Status == 'Transferring') { - background = 'rgba(72, 0, 255, ' + opacity + ')'; - } - else if (job.Status == 'Converting') { - background = 'rgba(255, 106, 0, ' + opacity + ')'; - } - - var html = ''; - html += '
'; - html += text; - html += '
'; - - return html; - } - - function getSyncJobHtml(page, job, cardBoxCssClass, syncJobPage) { - - var html = ''; - - html += "
"; - - html += '
'; - html += '"; - - html += '
'; - - var textLines = []; - - if (job.ParentName) { - textLines.push(job.ParentName); - } - - textLines.push(job.Name); - - if (job.ItemCount == 1) { - textLines.push(Globalize.translate('ValueItemCount', job.ItemCount)); - } else { - textLines.push(Globalize.translate('ValueItemCountPlural', job.ItemCount)); - } - - if (!job.ParentName) { - textLines.push(' '); - } - - html += '
'; - html += ''; - html += "
"; - - for (var i = 0, length = textLines.length; i < length; i++) { - html += "
"; - html += textLines[i]; - html += "
"; - } - - // cardFooter - html += "
"; - - // cardBox - html += "
"; - - // card - html += "
"; - - return html; - } - - var lastDataLoad = 0; - - function loadData(page, jobs) { - - if ((new Date().getTime() - lastDataLoad) < 60000) { - refreshData(page, jobs); - return; - } - - lastDataLoad = new Date().getTime(); - - var html = ''; - var lastTargetName = ''; - - var cardBoxCssClass = 'cardBox visualCardBox'; - - var syncJobPage = 'syncjob.html'; - var showTargetName = true; - - if ($(page).hasClass('mySyncPage')) { - syncJobPage = 'mysyncjob.html'; - - showTargetName = !hasLocalSync(); - } - - var hasOpenSection = false; - - for (var i = 0, length = jobs.length; i < length; i++) { - - var job = jobs[i]; - if (showTargetName) { - var targetName = job.TargetName || 'Unknown'; - - if (targetName != lastTargetName) { - - if (lastTargetName) { - html += ''; - html += '
'; - html += '
'; - html += '
'; - hasOpenSection = false; - } - - lastTargetName = targetName; - - html += '
'; - - html += '
' + targetName + '
'; - - html += '
'; - html += '
'; - hasOpenSection = true; - } - } - - html += getSyncJobHtml(page, job, cardBoxCssClass, syncJobPage); - } - - if (hasOpenSection) { - html += '
'; - } - - var elem = $('.syncActivity', page).html(html).lazyChildren(); - - $('.btnJobMenu', elem).on('click', function () { - showJobMenu(page, this); - }); - - if (!jobs.length) { - - elem.html('
' + Globalize.translate('MessageNoSyncJobsFound') + '
'); - } - } - - $.fn.lazyChildren = function () { - - for (var i = 0, length = this.length; i < length; i++) { - ImageLoader.lazyChildren(this[i]); - } - return this; - }; - - function refreshData(page, jobs) { - - for (var i = 0, length = jobs.length; i < length; i++) { - - var job = jobs[i]; - refreshJob(page, job); - } - } - - function refreshJob(page, job) { - - var card = page.querySelector('.card[data-id=\'' + job.Id + '\']'); - - if (!card) { - return; - } - - var banner = card.querySelector('.syncStatusBanner'); - - if (banner.getAttribute('data-status') == job.Status) { - var elem = document.createElement('div'); - elem.innerHTML = getSyncStatusBanner(job); - elem = elem.querySelector('.syncStatusBanner'); - elem.parentNode.removeChild(elem); - - banner.parentNode.replaceChild(elem, banner); - } - - var progress = job.Progress || 0; - var cardFooter = card.querySelector('.cardFooter'); - - if (progress == 0 || progress >= 100) { - cardFooter.classList.add('hide'); - } - else { - cardFooter.classList.remove('hide'); - cardFooter.querySelector('.itemProgressBar').value = progress; - } - } - - function showJobMenu(page, elem) { - - var card = $(elem).parents('.card'); - var jobId = card.attr('data-id'); - var status = card.attr('data-status'); - - var menuItems = []; - - if (status == 'Cancelled') { - menuItems.push({ - name: Globalize.translate('ButtonDelete'), - id: 'delete' - }); - } else { - menuItems.push({ - name: Globalize.translate('ButtonCancelSyncJob'), - id: 'cancel' - }); - } - - require(['actionsheet'], function (actionsheet) { - - actionsheet.show({ - items: menuItems, - positionTo: elem, - callback: function (id) { - - switch (id) { - - case 'delete': - cancelJob(page, jobId); - break; - case 'cancel': - cancelJob(page, jobId); - break; - default: - break; - } - } - }); - - }); - } - - function hasLocalSync() { - return Dashboard.capabilities().SupportsSync; - } - - function reloadData(page) { - - lastDataLoad = 0; - Dashboard.showLoadingMsg(); - - var options = {}; - - Dashboard.getCurrentUser().then(function (user) { - - if ($(page).hasClass('mySyncPage')) { - options.UserId = Dashboard.getCurrentUserId(); - - if (hasLocalSync()) { - options.TargetId = ApiClient.deviceId(); - } - } - - ApiClient.getJSON(ApiClient.getUrl('Sync/Jobs', options)).then(function (response) { - - loadData(page, response.Items); - Dashboard.hideLoadingMsg(); - - }); - }); - } - - function onWebSocketMessage(e, msg) { - - var page = $($.mobile.activePage)[0]; - - if (msg.MessageType == "SyncJobs") { - - var data = msg.Data; - - if (hasLocalSync()) { - var targetId = ApiClient.deviceId(); - data = data.filter(function (j) { - return j.TargetId == targetId; - }); - } - loadData(page, data); - } - } - - function startListening(page) { - - var startParams = "0,1500"; - - if ($(page).hasClass('mySyncPage')) { - startParams += "," + Dashboard.getCurrentUserId(); - } - - if (ApiClient.isWebSocketOpen()) { - ApiClient.sendWebSocketMessage("SyncJobsStart", startParams); - } - - } - - function stopListening() { - - if (ApiClient.isWebSocketOpen()) { - ApiClient.sendWebSocketMessage("SyncJobsStop", ""); - } - - } +define(['loading', 'apphost', 'globalize', 'syncJobList', 'events', 'localsync', 'emby-button', 'paper-icon-button-light'], function (loading, appHost, globalize, syncJobList, events) { function getTabs() { return [ @@ -410,57 +20,49 @@ }]; } - $(document).on('pageinit', "#syncActivityPage", function () { + function initSupporterInfo(view, params) { - var page = this; + view.querySelector('.supporterPromotion .mainText').innerHTML = globalize.translate('HeaderSyncRequiresSupporterMembership'); - $('.btnSyncSupporter', page).on('click', function () { + var apiClient = ApiClient; + apiClient.getPluginSecurityInfo().then(function (regInfo) { - requirejs(["registrationservices"], function (registrationServices) { - registrationServices.validateFeature('sync'); - }); - }); - $('.supporterPromotion .mainText', page).html(Globalize.translate('HeaderSyncRequiresSupporterMembership')); - - }).on('pageshow', "#syncActivityPage", function () { - - if (this.id == 'syncActivityPage') { - LibraryMenu.setTabs('syncadmin', 0, getTabs); - } - var page = this; - - Dashboard.getPluginSecurityInfo().then(function (pluginSecurityInfo) { - - if (pluginSecurityInfo.IsMBSupporter) { - $('.supporterPromotionContainer', page).hide(); + if (regInfo.IsMBSupporter) { + view.querySelector('.supporterPromotionContainer').classList.add('hide'); } else { - $('.supporterPromotionContainer', page).show(); + view.querySelector('.supporterPromotionContainer').classList.remove('hide'); } + + }, function () { + + view.querySelector('.supporterPromotionContainer').classList.remove('hide'); + }); + } + + return function (view, params) { + + initSupporterInfo(view, params); + var mySyncJobList = new syncJobList({ + isLocalSync: params.mode === 'offline', + serverId: ApiClient.serverId(), + userId: params.mode === 'offline' ? null : ApiClient.getCurrentUserId(), + element: view.querySelector('.syncActivity') }); - reloadData(page); + events.on(mySyncJobList, 'jobedit', function (e, jobId, serverId) { - // on here - $('.btnSync', page).taskButton({ - mode: 'on', - progressElem: page.querySelector('.syncProgress'), - taskKey: 'SyncPrepare' + Dashboard.navigate('syncjob.html?id=' + jobId); }); - startListening(page); - Events.on(ApiClient, "websocketmessage", onWebSocketMessage); + view.addEventListener('viewshow', function () { - }).on('pagebeforehide', "#syncActivityPage", function () { - - var page = this; - - // off here - $('.btnSync', page).taskButton({ - mode: 'off' + LibraryMenu.setTabs('syncadmin', 0, getTabs); }); - stopListening(); - Events.off(ApiClient, "websocketmessage", onWebSocketMessage); - }); + view.addEventListener('viewdestroy', function () { + + mySyncJobList.destroy(); + }); + }; }); \ No newline at end of file diff --git a/dashboard-ui/syncactivity.html b/dashboard-ui/syncactivity.html index 5624f02c1b..aadb63fd2e 100644 --- a/dashboard-ui/syncactivity.html +++ b/dashboard-ui/syncactivity.html @@ -1,4 +1,4 @@ -
+