more respnsive: header hamburger done, started base

This commit is contained in:
2021-03-29 22:28:24 +02:00
parent d170979b42
commit 2f1636dfd4
13 changed files with 651 additions and 48 deletions

View File

@@ -22,7 +22,8 @@ export default {
},
methods: {
...mapActions({
userLogin: 'User/userLogin'
userLogin: 'User/userLogin',
openCloseHamMenu: 'Common/openCloseHamMenu'
}),
login () {
this.userLogin({
@@ -30,6 +31,7 @@ export default {
pass: this.password
}).then(() => {
console.log("LoginBlock user logged-in")
this.openCloseHamMenu(false)
this.$router.push({
name: 'base'
})

View File

@@ -34,6 +34,9 @@ export default {
}
},
methods: {
// ...mapActions({
// openCloseHamMenu: 'Common/openCloseHamMenu'
// }),
compileTemplate(){
this.template = Vue.compile(this.html)
},
@@ -50,6 +53,7 @@ export default {
onclick (event) {
// console.log("Clicked on header menu link", event);
const href = event.target.getAttribute('href')
// this.openCloseHamMenu(false)
this.$router.push(href)
}
},

View File

@@ -73,7 +73,8 @@ export default {
...mapActions({
createFlagColl: 'User/createFlagColl',
deleteFlagColl: 'User/deleteFlagColl',
openFlagColl: 'User/openFlagColl'
openFlagColl: 'User/openFlagColl',
openCloseHamMenu: 'Common/openCloseHamMenu'
}),
onCreateFlagColl () {
console.log("UserFlags onCreateFlagColl", this.new_folder_name)
@@ -136,6 +137,7 @@ export default {
onOpenFlagColl (flagcollid) {
// const flagcollid = e.target.getAttribute('flagcollid');
console.log("UserFlags onOpenFlagColl", flagcollid);
this.openCloseHamMenu(false)
this.openFlagColl(flagcollid)
.then(() => {
// console.log("onDeleteFlagColl then", data);

View File

@@ -7,7 +7,8 @@ export default {
// initial state
state: {
pagetitle: null
pagetitle: null,
hamburgerMenuToggle: document.querySelector('input#header-block-right-toggle')
},
// getters
@@ -18,10 +19,18 @@ export default {
setPagetitle (state, title) {
console.log('Common, setPagetitle', title)
state.pagetitle = title
},
setHamMenuState (state, s){
state.hamburgerMenuToggle.checked = s
}
},
// actions
actions: {}
actions: {
openCloseHamMenu ({ dispatch, commit, state }, s) {
console.log('openCloseHamMenu', s)
commit('setHamMenuState', s)
}
}
}