Move: download button from dialog to file page

This commit is contained in:
2021-12-16 13:27:11 +08:00
parent 80802f95f8
commit 14f3c1c8da
2 changed files with 7 additions and 9 deletions

View File

@@ -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);

View 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);