Edit field options as sidebar (#190)

* Edit field options as sidebar

* WIP

* Finish dynamic positioning of sidebar

* Open block on addition, fix pro tag, add visual clue field open

* fix typo

* remove extra code

* remove extra code

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
formsdev
2023-09-08 16:19:13 +05:30
committed by GitHub
parent d9c71f5cee
commit d93eca7410
14 changed files with 945 additions and 106 deletions

View File

@@ -6,7 +6,7 @@ export const state = {
// Field being edited
selectedFieldIndex: null,
showEditFieldModal: null
showEditFieldSidebar: null
}
// mutations
@@ -23,16 +23,13 @@ export const mutations = {
index = state.content.properties.findIndex(prop => prop.id === index.id)
}
state.selectedFieldIndex = index
state.showEditFieldModal = true
state.showEditFieldSidebar = true
},
setSelectedFieldIndex (state, index) {
state.selectedFieldIndex = index
},
openEditFieldModal (state) {
state.showEditFieldModal = true
},
closeEditFieldModal (state) {
state.showEditFieldModal = false
this.selectedFieldIndex = null
closeEditFieldSidebar (state) {
state.showEditFieldSidebar = false
state.selectedFieldIndex = null
}
}