feat: anchor - copy link to clipboard

This commit is contained in:
NGPixel
2017-05-22 13:32:52 -04:00
parent 45d94e7e94
commit 13bdb2edb7
10 changed files with 117 additions and 14 deletions

View File

@@ -0,0 +1,23 @@
'use strict'
export default {
state: {
shown: false,
hash: ''
},
getters: {},
mutations: {
anchorChange: (state, opts) => {
state.shown = (opts.shown === true)
state.hash = opts.hash || ''
}
},
actions: {
anchorOpen({ commit, dispatch }, hash) {
commit('anchorChange', { shown: true, hash })
},
anchorClose({ commit, dispatch }) {
commit('anchorChange', { shown: false })
}
}
}