Collapse tasks folder by default on company export page
The tasks directory is now excluded from auto-expanded top-level directories when the export page loads, keeping the tree cleaner. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -587,11 +587,11 @@ export function CompanyExport() {
|
|||||||
if (!isTaskPath(filePath)) checked.add(filePath);
|
if (!isTaskPath(filePath)) checked.add(filePath);
|
||||||
}
|
}
|
||||||
setCheckedFiles(checked);
|
setCheckedFiles(checked);
|
||||||
// Expand top-level dirs
|
// Expand top-level dirs (except tasks — collapsed by default)
|
||||||
const tree = buildFileTree(result.files);
|
const tree = buildFileTree(result.files);
|
||||||
const topDirs = new Set<string>();
|
const topDirs = new Set<string>();
|
||||||
for (const node of tree) {
|
for (const node of tree) {
|
||||||
if (node.kind === "dir") topDirs.add(node.path);
|
if (node.kind === "dir" && node.name !== "tasks") topDirs.add(node.path);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If URL contains a deep-linked file path, select it and expand ancestors
|
// If URL contains a deep-linked file path, select it and expand ancestors
|
||||||
|
|||||||
Reference in New Issue
Block a user