waveterm/emain
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
..
authkey.ts fix for waveterm environment variables leaking from prod to dev (#1153) 2024-10-27 13:12:41 -07:00
docsite.ts Update data and config paths to match platform defaults (#1047) 2024-10-22 09:26:58 -07:00
emain-activity.ts browser view (#1005) 2024-10-17 14:34:02 -07:00
emain-tabview.ts fix: pass missing config to setTimeout in getSpareTab (#1627) 2024-12-26 08:17:13 -08:00
emain-util.ts Global Hotkey Docs (#1548) 2024-12-17 15:25:34 -08:00
emain-wavesrv.ts fix for waveterm environment variables leaking from prod to dev (#1153) 2024-10-27 13:12:41 -07:00
emain-web.ts Workspaces are back! (#1282) 2024-12-02 10:56:56 -08:00
emain-window.ts Deleting current workspace switches to another instead of closing [ backend implementation ] (#1623) 2024-12-29 09:58:29 -08:00
emain-wsh.ts Workspace app menu (#1423) 2024-12-06 15:33:00 -08:00
emain.ts Add warning when user is running in ARM translation mode (#1560) 2024-12-18 19:44:50 -08:00
launchsettings.ts Update data and config paths to match platform defaults (#1047) 2024-10-22 09:26:58 -07:00
log.ts Workspace app menu (#1423) 2024-12-06 15:33:00 -08:00
menu.ts Create workspace will always create a saved workspace (#1509) 2024-12-12 17:21:09 -08:00
platform.ts Add warning when user is running in ARM translation mode (#1560) 2024-12-18 19:44:50 -08:00
preload-webview.ts right click save image in webview (#962) 2024-10-04 16:34:05 -07:00
preload.ts Pass workspace id to contextmenu-show (#1429) 2024-12-06 19:10:34 -08:00
updater.ts minor v10 cleanup (waveReadyPromise, focusedWaveWindow) (#1456) 2024-12-10 10:58:50 -08:00