directory back up (parent) button + drag entry into parent to move
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user