mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add select option
This commit is contained in:
parent
4fe6bb5b42
commit
447b6f5582
2 changed files with 18 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
import browser from '../scripts/browser';
|
import browser from '../scripts/browser';
|
||||||
import { copy } from '../scripts/clipboard';
|
import { copy } from '../scripts/clipboard';
|
||||||
|
import dom from '../scripts/dom';
|
||||||
import globalize from '../scripts/globalize';
|
import globalize from '../scripts/globalize';
|
||||||
import actionsheet from './actionSheet/actionSheet';
|
import actionsheet from './actionSheet/actionSheet';
|
||||||
import { appHost } from './apphost';
|
import { appHost } from './apphost';
|
||||||
|
@ -115,6 +116,16 @@ export function getCommands(options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Multiselect is currrently only ran on long clicks of card components
|
||||||
|
// This disables Select on any context menu not originating from a card i.e songs
|
||||||
|
if (options.positionTo && (dom.parentWithClass(options.positionTo, 'card') !== null)) {
|
||||||
|
commands.push({
|
||||||
|
name: globalize.translate('Select'),
|
||||||
|
id: 'multiSelect',
|
||||||
|
icon: 'library_add_check'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if ((item.Type === 'Timer') && user.Policy.EnableLiveTvManagement && options.cancelTimer !== false) {
|
if ((item.Type === 'Timer') && user.Policy.EnableLiveTvManagement && options.cancelTimer !== false) {
|
||||||
commands.push({
|
commands.push({
|
||||||
name: globalize.translate('CancelRecording'),
|
name: globalize.translate('CancelRecording'),
|
||||||
|
@ -432,6 +443,12 @@ function executeCommand(item, id, options) {
|
||||||
itemMediaInfo.show(itemId, serverId).then(getResolveFunction(resolve, id), getResolveFunction(resolve, id));
|
itemMediaInfo.show(itemId, serverId).then(getResolveFunction(resolve, id), getResolveFunction(resolve, id));
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case 'multiSelect':
|
||||||
|
import('./multiSelect/multiSelect').then(({ startMultiSelect: startMultiSelect }) => {
|
||||||
|
const card = dom.parentWithClass(options.positionTo, 'card');
|
||||||
|
startMultiSelect(card);
|
||||||
|
});
|
||||||
|
break;
|
||||||
case 'refresh':
|
case 'refresh':
|
||||||
refresh(apiClient, item);
|
refresh(apiClient, item);
|
||||||
getResolveFunction(resolve, id)();
|
getResolveFunction(resolve, id)();
|
||||||
|
|
|
@ -1685,6 +1685,7 @@
|
||||||
"Interview": "Interview",
|
"Interview": "Interview",
|
||||||
"Scene": "Scene",
|
"Scene": "Scene",
|
||||||
"Sample": "Sample",
|
"Sample": "Sample",
|
||||||
|
"Select": "Select",
|
||||||
"ThemeSong": "Theme Song",
|
"ThemeSong": "Theme Song",
|
||||||
"ThemeVideo": "Theme Video",
|
"ThemeVideo": "Theme Video",
|
||||||
"EnableEnhancedNvdecDecoderHelp": "Experimental NVDEC implementation, do not enable this option unless you encounter decoding errors.",
|
"EnableEnhancedNvdecDecoderHelp": "Experimental NVDEC implementation, do not enable this option unless you encounter decoding errors.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue