Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ad Hoc updates #183

Merged
merged 5 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/panels/edit/fields/helpers/ActionButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},

},
Expand Down
37 changes: 31 additions & 6 deletions src/components/panels/nav/Nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,14 @@
}
}





if (this.activeProfile.id){
menu.push(
{
text: "Profile: " + this.activeProfile.id,
class: "current-profile"
}
)
}

menu.push(

Expand Down Expand Up @@ -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"]
Expand Down Expand Up @@ -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)
}
}
},

},

Expand Down Expand Up @@ -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;
Expand Down
41 changes: 20 additions & 21 deletions src/components/panels/sidebar_property/Properties.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
configComponentLibraryAssignGroup(event,clId){
this.profileStore.changeGroupComponentLibrary(clId,event.target.value)



},

Expand All @@ -79,10 +79,10 @@

},



addComponentLibrary(event,clId,supressPropmpt){

if (event){
if (this.clDebounce){return false}
event.preventDefault()
Expand All @@ -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?')) {
Expand All @@ -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){

// }
// }
// }
Expand All @@ -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}

}
}
}
Expand Down Expand Up @@ -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]
}
},
},
}
Expand Down Expand Up @@ -452,7 +451,7 @@

<AccordionItem style="color: white;" :id="'accordion_'+clProfile.label" default-closed>
<template #summary>
<div> <span class="material-icons" style="font-size: 18px;padding-left: 2px;">library_add</span> <span style="vertical-align: text-bottom;" class="sidebar-header-text">Library: {{ clProfile.label }}</span></div>
<div> <span class="material-icons" style="font-size: 18px;padding-left: 2px;">library_add</span> <span style="vertical-align: text-bottom;" class="sidebar-header-text">Library: {{ clProfile.label }}</span></div>
</template>
<ul class="sidebar-property-ul" role="list">
<template v-for="group in clProfile.groups" >
Expand All @@ -464,19 +463,19 @@
<template v-for="component in group">
<li class="sidebar-property-li sidebar-property-li-cl ">



<button :class="{'material-icons' : true, 'component-library-settings-button': true, 'component-library-settings-button-invert': (activeComponentLibrary == component.id) }" @click="configComponentLibrary(component.id)">settings_applications</button>



<div class="component-library-item-container sidebar-property-li-empty" @click="addComponentLibrary($event,component.id)" >
<a href="#" @click="addComponentLibrary($event,component.id)">{{ component.label }}</a>
</div>
<template v-if="activeComponentLibrary == component.id">
<div class="component-library-settings">


<button class="material-icons simptip-position-right" data-tooltip="DELETE" @click="delComponentLibrary($event,component.id)">delete_forever</button>
<button class="material-icons simptip-position-right" data-tooltip="RENAME" @click="renameComponentLibrary($event,component.id,component.label)">new_label</button>
<select @change="configComponentLibraryAssignGroup($event,component.id)">
Expand Down Expand Up @@ -506,9 +505,9 @@
<option value="W" :selected="(component.groupId==='W')">Group W</option>
<option value="X" :selected="(component.groupId==='X')">Group X</option>
<option value="Y" :selected="(component.groupId==='Y')">Group Y</option>
<option value="Z" :selected="(component.groupId==='Z')">Group Z</option>
<option value="Z" :selected="(component.groupId==='Z')">Group Z</option>
</select>


</div>
</template>
Expand All @@ -531,7 +530,7 @@
</AccordionList>
</template>





Expand Down Expand Up @@ -693,7 +692,7 @@
.component-library-settings select{
height: 26px;
vertical-align: top;


}

Expand Down
2 changes: 1 addition & 1 deletion src/stores/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const useConfigStore = defineStore('config', {

versionMajor: 0,
versionMinor: 17,
versionPatch: 18,
versionPatch: 19,

regionUrls: {

Expand Down
Loading