new changes
This commit is contained in:
@@ -58,7 +58,7 @@ export function FilesPage() {
|
||||
|
||||
const handleBack = () => {
|
||||
const parts = path.replace(/\/$/, '').split('/').filter(Boolean)
|
||||
if (parts.length <= 1) return
|
||||
if (parts.length === 0) return
|
||||
parts.pop()
|
||||
const newPath = parts.length === 0 ? '/' : '/' + parts.join('/')
|
||||
loadDir(newPath)
|
||||
@@ -147,8 +147,8 @@ export function FilesPage() {
|
||||
.catch((err) => setError(err.message))
|
||||
}
|
||||
|
||||
const breadcrumbs = path.split('/').filter(Boolean)
|
||||
const canGoBack = breadcrumbs.length > 0
|
||||
const pathSegments = path.replace(/\/$/, '').split('/').filter(Boolean)
|
||||
const canGoBack = pathSegments.length > 0
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -172,7 +172,7 @@ export function FilesPage() {
|
||||
)}
|
||||
Upload
|
||||
</AdminButton>
|
||||
<code className="small bg-body-secondary px-2 py-1 rounded ms-auto text-break">Path: {path}</code>
|
||||
<code className="small bg-body-secondary px-2 py-1 rounded ms-auto text-break">Path: {path || '/'}</code>
|
||||
</div>
|
||||
|
||||
<Modal show={showMkdir} onHide={() => { setShowMkdir(false); setMkdirName('') }} centered>
|
||||
|
||||
Reference in New Issue
Block a user