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 ( if (
currentInfo.path !== consistantPath(arr) && currentInfo.path.length >= consistantPath(arr).length &&
currentInfo.path.length > consistantPath(arr).length &&
currentInfo.path.startsWith(consistantPath(arr)) currentInfo.path.startsWith(consistantPath(arr))
) { ) {
error.title = 'แจ้งเตือน' error.set({
error.msg = 'ข้อมูลที่คุณกำลังเข้าถึงอยู่ถูกลบ' title: 'แจ้งเตือน',
error.show() msg: 'ข้อมูลที่คุณกำลังเข้าถึงอยู่ถูกลบ',
})
goto()
} }
}) })
socket.on('FileUpload', (data: StorageFile) => { socket.on('FileUpload', (data: StorageFile) => {