Add context menu to queue items

This commit is contained in:
jeffvli 2023-02-08 11:46:39 -08:00
parent 17d5ef1f6b
commit ffb7f915c3
6 changed files with 118 additions and 24 deletions

View file

@ -1,7 +1,5 @@
import { RowNode } from '@ag-grid-community/core';
import type { AgGridReact as AgGridReactType } from '@ag-grid-community/react/lib/agGridReact';
import { GridOptions, RowNode } from '@ag-grid-community/core';
import { createUseExternalEvents } from '@mantine/utils';
import { MutableRefObject } from 'react';
import { LibraryItem } from '/@/renderer/api/types';
export type OpenContextMenuProps = {
@ -9,7 +7,7 @@ export type OpenContextMenuProps = {
data: any[];
dataNodes?: RowNode[];
menuItems: SetContextMenuItems;
tableRef?: MutableRefObject<AgGridReactType | null>;
tableApi?: GridOptions['api'];
type: LibraryItem;
xPos: number;
yPos: number;
@ -30,7 +28,11 @@ export type ContextMenuItemType =
| 'removeFromFavorites'
| 'setRating'
| 'deletePlaylist'
| 'createPlaylist';
| 'createPlaylist'
| 'moveToBottomOfQueue'
| 'moveToTopOfQueue'
| 'removeFromQueue'
| 'deselectAll';
export type SetContextMenuItems = {
children?: boolean;