-
} label="Media Manager" onClick={() => setCurrentPage('file-manager')} />
+
} label="Media Manager" onClick={() => { setFileManagerInitialPath(undefined); setCurrentPage('file-manager'); }} />
} label="Print Manager" onClick={() => setCurrentPage('print-manager')} />
} label="Serial Console" onClick={() => setCurrentPage('serial-console')} />
} label="Short Codes" onClick={() => setCurrentPage('serial-console')} />
diff --git a/src/app/components/MediaManager.tsx b/src/app/components/MediaManager.tsx
index d39980a..7f8c00e 100644
--- a/src/app/components/MediaManager.tsx
+++ b/src/app/components/MediaManager.tsx
@@ -338,9 +338,9 @@ async function _getEntryBytes(entry: EntryInfo): Promise
{
const FM_PATH_KEY = 'fileManager.path';
-export default function MediaManager({ initialPath = '/', rootPath, title, config, setConfig, onBack, onNavigateToDevice }: MediaManagerProps) {
+export default function MediaManager({ initialPath, rootPath, title, config, setConfig, onBack, onNavigateToDevice }: MediaManagerProps) {
const pathKey = rootPath ? `fileManager.path:${rootPath}` : FM_PATH_KEY;
- const [path, setPath] = useState(() => normalizePath(localStorage.getItem(pathKey) || rootPath || initialPath));
+ const [path, setPath] = useState(() => normalizePath(initialPath ?? localStorage.getItem(pathKey) ?? rootPath ?? '/'));
const [entries, setEntries] = useState([]);
const [loading, setLoading] = useState(false);
const [error, setError] = useState(null);
diff --git a/src/app/components/StatusPage.tsx b/src/app/components/StatusPage.tsx
index b33feaa..446f250 100644
--- a/src/app/components/StatusPage.tsx
+++ b/src/app/components/StatusPage.tsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { HardDrive, Activity, Wifi, Radio, Clock, RefreshCw, Loader2, Printer, Power, Computer, Download, Trash2, Eye, FolderOpen } from 'lucide-react';
-import { listDirectory, deletePath, getFileContents, getWebDAVBaseUrl, humanFileSize, type EntryInfo } from '../webdav';
+import { listDirectory, deletePath, getFileContents, getWebDAVBaseUrl, humanFileSize, splitPath, type EntryInfo } from '../webdav';
import { toast } from 'sonner';
import { MediaEntry } from './MediaEntry';
import { useWs } from '../ws';
@@ -162,7 +162,7 @@ export default function StatusPage({ config, setConfig, onOpenFileManager }: Sta