feat: change location on edit file

This also fix when edit file on seach which cannot detect existing file(s)
This commit is contained in:
Methapon2001 2024-01-17 12:53:31 +07:00
parent c1eaeb5c64
commit 4cd95143d8
No known key found for this signature in database
GPG key ID: 849924FEF46BD132

View file

@ -7,7 +7,7 @@ import UploadExistDialog from './UploadExistDialog.vue'
const storageStore = useStorage()
const { file, currentInfo } = storeToRefs(storageStore)
const { createFile, updateFile } = storageStore
const { createFile, updateFile, goto } = storageStore
const fileFormState = ref<boolean>(false)
const fileFormPath = ref<string>('')
@ -61,6 +61,10 @@ function triggerFileEdit(
metadata: value.metadata,
}
fileNameLabel.value = file
const arr = pathname.split('/')
arr[arr.length - 1] = ''
goto(arr.join('/'))
}
defineExpose({