- setSharees action and mutation added
- Moved setBoards logic from App.vue to store. Signed-off-by: Vadim Nicolai <nicolai.vadim@gmail.com>
This commit is contained in:
14
src/App.vue
14
src/App.vue
@@ -36,11 +36,8 @@
|
||||
|
||||
import { mapState } from 'vuex'
|
||||
import BoardSidebar from './components/board/BoardSidebar'
|
||||
import { BoardApi } from './services/BoardApi'
|
||||
import AppNavigation from './components/navigation/AppNavigation';
|
||||
|
||||
const boardApi = new BoardApi()
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
@@ -81,16 +78,9 @@ export default {
|
||||
return this.sidebarRouterView || this.sidebarShownState
|
||||
}
|
||||
},
|
||||
provide: function() {
|
||||
return {
|
||||
boardApi: boardApi
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
boardApi.loadBoards()
|
||||
.then((boards) => {
|
||||
this.$store.dispatch('setBoards', boards)
|
||||
})
|
||||
this.$store.dispatch('setBoards')
|
||||
this.$store.dispatch('setSharees')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user