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,
|
event: e,
|
||||||
props: {
|
props: {
|
||||||
id,
|
id,
|
||||||
|
trackid: x.trackid,
|
||||||
title: x.title,
|
title: x.title,
|
||||||
artist: x.artist,
|
artist: x.artist,
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,11 +10,12 @@ import {
|
||||||
FaTrash,
|
FaTrash,
|
||||||
FaUpload,
|
FaUpload,
|
||||||
FaCircleNotch,
|
FaCircleNotch,
|
||||||
|
FaPencilAlt,
|
||||||
} from "react-icons/fa";
|
} from "react-icons/fa";
|
||||||
import { VUMeter } from "../optionsMenu/helpers/VUMeter";
|
import { VUMeter } from "../optionsMenu/helpers/VUMeter";
|
||||||
import Stopwatch from "react-stopwatch";
|
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 appLogo from "../assets/images/webstudio.svg";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -451,6 +452,21 @@ const Showplanner: React.FC<{ timeslotId: number }> = function({ timeslotId }) {
|
||||||
>
|
>
|
||||||
<FaCircleNotch /> Mark Unplayed
|
<FaCircleNotch /> Mark Unplayed
|
||||||
</CtxMenuItem>
|
</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>
|
</Menu>
|
||||||
<OptionsMenu />
|
<OptionsMenu />
|
||||||
<WelcomeModal
|
<WelcomeModal
|
||||||
|
|
Loading…
Reference in a new issue