directory back up (parent) button + drag entry into parent to move

This commit is contained in:
2025-07-30 17:25:10 +02:00
parent 2c834eb42b
commit 3b141cc7cd
18 changed files with 243 additions and 95 deletions

View File

@@ -1,6 +1,7 @@
import { defineStore } from 'pinia';
import type { DirectoryEntry } from '#shared/types';
import type { WarrenData } from '#shared/types/warrens';
import { getParentPath } from '~/utils/files';
export const useWarrenStore = defineStore('warrens', {
state: () => ({
@@ -29,6 +30,13 @@ export const useWarrenStore = defineStore('warrens', {
this.current.path += path;
},
backCurrentPath() {
if (this.current == null || this.current.path === '/') {
return;
}
this.current.path = getParentPath(this.current.path);
},
setCurrentWarrenPath(path: string) {
if (this.current == null) {
return;