migrate: remove .files, .folders, use .children instead

This commit is contained in:
Bao Nguyen
2023-02-14 14:02:32 +07:00
parent 82db036bfb
commit 87d33e2f9d
15 changed files with 106 additions and 107 deletions

View File

@@ -21,11 +21,11 @@
let page_index = 0;
$: url = finder.to_url(history[page_index]) || 'My Computer';
$: folders = $hardDrive[id] == null ? [] : $hardDrive[id].folders.map(id => $hardDrive[id]);
$: files = $hardDrive[id] == null ? [] : $hardDrive[id].files.map(id => $hardDrive[id]);
$: items = [...files, ...folders]
$: items = $hardDrive[id] == null ?
[] :
$hardDrive[id]
.children
.map(id => $hardDrive[id])
.filter(el => el != null)
.filter(el => !hidden_items.includes(el.id));