0.1.5a - fixed a bug with non-loading blueprints

This commit is contained in:
Elvanos 2021-04-20 22:25:44 +02:00
parent 9c2ba43034
commit ea7fb5ed5e
2 changed files with 33 additions and 20 deletions

View file

@ -293,9 +293,6 @@ import { I_OpenedDocument, I_ShortenedDocument } from "src/interfaces/I_OpenedDo
import PouchDB from "pouchdb"
import deleteDocumentCheckDialog from "src/components/dialogs/DeleteDocumentCheck.vue"
import { engageBlueprints, retrieveAllBlueprints } from "src/scripts/databaseManager/blueprintManager"
// import { cleanDatabases } from "src/scripts/databaseManager/cleaner"
import { I_Blueprint } from "src/interfaces/I_Blueprint"
import { extend, colors } from "quasar"
import { tagListBuildFromBlueprints } from "src/scripts/utilities/tagListBuilder"
import { retrieveCurrentProjectName } from "src/scripts/projectManagement/projectManagent"
@ -336,9 +333,6 @@ export default class ObjectTree extends BaseClass {
async created () {
this.projectName = await retrieveCurrentProjectName()
// await cleanDatabases()
await this.processBluePrints()
// Unfuck the rendering by giving the app some time to load first
await this.$nextTick()
}
@ -402,19 +396,6 @@ export default class ObjectTree extends BaseClass {
})
}
/**
* Processes all blueprints and redies the store for population of the app
*/
async processBluePrints (): Promise<void> {
await engageBlueprints()
const allObjectBlueprints = (await retrieveAllBlueprints()).rows.map((blueprint) => {
return blueprint.doc
}) as I_Blueprint[]
this.SSET_allBlueprints(allObjectBlueprints)
}
/****************************************************************/
// HIERARCHICAL TREE - HELPERS AND MODELS
/****************************************************************/

View file

@ -8,7 +8,7 @@
v-model="splitterModel"
unit="px"
emit-immediately
:class="splitterClass"
:class="{splitterClass, 'splitterHidden': hideHierarchyTree}"
@input="onChange"
:limits="[limiterWidth, Infinity]"
class="pageSplitter"
@ -55,9 +55,11 @@ import BaseClass from "src/BaseClass"
import objectTree from "src/components/ObjectTree.vue"
import appHeader from "src/components/AppHeader.vue"
import documentControl from "src/components/DocumentControl.vue"
import { engageBlueprints, retrieveAllBlueprints } from "src/scripts/databaseManager/blueprintManager"
import { extend } from "quasar"
import { OptionsStateInteface } from "src/store/module-options/state"
import { I_Blueprint } from "src/interfaces/I_Blueprint"
@Component({
components: {
@ -88,6 +90,30 @@ export default class DocumentLayout extends BaseClass {
return !this.leftDrawerOpen ? "splitt" : ""
}
/**
* Load all blueprints and build the tree out of them
*/
async created () {
// await cleanDatabases()
await this.processBluePrints()
// Unfuck the rendering by giving the app some time to load first
await this.$nextTick()
}
/**
* Processes all blueprints and redies the store for population of the app
*/
async processBluePrints (): Promise<void> {
await engageBlueprints()
const allObjectBlueprints = (await retrieveAllBlueprints()).rows.map((blueprint) => {
return blueprint.doc
}) as I_Blueprint[]
this.SSET_allBlueprints(allObjectBlueprints)
}
/**
* Special padding reset for the main page
*/
@ -178,6 +204,12 @@ export default class DocumentLayout extends BaseClass {
margin-top: 55px !important;
}
&.splitterHidden {
.q-splitter__separator {
display: none;
}
}
.q-splitter__separator {
background-color: transparent;
height: calc(100vh - 95px);