waveterm/frontend/app/store
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
..
contextmenu.ts Stop event propagation for contextmenu show event (#1493) 2024-12-11 11:03:30 -08:00
global.ts new utility fn, deepCompareReturnPrev. use for settings prefix atom to do a deep equal (#1630) 2024-12-26 11:09:48 -08:00
jotaiStore.ts Remove global.ts dependency from emain (#1003) 2024-10-10 10:12:42 -07:00
keymodel.ts Web Search (#1631) 2024-12-29 09:58:11 -08:00
modalmodel.ts tos page 2 -- quick tips (#387) 2024-09-16 23:45:47 -07:00
services.ts Deleting current workspace switches to another instead of closing [ backend implementation ] (#1623) 2024-12-29 09:58:29 -08:00
wos.ts Auditing async usage in frontend code (#1402) 2024-12-05 18:09:54 -08:00
wps.ts Remove global.ts dependency from emain (#1003) 2024-10-10 10:12:42 -07:00
ws.ts merge main to dev 0.9 2024-10-18 09:29:39 -07:00
wshclient.ts vdom 3 (#1033) 2024-10-17 14:50:36 -07:00
wshclientapi.ts Rename outdated WaveAI types (#1609) 2024-12-23 10:55:04 -08:00
wshrouter.ts browser view (#1005) 2024-10-17 14:34:02 -07:00
wshrpcutil.ts browser view (#1005) 2024-10-17 14:34:02 -07:00