fix: alert on folder delete and goto root

This commit is contained in:
Methapon2001 2023-12-13 11:08:21 +07:00
parent 1ee0520505
commit 0a81ff4ffa
No known key found for this signature in database
GPG key ID: 849924FEF46BD132

View file

@ -281,13 +281,14 @@ const useStorage = defineStore('storageStore', () => {
}
if (
currentInfo.path !== consistantPath(arr) &&
currentInfo.path.length > consistantPath(arr).length &&
currentInfo.path.length >= consistantPath(arr).length &&
currentInfo.path.startsWith(consistantPath(arr))
) {
error.title = 'แจ้งเตือน'
error.msg = 'ข้อมูลที่คุณกำลังเข้าถึงอยู่ถูกลบ'
error.show()
error.set({
title: 'แจ้งเตือน',
msg: 'ข้อมูลที่คุณกำลังเข้าถึงอยู่ถูกลบ',
})
goto()
}
})
socket.on('FileUpload', (data: StorageFile) => {