web show folderPath in folder page

This commit is contained in:
2022-11-03 01:21:58 +08:00
parent 857a5e9dd9
commit 2f2254371b

View File

@@ -13,6 +13,7 @@ function FilesInFolder(props) {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const offset = parseInt(query.get("o")) || 0; const offset = parseInt(query.get("o")) || 0;
const [newFoldername, setNewFoldername] = useState(""); const [newFoldername, setNewFoldername] = useState("");
const [folderPath, setFolderPath] = useState("");
const limit = 10; const limit = 10;
function refresh() { function refresh() {
@@ -32,6 +33,7 @@ function FilesInFolder(props) {
alert(data.error); alert(data.error);
} else { } else {
setFiles(data.files); setFiles(data.files);
setFolderPath(data.folder);
if (data.files.length > 0) { if (data.files.length > 0) {
setNewFoldername(data.files[0].foldername); setNewFoldername(data.files[0].foldername);
} }
@@ -119,6 +121,7 @@ function FilesInFolder(props) {
<button onClick={nextPage}>{Tr("Next page")}</button> <button onClick={nextPage}>{Tr("Next page")}</button>
</div> </div>
<FilesTable setPlayingFile={props.setPlayingFile} files={files} /> <FilesTable setPlayingFile={props.setPlayingFile} files={files} />
<span>{folderPath}</span>
<div> <div>
<input <input
type="text" type="text"