mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-20 07:13:45 +02:00
Support right click to use file context menu
This commit is contained in:
@@ -37,7 +37,13 @@ const FileObjectRow = ({ file }: { file: FileObject }) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<Row key={file.name}>
|
||||
<Row
|
||||
key={file.name}
|
||||
onContextMenu={e => {
|
||||
e.preventDefault();
|
||||
window.dispatchEvent(new CustomEvent(`pterodactyl:files:ctx:${file.uuid}`, { detail: e.clientX }));
|
||||
}}
|
||||
>
|
||||
<NavLink
|
||||
to={`${match.url}/${file.isFile ? 'edit/' : ''}#${cleanDirectoryPath(`${directory}/${file.name}`)}`}
|
||||
css={tw`flex flex-1 text-neutral-300 no-underline p-3`}
|
||||
|
||||
Reference in New Issue
Block a user