Skip to content

Commit

Permalink
Merge pull request #182 from lcnetdev/bfp-303-component-library
Browse files Browse the repository at this point in the history
Bfp 303 component library
  • Loading branch information
thisismattmiller authored Jan 16, 2025
2 parents 5bf5d59 + 868450e commit f62b1d0
Show file tree
Hide file tree
Showing 8 changed files with 593 additions and 16 deletions.
15 changes: 13 additions & 2 deletions src/components/panels/edit/fields/helpers/ActionButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@
<span class="button-shortcut-label">0</span>
Debug
</button>
<button style="width:100%" :id="`action-button-command-${fieldGuid}-cl`" class="" @click="addToLibrary()">
Add To Library
</button>

<template v-if="this.returnRemark()">
<button style="width:100%" class="" :id="`action-button-command-${fieldGuid}--`" @click="openRemark()">
<span class="button-shortcut-label">-</span>
Expand Down Expand Up @@ -288,8 +292,6 @@
},
showBuildHubStub(){
console.log("this.propertyPath",this.propertyPath)
if (!this.propertyPath) return false;
if (this.propertyPath && this.propertyPath.length==0) return false;
Expand Down Expand Up @@ -380,6 +382,15 @@
},
addToLibrary: function(){
this.profileStore.addToComponentLibrary(this.guid);
this.sendFocusHome()
},
duplicateComponent: function(){
this.profileStore.duplicateComponent(this.profileStore.returnStructureByComponentGuid(this.guid)['@guid'],this.structure)
this.sendFocusHome()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default {
</script>

<style scoped>
<style>
.verified {
color: green;
Expand Down
9 changes: 6 additions & 3 deletions src/components/panels/edit/modals/InstanceSelectionModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
display-directive="show"
:hide-overlay="true"
:overlay-transition="'vfm-fade'"
:contentClass="instance-selection-modal-container"

>
<!-- was attr in VueFinalModal... :contentClass="instance-selection-modal-container" -->

<!-- was attr in VueDragResize @resizing="dragResize" -->
<!-- was attr in VueDragResize @dragging="dragResize" -->
<VueDragResize
:is-active="true"
:w="400"
:h="250"
:x="200"
:y="50"
@resizing="dragResize"
@dragging="dragResize"

:sticks="['br']"
:stickSize="22"
style="background-color: whitesmoke"
Expand Down
15 changes: 15 additions & 0 deletions src/components/panels/nav/Nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@
let prefs = null
let scriptShifterOptions = null
let diacriticUse = null
let marvaComponentLibrary = null
let data = {}
Expand All @@ -510,6 +511,14 @@
console.warn("Couldn't find Diacritic preferences to export. :(")
}
if (window.localStorage.getItem('marva-componentLibrary')){
marvaComponentLibrary = JSON.parse(window.localStorage.getItem('marva-componentLibrary'))
data["marvaComponentLibrary"] = marvaComponentLibrary
} else {
console.warn("Couldn't find marva-componentLibrary preferences to export. :(")
}
let today = new Date()
let dd = String(today.getDate()).padStart(2, '0')
let mm = String(today.getMonth() + 1).padStart(2, '0')
Expand Down Expand Up @@ -544,6 +553,12 @@
that.preferenceStore.scriptShifterOptions = contents["scriptShifterOptions"]
window.localStorage.setItem('marva-scriptShifterOptions', JSON.stringify(contents["scriptShifterOptions"]))
}
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"]
window.localStorage.setItem('marva-diacriticUse', JSON.stringify(contents["diacriticUse"]))
Expand Down
Loading

0 comments on commit f62b1d0

Please sign in to comment.