diff --git a/src/components/panels/edit/fields/helpers/ActionButton.vue b/src/components/panels/edit/fields/helpers/ActionButton.vue index 6de5c329..5432c867 100644 --- a/src/components/panels/edit/fields/helpers/ActionButton.vue +++ b/src/components/panels/edit/fields/helpers/ActionButton.vue @@ -868,7 +868,7 @@ // Hide empty element in ad hoc mode hideElement: function(){ let structure = this.profileStore.returnStructureByComponentGuid(this.guid) - this.emptyComponents[structure.parentId].push(structure.id) + this.profileStore.addToAdHocMode(structure.parentId, structure.id) }, }, diff --git a/src/components/panels/nav/Nav.vue b/src/components/panels/nav/Nav.vue index f1ec4ce8..5ea592ad 100644 --- a/src/components/panels/nav/Nav.vue +++ b/src/components/panels/nav/Nav.vue @@ -421,10 +421,14 @@ } } - - - - + if (this.activeProfile.id){ + menu.push( + { + text: "Profile: " + this.activeProfile.id, + class: "current-profile" + } + ) + } menu.push( @@ -557,7 +561,7 @@ if (contents["marvaComponentLibrary"]){ that.preferenceStore.componentLibrary = contents["marvaComponentLibrary"] window.localStorage.setItem('marva-componentLibrary', JSON.stringify(contents["marvaComponentLibrary"])) - } + } if (contents["diacriticUse"]){ that.preferenceStore.diacriticUse = contents["diacriticUse"] @@ -610,7 +614,24 @@ hideInstanceSelectionModal: function(){ this.instances = [] this.showItemInstanceSelection = false; - } + }, + + // Show all hidden elements + showAllElements: function(){ + for (let key in this.emptyComponents){ + this.emptyComponents[key] = [] + } + }, + + // Hide all empty elements + hideAllElements: function(){ + for (let rt in this.activeProfile.rt){ + this.emptyComponents[rt] = [] + for (let element in this.activeProfile.rt[rt].pt){ + this.profileStore.addToAdHocMode(rt, element) + } + } + }, }, @@ -684,6 +705,10 @@ fill: v-bind("preferenceStore.returnValue('--c-edit-main-splitpane-nav-font-color')") !important; } + .current-profile { + background: var(--bar-button-hover-bkg, #f1f3f4); + margin-left: 100px; + } .login-menu{ position: absolute !important; diff --git a/src/components/panels/sidebar_property/Properties.vue b/src/components/panels/sidebar_property/Properties.vue index befff60e..73ea69b3 100644 --- a/src/components/panels/sidebar_property/Properties.vue +++ b/src/components/panels/sidebar_property/Properties.vue @@ -59,7 +59,7 @@ configComponentLibraryAssignGroup(event,clId){ this.profileStore.changeGroupComponentLibrary(clId,event.target.value) - + }, @@ -79,10 +79,10 @@ }, - - + + addComponentLibrary(event,clId,supressPropmpt){ - + if (event){ if (this.clDebounce){return false} event.preventDefault() @@ -93,7 +93,7 @@ } - + if (this.preferenceStore.returnValue('--b-edit-main-splitpane-properties-component-library-prompt-to-add') == true){ if (!supressPropmpt){ if (!confirm('Add Component From Library?')) { @@ -109,7 +109,7 @@ // for (let rt in this.activeProfile.rt){ // for (let pt in this.activeProfile.rt[rt].pt){ // if (this.activeProfile.rt[rt].pt[pt].id == newId){ - + // } // } // } @@ -134,7 +134,7 @@ let r = this.addComponentLibrary(null,component.id,supressPrompt) // if the first one returns canceled then stop, otherwise supress the prompt from here on if (r == 'canceled'){ return false}else{supressPrompt=true} - + } } } @@ -227,12 +227,11 @@ jumpToElement: function(profileName, elementName){ //if it's hidden show it - if (this.emptyComponents[profileName].includes(elementName)){ - let idx = this.emptyComponents[profileName].indexOf(elementName) - this.emptyComponents[profileName].splice(idx, 1) - } + let removed = this.profileStore.removeFromAdHocMode(profileName, elementName) //jump to it - this.activeComponent = this.activeProfile.rt[profileName].pt[elementName] + if (removed){ + this.activeComponent = this.activeProfile.rt[profileName].pt[elementName] + } }, }, } @@ -452,7 +451,7 @@