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

Improvements to explorebar

This commit is contained in:
2020-06-03 20:56:44 +02:00
parent f3d165d3f1
commit 1bb3e8c9ac
7 changed files with 103 additions and 41 deletions

View File

@ -0,0 +1,62 @@
<template>
<div v-show="isSelected" class="workspace column columns">
<WorkspaceExploreBar :connection="connection" :is-selected="isSelected" />
<div class="workspace-tabs column">
<pre>{{ JSON.stringify(workspace.structure, null, 3) }}</pre>
</div>
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import Connection from '@/ipc-api/Connection';
import WorkspaceExploreBar from '@/components/WorkspaceExploreBar';
export default {
name: 'Workspace',
components: {
WorkspaceExploreBar
},
props: {
connection: Object
},
computed: {
...mapGetters({
selectedWorkspace: 'workspaces/getSelected',
getWorkspace: 'workspaces/getWorkspace'
}),
workspace () {
return this.getWorkspace(this.connection.uid);
},
isSelected () {
return this.selectedWorkspace === this.connection.uid;
}
},
async created () {
this.addWorkspace(this.connection.uid);
const isInitiated = await Connection.checkConnection(this.connection.uid);
if (isInitiated)
this.connectWorkspace(this.connection);
},
methods: {
...mapActions({
addNotification: 'notifications/addNotification',
addWorkspace: 'workspaces/addWorkspace',
connectWorkspace: 'workspaces/connectWorkspace',
removeConnected: 'workspaces/removeConnected'
})
}
};
</script>
<style lang="scss">
.workspace{
padding: 0;
margin: 0;
.workspace-tabs{
overflow: auto;
height: calc(100vh - #{$excluding-size});
}
}
</style>