Don't allow right click on library channel.
This commit is contained in:
parent
4b75b5e72b
commit
820813e024
1 changed files with 2 additions and 0 deletions
|
@ -8,6 +8,7 @@ import * as MixerState from "../mixer/state";
|
||||||
import { Draggable } from "react-beautiful-dnd";
|
import { Draggable } from "react-beautiful-dnd";
|
||||||
import { contextMenu } from "react-contexify";
|
import { contextMenu } from "react-contexify";
|
||||||
import "./item.scss";
|
import "./item.scss";
|
||||||
|
import { PLAYER_ID_PREVIEW } from "../mixer/audio";
|
||||||
|
|
||||||
export const TS_ITEM_MENU_ID = "SongMenu";
|
export const TS_ITEM_MENU_ID = "SongMenu";
|
||||||
export const TS_ITEM_AUX_ID = "AuxMenu";
|
export const TS_ITEM_AUX_ID = "AuxMenu";
|
||||||
|
@ -47,6 +48,7 @@ export const Item = memo(function Item({
|
||||||
|
|
||||||
function openContextMenu(e: React.MouseEvent<HTMLDivElement, MouseEvent>) {
|
function openContextMenu(e: React.MouseEvent<HTMLDivElement, MouseEvent>) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if (column === PLAYER_ID_PREVIEW) return; // Don't let people right click in the library.
|
||||||
if (isTrack(x)) {
|
if (isTrack(x)) {
|
||||||
contextMenu.show({
|
contextMenu.show({
|
||||||
id: TS_ITEM_MENU_ID,
|
id: TS_ITEM_MENU_ID,
|
||||||
|
|
Loading…
Reference in a new issue