fix(MediaManager): reset folder configuration on path change and update button title for clarity
This commit is contained in:
parent
31bac8f700
commit
afc15134f5
|
|
@ -492,6 +492,7 @@ export default function MediaManager({ initialPath, rootPath, title, config, set
|
|||
|
||||
useEffect(() => {
|
||||
let cancelled = false;
|
||||
setFolderConfig(null);
|
||||
getFileContents(joinPath(path, '.config'))
|
||||
.then(async blob => {
|
||||
if (cancelled) return;
|
||||
|
|
@ -1045,7 +1046,7 @@ export default function MediaManager({ initialPath, rootPath, title, config, set
|
|||
})}
|
||||
</div>
|
||||
{folderConfig !== null && (
|
||||
<button onClick={() => void handleConfigureFolder()} className="p-1 rounded hover:bg-green-100 text-green-500 flex-shrink-0" title="Folder has .config — click to edit">
|
||||
<button onClick={() => void handleConfigureFolder()} className="p-1 rounded hover:bg-green-100 text-green-500 flex-shrink-0" title="Edit Folder Config">
|
||||
<SlidersHorizontal className="w-3.5 h-3.5" strokeWidth={3} />
|
||||
</button>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user