Handle when move to the current folder

This commit is contained in:
Will Miao
2025-02-18 19:09:07 +08:00
parent 52b01d1bce
commit 612136d848

View File

@@ -100,6 +100,12 @@ class MoveManager {
targetPath = `${targetPath}/${newFolder}`;
}
// show toast if current path is same as target path
if (this.currentFilePath.substring(0, this.currentFilePath.lastIndexOf('/')) === targetPath) {
showToast('Model is already in the selected folder', 'info');
return;
}
try {
const response = await fetch('/api/move_model', {
method: 'POST',