From d7c8377d71cbb85848e97af15e358bae69385de8 Mon Sep 17 00:00:00 2001 From: artiume Date: Sun, 25 Sep 2022 17:36:47 -0400 Subject: [PATCH 01/16] Add metadata lost warning to renaming libraries --- src/controllers/dashboard/library.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/dashboard/library.js b/src/controllers/dashboard/library.js index 8a43d7b690..fc5a80cbad 100644 --- a/src/controllers/dashboard/library.js +++ b/src/controllers/dashboard/library.js @@ -76,7 +76,8 @@ import cardBuilder from '../../components/cardbuilder/cardBuilder'; function renameVirtualFolder(page, virtualFolder) { import('../../components/prompt/prompt').then(({default: prompt}) => { prompt({ - label: globalize.translate('LabelNewName'), + title: globalize.translate('LabelNewName'), + label: globalize.translate('MessageAreYouSureYouWishToRenameMediaFolder'), confirmText: globalize.translate('ButtonRename') }).then(function (newName) { if (newName && newName != virtualFolder.Name) { From 2a0ba0f9e262631aea93f64061a301447f9ffe5b Mon Sep 17 00:00:00 2001 From: artiume Date: Sun, 25 Sep 2022 17:37:57 -0400 Subject: [PATCH 02/16] add string --- src/strings/en-us.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/strings/en-us.json b/src/strings/en-us.json index aad75e49be..921890abde 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1036,6 +1036,7 @@ "MessageAlreadyInstalled": "This version is already installed.", "MessageAreYouSureDeleteSubtitles": "Are you sure you wish to delete this subtitle file?", "MessageAreYouSureYouWishToRemoveMediaFolder": "Are you sure you wish to remove this media folder?", + "MessageAreYouSureYouWishToRenameMediaFolder": "Are you sure you wish to rename this media folder? All metadata will be lost", "MessageBrowsePluginCatalog": "Browse our plugin catalog to view available plugins.", "MessageChangeRecordingPath": "Changing your recording folder will not migrate existing recordings from the old location to the new. You'll need to move them manually if desired.", "MessageConfirmAppExit": "Do you want to exit?", From 334dde82c93b505421ab51303a881f454ba97546 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Thu, 20 Oct 2022 12:03:10 -0400 Subject: [PATCH 03/16] Update library rename warning --- src/controllers/dashboard/library.js | 4 ++-- src/strings/en-us.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/dashboard/library.js b/src/controllers/dashboard/library.js index fc5a80cbad..b9907b66a4 100644 --- a/src/controllers/dashboard/library.js +++ b/src/controllers/dashboard/library.js @@ -76,8 +76,8 @@ import cardBuilder from '../../components/cardbuilder/cardBuilder'; function renameVirtualFolder(page, virtualFolder) { import('../../components/prompt/prompt').then(({default: prompt}) => { prompt({ - title: globalize.translate('LabelNewName'), - label: globalize.translate('MessageAreYouSureYouWishToRenameMediaFolder'), + label: globalize.translate('LabelNewName'), + description: globalize.translate('MessageRenameMediaFolder'), confirmText: globalize.translate('ButtonRename') }).then(function (newName) { if (newName && newName != virtualFolder.Name) { diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 921890abde..11c19a95d8 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1036,7 +1036,6 @@ "MessageAlreadyInstalled": "This version is already installed.", "MessageAreYouSureDeleteSubtitles": "Are you sure you wish to delete this subtitle file?", "MessageAreYouSureYouWishToRemoveMediaFolder": "Are you sure you wish to remove this media folder?", - "MessageAreYouSureYouWishToRenameMediaFolder": "Are you sure you wish to rename this media folder? All metadata will be lost", "MessageBrowsePluginCatalog": "Browse our plugin catalog to view available plugins.", "MessageChangeRecordingPath": "Changing your recording folder will not migrate existing recordings from the old location to the new. You'll need to move them manually if desired.", "MessageConfirmAppExit": "Do you want to exit?", @@ -1086,6 +1085,7 @@ "MessagePluginInstalled": "The plugin has been successfully installed. The server will need to be restarted for changes to take effect.", "MessagePluginInstallError": "An error occurred while installing the plugin.", "MessageReenableUser": "See below to reenable", + "MessageRenameMediaFolder": "Renaming a media library will cause all metadata to be lost, proceed with caution.", "MessageSent": "Message sent.", "MessageSyncPlayCreateGroupDenied": "Permission required to create a group.", "MessageSyncPlayDisabled": "SyncPlay disabled.", From 9ef78533d0f8757550fa24f40df959bf89643759 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Thu, 20 Oct 2022 17:38:33 -0400 Subject: [PATCH 04/16] Update server and quick connect icons --- src/controllers/session/selectServer/index.js | 13 ++----------- src/controllers/user/menu/index.html | 4 ++-- src/scripts/libraryMenu.js | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/controllers/session/selectServer/index.js b/src/controllers/session/selectServer/index.js index 75a0b0789d..3db27beb1f 100644 --- a/src/controllers/session/selectServer/index.js +++ b/src/controllers/session/selectServer/index.js @@ -28,24 +28,15 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder'; const items = servers.map(function (server) { return { name: server.Name, - showIcon: true, - icon: 'cast', + icon: 'storage', cardType: '', id: server.Id, server: server }; }); let html = items.map(function (item) { - let cardImageContainer; - - if (item.showIcon) { - cardImageContainer = ''; - } else { - cardImageContainer = '
'; - } - // TODO move card creation code to Card component - + const cardImageContainer = ''; let cssClass = 'card overflowSquareCard loginSquareCard scalableCard overflowSquareCard-scalable'; if (layoutManager.tv) { diff --git a/src/controllers/user/menu/index.html b/src/controllers/user/menu/index.html index 2741f89282..86a6b5656a 100644 --- a/src/controllers/user/menu/index.html +++ b/src/controllers/user/menu/index.html @@ -14,7 +14,7 @@
- +
${QuickConnect}
@@ -98,7 +98,7 @@

${HeaderUser}

- +
${SelectServer}
diff --git a/src/scripts/libraryMenu.js b/src/scripts/libraryMenu.js index 6065d9a8d5..3afc730c33 100644 --- a/src/scripts/libraryMenu.js +++ b/src/scripts/libraryMenu.js @@ -325,7 +325,7 @@ import '../assets/css/flexstyles.scss'; html += ''; if (appHost.supports('multiserver')) { - html += `
${globalize.translate('SelectServer')}`; + html += `${globalize.translate('SelectServer')}`; } html += `${globalize.translate('Settings')}`; From 1a230999679bed5f290794ca960ebde9da6a80de Mon Sep 17 00:00:00 2001 From: darmiel <71837281+darmiel@users.noreply.github.com> Date: Fri, 21 Oct 2022 00:06:23 +0200 Subject: [PATCH 05/16] feat: search bar for installed plugins Adds a search bar to the `My Plugins` section, allowing you to filter the installed plugins --- .../dashboard/plugins/installed/index.html | 4 ++++ .../dashboard/plugins/installed/index.js | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/controllers/dashboard/plugins/installed/index.html b/src/controllers/dashboard/plugins/installed/index.html index d2b11592e9..2df85f2790 100644 --- a/src/controllers/dashboard/plugins/installed/index.html +++ b/src/controllers/dashboard/plugins/installed/index.html @@ -1,6 +1,10 @@
+
+ + +
diff --git a/src/controllers/dashboard/plugins/installed/index.js b/src/controllers/dashboard/plugins/installed/index.js index b8ddbbbf85..13d0132c94 100644 --- a/src/controllers/dashboard/plugins/installed/index.js +++ b/src/controllers/dashboard/plugins/installed/index.js @@ -112,7 +112,6 @@ function populateList(page, plugins, pluginConfigurationPages) { if (plugin1.Name > plugin2.Name) { return 1; } - return -1; }); @@ -136,6 +135,12 @@ function populateList(page, plugins, pluginConfigurationPages) { html += '
'; } + // add search box listener + const searchBar = page.querySelector('#txtSearchPlugins'); + if (searchBar) { + searchBar.addEventListener('input', () => onFilterType(page, searchBar)); + } + installedPluginsElement.innerHTML = html; loading.hide(); } @@ -239,6 +244,17 @@ function onInstalledPluginsClick(e) { } } +function onFilterType(page, searchBar) { + const filter = searchBar.value.toLowerCase(); + for (const card of page.querySelectorAll('.card')) { + if (filter && filter != '' && !card.textContent.toLowerCase().includes(filter)) { + card.style.display = 'none'; + } else { + card.style.display = 'unset'; + } + } +} + pageIdOn('pageshow', 'pluginsPage', function () { libraryMenu.setTabs('plugins', 0, getTabs); reloadList(this); From 3ef73904c1ddaddba42a19a6d133d23ddf294ee3 Mon Sep 17 00:00:00 2001 From: Daniel <71837281+darmiel@users.noreply.github.com> Date: Fri, 21 Oct 2022 09:05:11 +0200 Subject: [PATCH 06/16] feat: search bar for plugin catalogue Adds a search bar to the `Catalogue` section, allowing you to filter the available plugins --- .../dashboard/plugins/available/index.html | 4 +++ .../dashboard/plugins/available/index.js | 27 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/controllers/dashboard/plugins/available/index.html b/src/controllers/dashboard/plugins/available/index.html index 6c9b89c26d..b659b9ec97 100644 --- a/src/controllers/dashboard/plugins/available/index.html +++ b/src/controllers/dashboard/plugins/available/index.html @@ -1,6 +1,10 @@
+
+ + +
${MessageNoAvailablePlugins}
diff --git a/src/controllers/dashboard/plugins/available/index.js b/src/controllers/dashboard/plugins/available/index.js index b10518bc74..75055fe35f 100644 --- a/src/controllers/dashboard/plugins/available/index.js +++ b/src/controllers/dashboard/plugins/available/index.js @@ -86,10 +86,37 @@ function populateList(options) { options.noItemsElement.classList.remove('hide'); } + const searchBar = document.getElementById('txtSearchPlugins'); + if (searchBar) { + searchBar.addEventListener('input', () => onSearchBarType(searchBar)); + } + options.catalogElement.innerHTML = html; loading.hide(); } +function onSearchBarType(searchBar) { + const filter = searchBar.value.toLowerCase(); + for (const header of document.querySelectorAll("div .verticalSection")) { + // keep track of shown cards after each search + let shown = 0; + for (const card of header.querySelectorAll("div .card")) { + if (filter && filter != '' && !card.textContent.toLowerCase().includes(filter)) { + card.style.display = 'none'; + } else { + card.style.display = 'unset'; + shown += 1; + } + } + // hide title if no cards are shown + if (shown <= 0) { + header.style.display = 'none'; + } else { + header.style.display = 'unset'; + } + } +} + function getPluginHtml(plugin, options, installedPlugins) { let html = ''; let href = plugin.externalUrl ? plugin.externalUrl : '#/addplugin.html?name=' + encodeURIComponent(plugin.name) + '&guid=' + plugin.guid; From dba3b81c8119527b92ec9b0522d5d891fdfa3ef6 Mon Sep 17 00:00:00 2001 From: Daniel <71837281+darmiel@users.noreply.github.com> Date: Fri, 21 Oct 2022 09:19:31 +0200 Subject: [PATCH 07/16] refactor: eslint (single-quotes) --- src/controllers/dashboard/plugins/available/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/dashboard/plugins/available/index.js b/src/controllers/dashboard/plugins/available/index.js index 75055fe35f..bb63fcf6ef 100644 --- a/src/controllers/dashboard/plugins/available/index.js +++ b/src/controllers/dashboard/plugins/available/index.js @@ -97,10 +97,10 @@ function populateList(options) { function onSearchBarType(searchBar) { const filter = searchBar.value.toLowerCase(); - for (const header of document.querySelectorAll("div .verticalSection")) { + for (const header of document.querySelectorAll('div .verticalSection')) { // keep track of shown cards after each search let shown = 0; - for (const card of header.querySelectorAll("div .card")) { + for (const card of header.querySelectorAll('div .card')) { if (filter && filter != '' && !card.textContent.toLowerCase().includes(filter)) { card.style.display = 'none'; } else { From 26b183b4f58015716dd679b24aeb08c8d7ca2407 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Mon, 24 Oct 2022 14:04:31 -0400 Subject: [PATCH 08/16] Update quick connect icon --- src/controllers/user/menu/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/user/menu/index.html b/src/controllers/user/menu/index.html index 86a6b5656a..1c83bd9d68 100644 --- a/src/controllers/user/menu/index.html +++ b/src/controllers/user/menu/index.html @@ -14,7 +14,7 @@
- +
${QuickConnect}
From 820fbb07e32e468c79b9c6c7d8cc6a352d9a48e4 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Tue, 25 Oct 2022 10:01:41 +0300 Subject: [PATCH 09/16] fix build Windows --- webpack.common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.common.js b/webpack.common.js index d1b7a22946..e820878021 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -109,7 +109,7 @@ const config = { if (packageName.startsWith('@')) { const parts = module.context .substring(module.context.lastIndexOf(packageName)) - .split('/'); + .split(/[\\/]/); return `node_modules.${parts[0]}.${parts[1]}`; } From f31cbf116a84643c5b3d4aec10053df3055e9118 Mon Sep 17 00:00:00 2001 From: Andrii Date: Tue, 25 Oct 2022 12:37:30 +0000 Subject: [PATCH 10/16] Translated using Weblate (Ukrainian) Translation: Jellyfin/Jellyfin Web Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-web/uk/ --- src/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strings/uk.json b/src/strings/uk.json index 25ced73697..572609eb10 100644 --- a/src/strings/uk.json +++ b/src/strings/uk.json @@ -582,7 +582,7 @@ "Image": "Зображення", "Identify": "Ідентифікувати", "Horizontal": "Горизонтально", - "Home": "Домівка", + "Home": "Головна", "HideWatchedContentFromLatestMedia": "Приховати переглянуте з останніх медіа", "Hide": "Приховати", "Help": "Допомога", From a6a675e13cedea143ffb175a02803a9ed43de832 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Tue, 25 Oct 2022 12:18:26 -0400 Subject: [PATCH 11/16] Fix pointer events not propogating to dashboard pages --- src/assets/css/librarybrowser.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index d9c2b9118a..d5020a1006 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -305,10 +305,16 @@ right: 0; bottom: 0; left: 0; + pointer-events: none; [dir="rtl"] & { transition: right ease-in-out 0.3s, padding ease-in-out 0.3s; } + + > .page { + // Fix pointer events being swallowed by the react root when a dashboard page is not rendered by react + pointer-events: all; + } } .centerMessage { From 26925d9bf6c678732a10b5dd54bdab32cff5adf1 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Tue, 25 Oct 2022 14:02:14 -0400 Subject: [PATCH 12/16] Move castSenderApi to plugin dir --- src/{components => plugins/chromecastPlayer}/castSenderApi.js | 0 src/plugins/chromecastPlayer/plugin.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/{components => plugins/chromecastPlayer}/castSenderApi.js (100%) diff --git a/src/components/castSenderApi.js b/src/plugins/chromecastPlayer/castSenderApi.js similarity index 100% rename from src/components/castSenderApi.js rename to src/plugins/chromecastPlayer/castSenderApi.js diff --git a/src/plugins/chromecastPlayer/plugin.js b/src/plugins/chromecastPlayer/plugin.js index ca362c2c80..9044cd3e30 100644 --- a/src/plugins/chromecastPlayer/plugin.js +++ b/src/plugins/chromecastPlayer/plugin.js @@ -2,7 +2,7 @@ import appSettings from '../../scripts/settings/appSettings'; import * as userSettings from '../../scripts/settings/userSettings'; import { playbackManager } from '../../components/playback/playbackmanager'; import globalize from '../../scripts/globalize'; -import castSenderApiLoader from '../../components/castSenderApi'; +import castSenderApiLoader from './castSenderApi'; import ServerConnections from '../../components/ServerConnections'; import alert from '../../components/alert'; import Events from '../../utils/events.ts'; From b384c5a1af6fc6a61172dfb82ca4f363f1931fb5 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 25 Oct 2022 21:35:03 +0200 Subject: [PATCH 13/16] fix: implemented PR feedback --- src/controllers/dashboard/plugins/available/index.html | 3 +-- src/controllers/dashboard/plugins/available/index.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/controllers/dashboard/plugins/available/index.html b/src/controllers/dashboard/plugins/available/index.html index b659b9ec97..68567db744 100644 --- a/src/controllers/dashboard/plugins/available/index.html +++ b/src/controllers/dashboard/plugins/available/index.html @@ -2,8 +2,7 @@
- - +
${MessageNoAvailablePlugins}
diff --git a/src/controllers/dashboard/plugins/available/index.js b/src/controllers/dashboard/plugins/available/index.js index bb63fcf6ef..095bbb8659 100644 --- a/src/controllers/dashboard/plugins/available/index.js +++ b/src/controllers/dashboard/plugins/available/index.js @@ -105,7 +105,7 @@ function onSearchBarType(searchBar) { card.style.display = 'none'; } else { card.style.display = 'unset'; - shown += 1; + shown++; } } // hide title if no cards are shown From 1602abb3b47925da70e0d4f3e515b4c8ae53c757 Mon Sep 17 00:00:00 2001 From: DJSweder Date: Tue, 25 Oct 2022 18:29:44 +0000 Subject: [PATCH 14/16] Translated using Weblate (Czech) Translation: Jellyfin/Jellyfin Web Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-web/cs/ --- src/strings/cs.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/strings/cs.json b/src/strings/cs.json index 0eb7979241..1b0a122ca6 100644 --- a/src/strings/cs.json +++ b/src/strings/cs.json @@ -1679,5 +1679,6 @@ "IgnoreDtsHelp": "Vypnutím se mohou vyřešit některé problémy, např. chybějící zvuk u kanálů s oddělenými zvukovými a video stopami.", "IgnoreDts": "Ignorovat DTS (časové razítko dekódování)", "OptionDateEpisodeAdded": "Datum přidání epizody", - "OptionDateShowAdded": "Datum přidání pořadu" + "OptionDateShowAdded": "Datum přidání pořadu", + "MessageRenameMediaFolder": "Přejmenování knihovny médií způsobí ztrátu všech metadat, postupujte proto s opatrností." } From 55982f56b844abd4cef570dc6149e165aab4e4ee Mon Sep 17 00:00:00 2001 From: darmiel <71837281+darmiel@users.noreply.github.com> Date: Tue, 25 Oct 2022 22:32:17 +0200 Subject: [PATCH 15/16] fix: do not create label manually --- src/controllers/dashboard/plugins/installed/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/controllers/dashboard/plugins/installed/index.html b/src/controllers/dashboard/plugins/installed/index.html index 2df85f2790..4aedb8a9de 100644 --- a/src/controllers/dashboard/plugins/installed/index.html +++ b/src/controllers/dashboard/plugins/installed/index.html @@ -2,8 +2,7 @@
- - +
From e505b02c50bb90550602af361ccd1ec6c6ba7e9a Mon Sep 17 00:00:00 2001 From: blob03 Date: Tue, 25 Oct 2022 20:26:40 +0000 Subject: [PATCH 16/16] Translated using Weblate (French) Translation: Jellyfin/Jellyfin Web Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-web/fr/ --- src/strings/fr.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/strings/fr.json b/src/strings/fr.json index 41fdac284c..7503627e46 100644 --- a/src/strings/fr.json +++ b/src/strings/fr.json @@ -1679,5 +1679,6 @@ "IgnoreDtsHelp": "La désactivation de cette option peut résoudre certains problèmes, par ex. audio manquant sur les canaux avec des flux audio et vidéo séparés.", "OptionDateShowAdded": "Date d'ajout de la série", "OptionDateEpisodeAdded": "Date d'ajout de l'épisode", - "IgnoreDts": "Ignorer DTS (horodatage de décodage)" + "IgnoreDts": "Ignorer DTS (horodatage de décodage)", + "MessageRenameMediaFolder": "Renommer une médiathèque entraînera la perte de toutes les métadonnées, procédez avec prudence." }