Add right click for editing tracks.
This commit is contained in:
parent
a25a0d45c0
commit
62f55ec241
2 changed files with 18 additions and 1 deletions
|
@ -52,6 +52,7 @@ export const Item = memo(function Item({
|
|||
event: e,
|
||||
props: {
|
||||
id,
|
||||
trackid: x.trackid,
|
||||
title: x.title,
|
||||
artist: x.artist,
|
||||
},
|
||||
|
|
|
@ -10,11 +10,12 @@ import {
|
|||
FaTrash,
|
||||
FaUpload,
|
||||
FaCircleNotch,
|
||||
FaPencilAlt,
|
||||
} from "react-icons/fa";
|
||||
import { VUMeter } from "../optionsMenu/helpers/VUMeter";
|
||||
import Stopwatch from "react-stopwatch";
|
||||
|
||||
import { TimeslotItem } from "../api";
|
||||
import { MYRADIO_NON_API_BASE, TimeslotItem } from "../api";
|
||||
import appLogo from "../assets/images/webstudio.svg";
|
||||
|
||||
import {
|
||||
|
@ -451,6 +452,21 @@ const Showplanner: React.FC<{ timeslotId: number }> = function({ timeslotId }) {
|
|||
>
|
||||
<FaCircleNotch /> Mark Unplayed
|
||||
</CtxMenuItem>
|
||||
<CtxMenuItem
|
||||
onClick={(args) => {
|
||||
if ("trackid" in (args.props as any)) {
|
||||
window.open(
|
||||
MYRADIO_NON_API_BASE +
|
||||
"/Library/editTrack?trackid=" +
|
||||
(args.props as any).trackid
|
||||
);
|
||||
} else {
|
||||
alert("Sorry, editing tracks is only possible right now.");
|
||||
}
|
||||
}}
|
||||
>
|
||||
<FaPencilAlt /> Edit Item
|
||||
</CtxMenuItem>
|
||||
</Menu>
|
||||
<OptionsMenu />
|
||||
<WelcomeModal
|
||||
|
|
Loading…
Reference in a new issue