waveterm/frontend
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
..
app Deleting current workspace switches to another instead of closing [ backend implementation ] (#1623) 2024-12-29 09:58:29 -08:00
layout Add wsh wavepath command for getting Wave paths (#1545) 2024-12-17 14:11:40 -08:00
types Web Search (#1631) 2024-12-29 09:58:11 -08:00
util Web Search (#1631) 2024-12-29 09:58:11 -08:00
wave.ts add a refocus at the end of wave reinit (#1499) 2024-12-11 13:13:40 -08:00