reserve entered paths on navigating back

- retain the list of entered folders on going up the directory tree. 😹
This commit is contained in:
geoffrey45
2022-06-08 15:54:51 +03:00
parent 84bf467d9f
commit 14364a1257
4 changed files with 60 additions and 14 deletions
+3 -3
View File
@@ -43,15 +43,15 @@ function useSubRoutes() {
(newRoute: string) => {
switch (newRoute) {
case Routes.folder:
console.log(newRoute);
subPaths.value = createSubPaths(route.params.path);
let oldpath = "";
[oldpath, subPaths.value] = createSubPaths(route.params.path, oldpath);
watch(
() => route.params.path,
(newPath) => {
if (newPath == undefined) return;
subPaths.value = createSubPaths(newPath);
[oldpath, subPaths.value] = createSubPaths(newPath, oldpath);
}
);
break;