[FEATURE] Quality of Life Improvements for Management (#7)
Co-authored-by: Dunemask <dunemask@gmail.com> Reviewed-on: https://gitea.dunemask.dev/elysium/minecluster/pulls/7
This commit is contained in:
parent
6eb4ed3e95
commit
23efaafe1d
18 changed files with 479 additions and 39 deletions
|
@ -105,7 +105,7 @@ export default function MineclusterFiles(props) {
|
|||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
formData.append("id", serverId);
|
||||
formData.append("path", [...dirStack, name].join("/"));
|
||||
formData.append("path", [...dirStack, file.name].join("/"));
|
||||
await fetch("/api/files/upload", {
|
||||
method: "POST",
|
||||
body: formData,
|
||||
|
@ -125,7 +125,8 @@ export default function MineclusterFiles(props) {
|
|||
function previewFile(file) {
|
||||
const { name } = file;
|
||||
previewServerItem(serverId, [...dirStack, name].join("/")).then(
|
||||
(fileData) => changePreview(name, fileData),
|
||||
(fileData) =>
|
||||
changePreview(name, fileData, [...dirStack, name].join("/")),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue