From 7d561152a1df8bc124c94f725bb8d96b35410d15 Mon Sep 17 00:00:00 2001 From: engine Date: Wed, 20 Nov 2024 11:43:29 +0100 Subject: [PATCH 1/4] add detail page link in context menu --- src/components/itemContextMenu.js | 13 +++++++++++++ src/strings/de.json | 1 + src/strings/en-gb.json | 1 + src/strings/en-us.json | 1 + 4 files changed, 16 insertions(+) diff --git a/src/components/itemContextMenu.js b/src/components/itemContextMenu.js index 02f7138af42..7ef3e082c94 100644 --- a/src/components/itemContextMenu.js +++ b/src/components/itemContextMenu.js @@ -294,6 +294,15 @@ export async function getCommands(options) { }); } + if (canPlay) { + commands.push({ + name: globalize.translate('ShowDetails'), + id: 'navigatetodetailpage', + icon: 'remove_red_eye' + }); + } + + if (item.PlaylistItemId && options.playlistId && options.canEditPlaylist) { commands.push({ name: globalize.translate('RemoveFromPlaylist'), @@ -631,6 +640,10 @@ function executeCommand(item, id, options) { case 'cancelseriestimer': deleteSeriesTimer(apiClient, item, resolve, id); break; + case 'navigatetodetailpage': + appRouter.showItem(item, item.ServerId); + getResolveFunction(resolve, id)(); + break; default: reject(); break; diff --git a/src/strings/de.json b/src/strings/de.json index 0acdd868aa7..0435bb7e536 100644 --- a/src/strings/de.json +++ b/src/strings/de.json @@ -991,6 +991,7 @@ "SettingsWarning": "Das Verändern dieser Werte kann Instabilität und Verbindungsprobleme hervorrufen. Wenn Probleme auftreten sollten, empfehlen wir, diese Einstellungen auf die Standardwerte zurückzustellen.", "Share": "Teilen", "ShowAdvancedSettings": "Erweiterte Einstellungen anzeigen", + "ShowDetails": "Details anzeigen", "ShowIndicatorsFor": "Indikatoren anzeigen für", "ShowTitle": "Titel anzeigen", "ShowYear": "Jahr anzeigen", diff --git a/src/strings/en-gb.json b/src/strings/en-gb.json index db9ee47aa50..599c42636e5 100644 --- a/src/strings/en-gb.json +++ b/src/strings/en-gb.json @@ -432,6 +432,7 @@ "ShowYear": "Show the year", "ShowIndicatorsFor": "Show indicators for", "ShowAdvancedSettings": "Show advanced settings", + "ShowDetails": "Show details", "Share": "Share", "SettingsWarning": "Changing these values may cause instability or connectivity failures. If you experience any problems, we recommend changing them back to default.", "SettingsSaved": "Settings saved.", diff --git a/src/strings/en-us.json b/src/strings/en-us.json index e6a73a0d606..96330317162 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1486,6 +1486,7 @@ "SettingsWarning": "Changing these values may cause instability or connectivity failures. If you experience any problems, we recommend changing them back to default.", "Share": "Share", "ShowAdvancedSettings": "Show advanced settings", + "ShowDetails": "Show details", "ShowIndicatorsFor": "Show indicators for", "ShowLess": "Show less", "ShowMore": "Show more", From 6af55f122e7a289ebac71efbe9361cdf2ce4670f Mon Sep 17 00:00:00 2001 From: engine Date: Wed, 20 Nov 2024 11:55:07 +0100 Subject: [PATCH 2/4] add detail page link in context menu --- src/components/itemContextMenu.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/itemContextMenu.js b/src/components/itemContextMenu.js index 7ef3e082c94..518735e7487 100644 --- a/src/components/itemContextMenu.js +++ b/src/components/itemContextMenu.js @@ -302,7 +302,6 @@ export async function getCommands(options) { }); } - if (item.PlaylistItemId && options.playlistId && options.canEditPlaylist) { commands.push({ name: globalize.translate('RemoveFromPlaylist'), From eb468fe78f2664b9fa81ad9463d7083076088c62 Mon Sep 17 00:00:00 2001 From: engine Date: Thu, 21 Nov 2024 01:25:37 +0100 Subject: [PATCH 3/4] rename id & remove translations --- src/components/itemContextMenu.js | 4 ++-- src/strings/de.json | 1 - src/strings/en-gb.json | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/itemContextMenu.js b/src/components/itemContextMenu.js index 518735e7487..7ada9183fb6 100644 --- a/src/components/itemContextMenu.js +++ b/src/components/itemContextMenu.js @@ -297,7 +297,7 @@ export async function getCommands(options) { if (canPlay) { commands.push({ name: globalize.translate('ShowDetails'), - id: 'navigatetodetailpage', + id: 'itemdetails', icon: 'remove_red_eye' }); } @@ -639,7 +639,7 @@ function executeCommand(item, id, options) { case 'cancelseriestimer': deleteSeriesTimer(apiClient, item, resolve, id); break; - case 'navigatetodetailpage': + case 'itemdetails': appRouter.showItem(item, item.ServerId); getResolveFunction(resolve, id)(); break; diff --git a/src/strings/de.json b/src/strings/de.json index 0435bb7e536..0acdd868aa7 100644 --- a/src/strings/de.json +++ b/src/strings/de.json @@ -991,7 +991,6 @@ "SettingsWarning": "Das Verändern dieser Werte kann Instabilität und Verbindungsprobleme hervorrufen. Wenn Probleme auftreten sollten, empfehlen wir, diese Einstellungen auf die Standardwerte zurückzustellen.", "Share": "Teilen", "ShowAdvancedSettings": "Erweiterte Einstellungen anzeigen", - "ShowDetails": "Details anzeigen", "ShowIndicatorsFor": "Indikatoren anzeigen für", "ShowTitle": "Titel anzeigen", "ShowYear": "Jahr anzeigen", diff --git a/src/strings/en-gb.json b/src/strings/en-gb.json index 599c42636e5..db9ee47aa50 100644 --- a/src/strings/en-gb.json +++ b/src/strings/en-gb.json @@ -432,7 +432,6 @@ "ShowYear": "Show the year", "ShowIndicatorsFor": "Show indicators for", "ShowAdvancedSettings": "Show advanced settings", - "ShowDetails": "Show details", "Share": "Share", "SettingsWarning": "Changing these values may cause instability or connectivity failures. If you experience any problems, we recommend changing them back to default.", "SettingsSaved": "Settings saved.", From 2616432bdd07785b5bfb24fb0f56b8410f12e15b Mon Sep 17 00:00:00 2001 From: engine Date: Thu, 21 Nov 2024 02:32:25 +0100 Subject: [PATCH 4/4] hide detail link when already on the detail page @see https://github.com/jellyfin/jellyfin-web/pull/6332#issuecomment-2489862335 --- src/components/itemContextMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/itemContextMenu.js b/src/components/itemContextMenu.js index 7ada9183fb6..70b68c9460b 100644 --- a/src/components/itemContextMenu.js +++ b/src/components/itemContextMenu.js @@ -294,7 +294,7 @@ export async function getCommands(options) { }); } - if (canPlay) { + if (canPlay && document.location.hash !== appRouter.getRouteUrl(item, options)) { commands.push({ name: globalize.translate('ShowDetails'), id: 'itemdetails',