Add constants for app features

This commit is contained in:
Bill Thornton
2025-04-30 17:41:36 -04:00
parent bb810a183a
commit fdcf1b06c3
34 changed files with 211 additions and 129 deletions
+5 -4
View File
@@ -2,6 +2,7 @@
* Image viewer component
* @module components/slideshow/slideshow
*/
import { AppFeature } from 'constants/appFeature';
import dialogHelper from '../dialogHelper/dialogHelper';
import { ServerConnections } from 'lib/jellyfin-apiclient';
import inputManager from '../../scripts/inputManager';
@@ -172,10 +173,10 @@ export default function (options) {
if (actionButtonsOnTop) {
html += getIcon('play_arrow', 'btnSlideshowPause slideshowButton', true);
if (appHost.supports('filedownload') && slideshowOptions.user?.Policy.EnableContentDownloading) {
if (appHost.supports(AppFeature.FileDownload) && slideshowOptions.user?.Policy.EnableContentDownloading) {
html += getIcon('file_download', 'btnDownload slideshowButton', true);
}
if (appHost.supports('sharing')) {
if (appHost.supports(AppFeature.Sharing)) {
html += getIcon('share', 'btnShare slideshowButton', true);
}
if (screenfull.isEnabled) {
@@ -190,10 +191,10 @@ export default function (options) {
html += '<div class="slideshowBottomBar hide">';
html += getIcon('play_arrow', 'btnSlideshowPause slideshowButton', true, true);
if (appHost.supports('filedownload') && slideshowOptions?.user.Policy.EnableContentDownloading) {
if (appHost.supports(AppFeature.FileDownload) && slideshowOptions?.user.Policy.EnableContentDownloading) {
html += getIcon('file_download', 'btnDownload slideshowButton', true);
}
if (appHost.supports('sharing')) {
if (appHost.supports(AppFeature.Sharing)) {
html += getIcon('share', 'btnShare slideshowButton', true);
}
if (screenfull.isEnabled) {