mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-10-26 16:45:18 +00:00
Backport pull request #8570 from jellyfin-web/release-12.z
Hide playlist move options from users without edit access
Original-merge: 88de8d5a9a
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
1 parent
e474957935
commit
40afc1b552
1 file changed
+15
-14
@@ -306,28 +306,29 @@ export async function getCommands(options) {
|
||||
});
|
||||
}
|
||||
|
||||
// Only show playlist edit actions if the user can modify the playlist
|
||||
if (item.PlaylistItemId && options.playlistId && options.canEditPlaylist) {
|
||||
commands.push({
|
||||
name: globalize.translate('RemoveFromPlaylist'),
|
||||
id: 'removefromplaylist',
|
||||
icon: 'playlist_remove'
|
||||
});
|
||||
}
|
||||
|
||||
if (item.PlaylistItemId && options.playlistId && item.PlaylistIndex > 0) {
|
||||
commands.push({
|
||||
name: globalize.translate('MoveToTop'),
|
||||
id: 'movetotop',
|
||||
icon: 'vertical_align_top'
|
||||
});
|
||||
}
|
||||
if (item.PlaylistIndex > 0) {
|
||||
commands.push({
|
||||
name: globalize.translate('MoveToTop'),
|
||||
id: 'movetotop',
|
||||
icon: 'vertical_align_top'
|
||||
});
|
||||
}
|
||||
|
||||
if (item.PlaylistItemId && options.playlistId && item.PlaylistIndex < (item.PlaylistItemCount - 1)) {
|
||||
commands.push({
|
||||
name: globalize.translate('MoveToBottom'),
|
||||
id: 'movetobottom',
|
||||
icon: 'vertical_align_bottom'
|
||||
});
|
||||
if (item.PlaylistIndex < (item.PlaylistItemCount - 1)) {
|
||||
commands.push({
|
||||
name: globalize.translate('MoveToBottom'),
|
||||
id: 'movetobottom',
|
||||
icon: 'vertical_align_bottom'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (options.collectionId) {
|
||||
|
||||
Reference in new issue
Block a user