Move: download button from dialog to file page
This commit is contained in:
@@ -9,20 +9,14 @@ function FileDialog(props) {
|
||||
|
||||
let navigate = useNavigate();
|
||||
|
||||
const downloadURL = "/api/v1/get_file_direct?id=" + props.file.id;
|
||||
|
||||
return (
|
||||
<dialog open={props.showStatus}>
|
||||
<p>{props.file.filename}</p>
|
||||
<p>
|
||||
Download 使用浏览器下载原文件
|
||||
<br />
|
||||
Play 调用网页播放器播放
|
||||
Play: play using browser player.
|
||||
<br />
|
||||
Info for more actions.
|
||||
</p>
|
||||
<a href={downloadURL} download>
|
||||
<button>Download</button>
|
||||
</a>
|
||||
<button
|
||||
onClick={() => {
|
||||
props.setPlayingFile(props.file);
|
||||
|
||||
@@ -159,11 +159,15 @@ function FileInfo(props) {
|
||||
getTagsOnFile();
|
||||
}, []);
|
||||
|
||||
const downloadURL = "/api/v1/get_file_direct?id=" + file.id;
|
||||
|
||||
return (
|
||||
<div className="page">
|
||||
<h3>File Details</h3>
|
||||
<div>
|
||||
<button>Download</button>
|
||||
<a href={downloadURL} download>
|
||||
<button>Download</button>
|
||||
</a>
|
||||
<button
|
||||
onClick={() => {
|
||||
props.setPlayingFile(file);
|
||||
|
||||
Reference in New Issue
Block a user