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:
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user