basic file sharing
This commit is contained in:
@@ -30,12 +30,14 @@ export const useWarrenStore = defineStore('warrens', {
|
||||
|
||||
this.current.path += path;
|
||||
},
|
||||
backCurrentPath() {
|
||||
backCurrentPath(): boolean {
|
||||
if (this.current == null || this.current.path === '/') {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
this.current.path = getParentPath(this.current.path);
|
||||
|
||||
return true;
|
||||
},
|
||||
setCurrentWarrenPath(path: string) {
|
||||
if (this.current == null) {
|
||||
@@ -89,3 +91,20 @@ export const useRenameDirectoryDialog = defineStore('rename_directory_dialog', {
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const useShareDialog = defineStore('share_dialog', {
|
||||
state: () => ({
|
||||
target: null as DirectoryEntry | null,
|
||||
password: '',
|
||||
}),
|
||||
actions: {
|
||||
openDialog(target: DirectoryEntry) {
|
||||
this.target = target;
|
||||
this.password = '';
|
||||
},
|
||||
reset() {
|
||||
this.target = null;
|
||||
this.password = '';
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user