waveterm/pkg/wcore
Yacoub 0890475a60
Deleting current workspace switches to another instead of closing [ backend implementation ] (#1623)
I did not mean to close the previous pr, anyway i tried to implement
what you suggested, the backend now does most of it
and DeleteWorkspace will return an unclaimed id and avoid closing the
window.

```go 
        const moveToNewWorkspace = await WorkspaceService.DeleteWorkspace(workspaceId) 
        console.log("delete-workspace done", workspaceId, ww?.waveWindowId);
        if (ww?.workspaceId == workspaceId){
            if ( workspaceList?.length > 1 ) {
                   await ww.switchWorkspace(moveToNewWorkspace)
            } else {
                    console.log("delete-workspace closing window", workspaceId, ww?.waveWindowId);
                    ww.destroy();
            }
        }
    });
```


![unknown_2024 12 26-17
05](https://github.com/user-attachments/assets/9c8455e5-b71c-479d-a15c-ee5c99c7a909)
![unknown_2024 12 26-17
06](https://github.com/user-attachments/assets/5dbf63bc-1ffd-4088-abc0-7c02fac9af94)

---------

Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
2024-12-29 09:58:29 -08:00
..
block.go Add license identifiers to my changes (#1475) 2024-12-10 15:18:14 -08:00
layout.go Found another erroneous layout bootstrap (#1442) 2024-12-09 15:22:41 -08:00
wcore.go Only create starter workspace on first launch (#1599) 2024-12-20 16:00:26 -08:00
window.go Deleting current workspace switches to another instead of closing [ backend implementation ] (#1623) 2024-12-29 09:58:29 -08:00
workspace.go Deleting current workspace switches to another instead of closing [ backend implementation ] (#1623) 2024-12-29 09:58:29 -08:00