1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

perf: improved resize of text editor resizing console height

This commit is contained in:
2022-07-17 12:36:37 +02:00
parent 6a6f43a718
commit 3f9e6d85ca
19 changed files with 197 additions and 35 deletions

View File

@@ -100,6 +100,15 @@ export const useWorkspacesStore = defineStore('workspaces', {
getSelected: state => {
if (!state.workspaces.length) return 'NEW';
if (state.selectedWorkspace) return state.selectedWorkspace;
const connectionsStore = useConnectionsStore();
if (connectionsStore.lastConnections.length) {
return connectionsStore.lastConnections.sort((a, b) => {
if (a.time < b.time) return 1;
else if (a.time > b.time) return -1;
return 0;
})[0].uid;
}
return state.workspaces[0].uid;
},
getWorkspace: state => (uid: string) => {