mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
feat: default open schema if only one present
This commit is contained in:
@ -52,6 +52,7 @@
|
|||||||
<WorkspaceExploreBarSchema
|
<WorkspaceExploreBarSchema
|
||||||
v-for="db of workspace.structure"
|
v-for="db of workspace.structure"
|
||||||
:key="db.name"
|
:key="db.name"
|
||||||
|
ref="schema"
|
||||||
:database="db"
|
:database="db"
|
||||||
:connection="connection"
|
:connection="connection"
|
||||||
@show-schema-context="openSchemaContext"
|
@show-schema-context="openSchemaContext"
|
||||||
@ -259,6 +260,11 @@ export default {
|
|||||||
window.addEventListener('mousemove', this.resize);
|
window.addEventListener('mousemove', this.resize);
|
||||||
window.addEventListener('mouseup', this.stopResize);
|
window.addEventListener('mouseup', this.stopResize);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.workspace.structure.length === 1) { // Auto-open if juust one schema
|
||||||
|
this.$refs.schema[0].selectSchema(this.workspace.structure[0].name);
|
||||||
|
this.$refs.schema[0].$refs.schemaAccordion.open = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async refresh () {
|
async refresh () {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<details class="accordion workspace-explorebar-database">
|
<details ref="schemaAccordion" class="accordion workspace-explorebar-database">
|
||||||
<summary
|
<summary
|
||||||
class="accordion-header database-name"
|
class="accordion-header database-name"
|
||||||
:class="{'text-bold': breadcrumbs.schema === database.name}"
|
:class="{'text-bold': breadcrumbs.schema === database.name}"
|
||||||
|
Reference in New Issue
Block a user